summaryrefslogtreecommitdiff
path: root/source/n/network-scripts
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-31 04:55:33 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:57:37 +0200
commit8c9271e25c83e23cce857e3d79b47280b88a5ec4 (patch)
tree36ad9a121b5116b4c99aef2e9ef1ea67e8040991 /source/n/network-scripts
parent646a5c1cbfd95873950a87b5f75d52073a967023 (diff)
downloadcurrent-8c9271e25c83e23cce857e3d79b47280b88a5ec4.tar.gz
Thu May 31 04:55:33 UTC 201820180531045533
a/kernel-generic-4.14.47-x86_64-1.txz: Upgraded. a/kernel-huge-4.14.47-x86_64-1.txz: Upgraded. SCSI_DPT_I2O m -> y SCSI_ISCI m -> y (thanks to wael_h) a/kernel-modules-4.14.47-x86_64-1.txz: Upgraded. a/pkgtools-15.0-noarch-14.txz: Rebuilt. installpkg: rarely, an uncompressed size that's not quite to the next level (e.g., 1020K) will exceed the expected length and cause a --terse line to be one character longer than --terselength. Chop lines to --terselength before outputting them. The trailing ']' might be dropped, but no big deal. ap/slackpkg-2.83.0-noarch-1.txz: Upgraded. Release 2.83.0; thanks to orbea, Didier Spaier, burdi01, David Allen, Eduard Rozenberg, and Stuart Winter for various fixes and enhancements. Allow using vimdiff to compare .new and original files Numerous fixups for alternate $ROOT .new config files are sorted so that display order should be consistent among multiple machines Abort operation if system date is near epoch (mostly relevant for ARM machines and others with no RTC) Update Slackware ARM gpg key Update Slackware ARM mirror list No longer offer to run lilo - simply advise user that the kernel image has changed and give advice, but also require a keypress to (hopefully) confirm that the message was actually read mandoc lint fixes to slackpkg.8 Warn user if a -current mirror is selected (but only warn once) d/git-2.17.1-x86_64-1.txz: Upgraded. d/kernel-headers-4.14.47-x86-1.txz: Upgraded. d/rust-1.26.1-x86_64-1.txz: Upgraded. k/kernel-source-4.14.47-noarch-1.txz: Upgraded. l/fftw-3.3.8-x86_64-1.txz: Upgraded. l/imagemagick-6.9.9_48-x86_64-1.txz: Upgraded. n/network-scripts-15.0-noarch-8.txz: Rebuilt. Allow setting an interface in promiscuous mode; this is needed for networking to function properly in containers Fixup setting of IPALIASES (allow non /32 masks; not only is the /32 mask not required and even undesirable in some cases, this makes ipv6 support easier to integrate (and Darren is working on that as well) Thanks to Darren Austin. n/stunnel-5.46-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-2.txz: Rebuilt. Fixed empty logrotate file. x/xorg-server-1.20.0-x86_64-2.txz: Rebuilt. Patched to fix nouveau segfault. Thanks to Rod3775 for the patch. x/xorg-server-xephyr-1.20.0-x86_64-2.txz: Rebuilt. x/xorg-server-xnest-1.20.0-x86_64-2.txz: Rebuilt. x/xorg-server-xvfb-1.20.0-x86_64-2.txz: Rebuilt. xap/network-manager-applet-1.8.12-x86_64-2.txz: Rebuilt. Patched crash bug. Thanks to gmgf. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/n/network-scripts')
-rw-r--r--source/n/network-scripts/0001-no_hostname_in_networkmanager_conf.diff13
-rw-r--r--source/n/network-scripts/0002-set_broadcast_address_and_flush_ip_after_if_down.diff22
-rw-r--r--source/n/network-scripts/0003-netconfig-typos-and-set-NM-default.diff165
-rw-r--r--source/n/network-scripts/manpages/rc.inet1.81
-rw-r--r--source/n/network-scripts/manpages/rc.inet1.conf.514
-rwxr-xr-xsource/n/network-scripts/network-scripts.SlackBuild11
-rw-r--r--source/n/network-scripts/scripts/netconfig62
-rw-r--r--source/n/network-scripts/scripts/rc.inet140
-rw-r--r--source/n/network-scripts/scripts/rc.inet1.conf5
9 files changed, 78 insertions, 255 deletions
diff --git a/source/n/network-scripts/0001-no_hostname_in_networkmanager_conf.diff b/source/n/network-scripts/0001-no_hostname_in_networkmanager_conf.diff
deleted file mode 100644
index 8ce7600c..00000000
--- a/source/n/network-scripts/0001-no_hostname_in_networkmanager_conf.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./netconfig.orig 2017-11-26 13:34:37.652627697 -0600
-+++ ./netconfig 2018-02-15 20:01:26.844174383 -0600
-@@ -362,10 +362,6 @@
-
- # Write the hostname with domain to /etc/HOSTNAME:
- echo $HOSTNM.$DOMAIN > etc/HOSTNAME
--# Also make sure the hostname is written to /etc/NetworkManager/NetworkManager.conf:
--if [ -w etc/NetworkManager/NetworkManager.conf ]; then
-- sed -i "s/^hostname=.*$/hostname=$HOSTNM/g" etc/NetworkManager/NetworkManager.conf
--fi
-
- dialog --title "CONFIGURATION TYPE FOR '$HOSTNM.$DOMAIN'" \
- --default-item DHCP \
diff --git a/source/n/network-scripts/0002-set_broadcast_address_and_flush_ip_after_if_down.diff b/source/n/network-scripts/0002-set_broadcast_address_and_flush_ip_after_if_down.diff
deleted file mode 100644
index e963115d..00000000
--- a/source/n/network-scripts/0002-set_broadcast_address_and_flush_ip_after_if_down.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./rc.inet1.orig 2017-11-26 22:48:14.650274588 -0600
-+++ ./rc.inet1 2018-02-15 20:42:45.731997047 -0600
-@@ -215,8 +215,8 @@
- else # bring up interface using a static IP address
- if [ -n "${IPADDR[$i]}" ]; then # skip unconfigured interfaces
- # Set up the network card:
-- echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}" | $LOGGER
-- /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}
-+ echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}" | $LOGGER
-+ /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}
- if /sbin/ip link show dev ${1} | grep -wq "state DOWN" ; then
- /sbin/ip link set dev ${1} up # Bring up interface
- fi
-@@ -268,6 +268,8 @@
- if [ -n "${BRNICS[$i]}" ]; then
- br_close $i
- fi
-+ # Flush the address from the interface:
-+ ip address flush dev ${1}
- fi
- }
-
diff --git a/source/n/network-scripts/0003-netconfig-typos-and-set-NM-default.diff b/source/n/network-scripts/0003-netconfig-typos-and-set-NM-default.diff
deleted file mode 100644
index cd6bf2cc..00000000
--- a/source/n/network-scripts/0003-netconfig-typos-and-set-NM-default.diff
+++ /dev/null
@@ -1,165 +0,0 @@
---- ./netconfig.orig 2018-02-21 21:21:31.000000000 -0600
-+++ ./netconfig 2018-04-12 14:07:10.137023035 -0500
-@@ -11,7 +11,7 @@
- #
-
- # If we're doing loopback, we don't want 127.0.0.1 and 255.255.255.0 in
--# rc.inet1.conf... it's better to leave the values null. However, since
-+# rc.inet1.conf... it's better to leave the values null. However, since
- # we use the IP in other places, we need to make a copy for here.
- RCIPCOPY=$IPADDR
- RCMASKCOPY=$NETMASK
-@@ -68,7 +68,7 @@
- # Default gateway IP address:
- GATEWAY="$GATEWAY"
-
--# Change this to "yes" for debugging output to stdout. Unfortunately,
-+# Change this to "yes" for debugging output to stdout. Unfortunately,
- # /sbin/hotplug seems to disable stdout so you'll only see debugging output
- # when rc.inet1 is called directly.
- DEBUG_ETH_UP="no"
-@@ -103,8 +103,8 @@
- #VIRTIFUSER[1]="someuser"
- #VIRTIFGROUP[1]="somegroup"
-
--## Example config information for wlan0. Uncomment the lines you need and fill
--## in your data. (You may not need all of these for your wireless network)
-+## Example config information for wlan0. Uncomment the lines you need and fill
-+## in your data. (You may not need all of these for your wireless network)
- #IFNAME[4]="wlan0"
- #IPADDR[4]=""
- #NETMASK[4]=""
-@@ -173,7 +173,7 @@
- /bin/cat <<EOF >$ETCNETWORKS
- #
- # networks This file describes a number of netname-to-address
--# mappings for the TCP/IP subsystem. It is mostly
-+# mappings for the TCP/IP subsystem. It is mostly
- # used at boot time, when no name servers are running.
- #
-
-@@ -192,14 +192,14 @@
- /bin/cat << EOF > $HOSTS
- #
- # hosts This file describes a number of hostname-to-address
--# mappings for the TCP/IP subsystem. It is mostly
-+# mappings for the TCP/IP subsystem. It is mostly
- # used at boot time, when no name servers are running.
- # On small systems, this file can be used instead of a
- # "named" name server. Just add the names, addresses
- # and any aliases to this file...
- #
- # By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
--# should NEVER be named with the name of the machine. It causes problems
-+# should NEVER be named with the name of the machine. It causes problems
- # for some (stupid) programs, irc and reputedly talk. :^)
- #
-
-@@ -362,16 +362,21 @@
-
- # Write the hostname with domain to /etc/HOSTNAME:
- echo $HOSTNM.$DOMAIN > etc/HOSTNAME
-+## OBSOLETE with recent NetworkManager:
-+## Also make sure the hostname is written to /etc/NetworkManager/NetworkManager.conf:
-+#if [ -w etc/NetworkManager/NetworkManager.conf ]; then
-+# sed -i "s/^hostname=.*$/hostname=$HOSTNM/g" etc/NetworkManager/NetworkManager.conf
-+#fi
-
- dialog --title "CONFIGURATION TYPE FOR '$HOSTNM.$DOMAIN'" \
----default-item DHCP \
-+--default-item NetworkManager \
- --menu \
- "Now we need to know how your machine connects to the network.\n\
- If you have an internal network card and an assigned IP address, gateway, \
--and DNS, use the 'static IP' choice to enter these values. If your IP \
-+and DNS, use the 'static IP' choice to enter these values. If your IP \
- address is assigned by a DHCP server (commonly used by cable modem and DSL \
--services), select 'DHCP'. If you do not have a network card, select \
--the 'loopback' choice. You may also select 'NetworkManager' if you would \
-+services), select 'DHCP'. If you do not have a network card, select \
-+the 'loopback' choice. You may also select 'NetworkManager' if you would \
- like to have the NetworkManager daemon automatically handle your wired and \
- wireless network interfaces (this is simple and usually works). \
- Which type of network setup would you like?" 20 70 4 \
-@@ -389,10 +394,10 @@
- if [ "$REPLY" = "DHCP" ]; then
- USE_DHCP="yes"
- dialog --title "SET DHCP HOSTNAME" --inputbox "Some network providers require \
--that the DHCP hostname be set in order to connect. If so, they'll have assigned \
-+that the DHCP hostname be set in order to connect. If so, they'll have assigned \
- a hostname to your machine, which may look something like CC-NUMBER-A (this \
--depends on your ISP). If you were assigned a DHCP hostname, please enter it \
--below. If you do not have a DHCP hostname, just hit ENTER or Cancel." 13 62 \
-+depends on your ISP). If you were assigned a DHCP hostname, please enter it \
-+below. If you do not have a DHCP hostname, just hit ENTER or Cancel." 13 62 \
- 2> $TMP/SeTDHCPHOST
- NEW_DHCPHOST="`cat $TMP/SeTDHCPHOST`"
- rm -f $TMP/SeTDHCPHOST
-@@ -442,7 +447,7 @@
- NETMASK=`cat $TMP/SeTnetmask`
- fi
- cat << EOF > $TMP/tempmsg
--Enter your netmask. This will generally look something
-+Enter your netmask. This will generally look something
- like this: 255.255.255.0
- Enter netmask (aaa.bbb.ccc.ddd):
- EOF
-@@ -556,8 +561,8 @@
- dialog --title "PROBE FOR NETWORK CARD?" --menu "If you like, we \
- can look to see what kind of network card you have in your machine, and \
- if we find one create an /etc/rc.d/rc.netdevice script to load the module \
--for it at boot time. There's a slight bit of danger that the probing \
--can cause problems, but it almost always works. If you'd rather configure \
-+for it at boot time. There's a slight bit of danger that the probing \
-+can cause problems, but it almost always works. If you'd rather configure \
- your system manually, you can skip the probing process and edit \
- /etc/rc.d/rc.modules or /etc/modules.conf later to have it load the right module." \
- 16 68 2 \
-@@ -601,7 +606,7 @@
- fi
- if [ ! -r /cardfound ]; then
- dialog --title "NO CARD DETECTED" --msgbox "Sorry, but no network \
--card could be probed for on your system. Some cards (like non-PCI NE2000s) \
-+card could be probed for on your system. Some cards (like non-PCI NE2000s) \
- must be supplied with the I/O address to use and can't be probed for safely. \
- You'll have to try to configure the card later by editing \
- /etc/rc.d/rc.modules or recompiling your kernel." 9 70
-@@ -621,11 +626,11 @@
- elif [ "$LOOPBACK" = "yes" -a "$NETWORKMANAGER" = "yes" ]; then
- dialog --title "NETWORK SETUP COMPLETE" --yesno "Your networking \
- system is now configured to use NetworkManager for
--wired and wireless network management. To set up wireless networks
-+wired and wireless network management. To set up wireless networks
- and view status, add the Network Management control panel widget to
- your KDE desktop.
-
--Is this correct? Press 'Yes' to confirm, or 'No' to reconfigure." 0 0
-+Is this correct? Press 'Yes' to confirm, or 'No' to reconfigure." 0 0
- RETVAL=$?
- elif [ "$USE_DHCP" = "" ]; then
- while [ 0 ]; do
-@@ -634,8 +639,8 @@
- --extra-label Edit \
- --cancel-label Restart \
- --inputmenu \
--"These are the settings you have entered. To accept them and complete \
--the networking setup, press enter. If you need to make any changes, you \
-+"These are the settings you have entered. To accept them and complete \
-+the networking setup, press enter. If you need to make any changes, you \
- can do that now (or reconfigure later using 'netconfig')." \
- 22 60 12 \
- "Hostname:" "$HOSTNM" \
-@@ -692,11 +697,11 @@
- chmod 755 etc/rc.d/rc.networkmanager
- fi
- if [ "$1" = "" ]; then
-- dialog --msgbox "Settings accepted. Basic network configuration is complete." 6 40
-+ dialog --msgbox "Settings accepted. Basic network configuration is complete." 6 40
- fi
- else
- if [ "$1" = "" ]; then
-- dialog --msgbox "Settings discarded. Run the 'netconfig' command again if you need to reconfigure your network settings." 6 60
-+ dialog --msgbox "Settings discarded. Run the 'netconfig' command again if you need to reconfigure your network settings." 6 60
- fi
- fi
-
diff --git a/source/n/network-scripts/manpages/rc.inet1.8 b/source/n/network-scripts/manpages/rc.inet1.8
index e78353a0..ac8ce6a5 100644
--- a/source/n/network-scripts/manpages/rc.inet1.8
+++ b/source/n/network-scripts/manpages/rc.inet1.8
@@ -105,6 +105,7 @@ The /etc/rc.d/rc.wireless script is not meant to be run on its own by the user!
Patrick J. Volkerding <volkerdi@slackware.com>
Eric Hameleers <alien@slackware.com>
Robby Workman <rworkman@slackware.com>
+Darren 'Tadgy' Austin <darren@afterdark.org.uk>
.SH "SEE ALSO"
.BR rc.inet1.conf(5),
.BR ip(8),
diff --git a/source/n/network-scripts/manpages/rc.inet1.conf.5 b/source/n/network-scripts/manpages/rc.inet1.conf.5
index 1f790c0a..28683177 100644
--- a/source/n/network-scripts/manpages/rc.inet1.conf.5
+++ b/source/n/network-scripts/manpages/rc.inet1.conf.5
@@ -58,7 +58,7 @@ IPADDR[1]="192.168.3.11"
.br
NETMASK[1]="255.255.255.0"
.br
-IPALIASES[1]="192.168.3.100"
+IPALIASES[1]="192.168.3.100/24"
.br
USE_DHCP[1]=""
.br
@@ -118,9 +118,11 @@ NETMASK[0]=""
(255.255.255.0 is common)
.TP
IPALIASES[0]=""
-# Space separated list of additional IP addresses to bind to the
-interface after initial configuration is complete. If USE_DHCP is
-set to `yes' then additional addresses will only be added if the
+# Space separated list of additional IP addresses to bind to the
+interface after initial configuration is complete. An optional
+netmask may be specified after the IP in the form 1.2.3.4/24. If no
+netmask is specified the default of /32 will be used. If USE_DHCP
+is set to `yes' then additional addresses will only be added if the
dhcp client invocation is successful in obtaining a primary address.
.TP
USE_DHCP[0]="yes"
@@ -145,6 +147,9 @@ MTU[0]=""
# The default MTU is 1500, but you might need 1360 when you use NAT'ed
IPSec traffic. IPv6 will likely require smaller MTUs as well
.TP
+PROMISCUOUS[0]="yes"
+# Set promiscuous mode on the interface.
+.TP
DHCP_KEEPRESOLV[0]="yes"
# If you do
.B not
@@ -249,5 +254,6 @@ to the number of network interfaces you wish to use.
Patrick J. Volkerding <volkerdi@slackware.com>
Eric Hameleers <alien@slackware.com>
Robby Workman <rworkman@slackware.com>
+Darren 'Tadgy' Austin <darren@afterdark.org.uk>
.SH "SEE ALSO"
.BR rc.inet1(8)
diff --git a/source/n/network-scripts/network-scripts.SlackBuild b/source/n/network-scripts/network-scripts.SlackBuild
index b484de1d..4f35ed36 100755
--- a/source/n/network-scripts/network-scripts.SlackBuild
+++ b/source/n/network-scripts/network-scripts.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=network-scripts
VERSION=${VERSION:-15.0}
ARCH=noarch
-BUILD=${BUILD:-7}
+BUILD=${BUILD:-8}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
@@ -64,15 +64,6 @@ cp -a $CWD/scripts/setup.netconfig $PKG/var/log/setup
chown root:root $PKG/var/log/setup/setup.netconfig
chmod 755 $PKG/var/log/setup/setup.netconfig
-# Apply patches until rworkman takes them up in git:
-( cd $PKG/sbin
- zcat $CWD/0001-no_hostname_in_networkmanager_conf.diff.gz | patch -p1 --verbose || exit 1
- zcat $CWD/0003-netconfig-typos-and-set-NM-default.diff.gz | patch -p1 --verbose || exit 1
-) || exit 1
-( cd $PKG/etc/rc.d
- zcat $CWD/0002-set_broadcast_address_and_flush_ip_after_if_down.diff.gz | patch -p1 --verbose rc.inet1.new || exit 1
-) || exit 1
-
# Add manpages:
mkdir -p $PKG/usr/man/man{5,8}
cat $CWD/manpages/rc.inet1.conf.5 | gzip -9c > $PKG/usr/man/man5/rc.inet1.conf.5.gz
diff --git a/source/n/network-scripts/scripts/netconfig b/source/n/network-scripts/scripts/netconfig
index 51e88bd4..5c5bf8a6 100644
--- a/source/n/network-scripts/scripts/netconfig
+++ b/source/n/network-scripts/scripts/netconfig
@@ -11,7 +11,7 @@ write_config_files() {
#
# If we're doing loopback, we don't want 127.0.0.1 and 255.255.255.0 in
-# rc.inet1.conf... it's better to leave the values null. However, since
+# rc.inet1.conf... it's better to leave the values null. However, since
# we use the IP in other places, we need to make a copy for here.
RCIPCOPY=$IPADDR
RCMASKCOPY=$NETMASK
@@ -68,7 +68,7 @@ DHCP_HOSTNAME[3]=""
# Default gateway IP address:
GATEWAY="$GATEWAY"
-# Change this to "yes" for debugging output to stdout. Unfortunately,
+# Change this to "yes" for debugging output to stdout. Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
@@ -103,8 +103,8 @@ DEBUG_ETH_UP="no"
#VIRTIFUSER[1]="someuser"
#VIRTIFGROUP[1]="somegroup"
-## Example config information for wlan0. Uncomment the lines you need and fill
-## in your data. (You may not need all of these for your wireless network)
+## Example config information for wlan0. Uncomment the lines you need and fill
+## in your data. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
@@ -128,10 +128,13 @@ DEBUG_ETH_UP="no"
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name instead of
# the default 'eth4'
-#IFNAME[4]="eth0:1" # Set up an IP alias.
+#IPALIASES[4]="192.168.5.10/24" # Set up an IP alias. A netmask may be given
+ # with a /<prefix> after the IP address - if
+ # not supplied, /32 will be used as default.
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
+#PROMISCUOUS[4]="yes" # Set promiscuous mode on the interface.
#DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to
# wait for server resonse is 15 seconds, but
# you might want a shorter or longer wait.
@@ -173,7 +176,7 @@ ENDFILE
/bin/cat <<EOF >$ETCNETWORKS
#
# networks This file describes a number of netname-to-address
-# mappings for the TCP/IP subsystem. It is mostly
+# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
#
@@ -192,14 +195,14 @@ chmod 644 $ETCNETWORKS
/bin/cat << EOF > $HOSTS
#
# hosts This file describes a number of hostname-to-address
-# mappings for the TCP/IP subsystem. It is mostly
+# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
-# should NEVER be named with the name of the machine. It causes problems
+# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
@@ -362,20 +365,21 @@ done
# Write the hostname with domain to /etc/HOSTNAME:
echo $HOSTNM.$DOMAIN > etc/HOSTNAME
-# Also make sure the hostname is written to /etc/NetworkManager/NetworkManager.conf:
-if [ -w etc/NetworkManager/NetworkManager.conf ]; then
- sed -i "s/^hostname=.*$/hostname=$HOSTNM/g" etc/NetworkManager/NetworkManager.conf
-fi
+## OBSOLETE with recent NetworkManager:
+## Also make sure the hostname is written to /etc/NetworkManager/NetworkManager.conf:
+#if [ -w etc/NetworkManager/NetworkManager.conf ]; then
+# sed -i "s/^hostname=.*$/hostname=$HOSTNM/g" etc/NetworkManager/NetworkManager.conf
+#fi
dialog --title "CONFIGURATION TYPE FOR '$HOSTNM.$DOMAIN'" \
---default-item DHCP \
+--default-item NetworkManager \
--menu \
"Now we need to know how your machine connects to the network.\n\
If you have an internal network card and an assigned IP address, gateway, \
-and DNS, use the 'static IP' choice to enter these values. If your IP \
+and DNS, use the 'static IP' choice to enter these values. If your IP \
address is assigned by a DHCP server (commonly used by cable modem and DSL \
-services), select 'DHCP'. If you do not have a network card, select \
-the 'loopback' choice. You may also select 'NetworkManager' if you would \
+services), select 'DHCP'. If you do not have a network card, select \
+the 'loopback' choice. You may also select 'NetworkManager' if you would \
like to have the NetworkManager daemon automatically handle your wired and \
wireless network interfaces (this is simple and usually works). \
Which type of network setup would you like?" 20 70 4 \
@@ -393,10 +397,10 @@ rm -f $TMP/reply
if [ "$REPLY" = "DHCP" ]; then
USE_DHCP="yes"
dialog --title "SET DHCP HOSTNAME" --inputbox "Some network providers require \
-that the DHCP hostname be set in order to connect. If so, they'll have assigned \
+that the DHCP hostname be set in order to connect. If so, they'll have assigned \
a hostname to your machine, which may look something like CC-NUMBER-A (this \
-depends on your ISP). If you were assigned a DHCP hostname, please enter it \
-below. If you do not have a DHCP hostname, just hit ENTER or Cancel." 13 62 \
+depends on your ISP). If you were assigned a DHCP hostname, please enter it \
+below. If you do not have a DHCP hostname, just hit ENTER or Cancel." 13 62 \
2> $TMP/SeTDHCPHOST
NEW_DHCPHOST="`cat $TMP/SeTDHCPHOST`"
rm -f $TMP/SeTDHCPHOST
@@ -446,7 +450,7 @@ EOF
NETMASK=`cat $TMP/SeTnetmask`
fi
cat << EOF > $TMP/tempmsg
-Enter your netmask. This will generally look something
+Enter your netmask. This will generally look something
like this: 255.255.255.0
Enter netmask (aaa.bbb.ccc.ddd):
EOF
@@ -560,8 +564,8 @@ if [ -d lib/modules/`uname -r` \
dialog --title "PROBE FOR NETWORK CARD?" --menu "If you like, we \
can look to see what kind of network card you have in your machine, and \
if we find one create an /etc/rc.d/rc.netdevice script to load the module \
-for it at boot time. There's a slight bit of danger that the probing \
-can cause problems, but it almost always works. If you'd rather configure \
+for it at boot time. There's a slight bit of danger that the probing \
+can cause problems, but it almost always works. If you'd rather configure \
your system manually, you can skip the probing process and edit \
/etc/rc.d/rc.modules or /etc/modules.conf later to have it load the right module." \
16 68 2 \
@@ -605,7 +609,7 @@ the $card.o module has been detected." 5 72
fi
if [ ! -r /cardfound ]; then
dialog --title "NO CARD DETECTED" --msgbox "Sorry, but no network \
-card could be probed for on your system. Some cards (like non-PCI NE2000s) \
+card could be probed for on your system. Some cards (like non-PCI NE2000s) \
must be supplied with the I/O address to use and can't be probed for safely. \
You'll have to try to configure the card later by editing \
/etc/rc.d/rc.modules or recompiling your kernel." 9 70
@@ -625,11 +629,11 @@ Is this correct? Press 'Yes' to continue, or 'No' to reconfigure." 0 0
elif [ "$LOOPBACK" = "yes" -a "$NETWORKMANAGER" = "yes" ]; then
dialog --title "NETWORK SETUP COMPLETE" --yesno "Your networking \
system is now configured to use NetworkManager for
-wired and wireless network management. To set up wireless networks
+wired and wireless network management. To set up wireless networks
and view status, add the Network Management control panel widget to
your KDE desktop.
-Is this correct? Press 'Yes' to confirm, or 'No' to reconfigure." 0 0
+Is this correct? Press 'Yes' to confirm, or 'No' to reconfigure." 0 0
RETVAL=$?
elif [ "$USE_DHCP" = "" ]; then
while [ 0 ]; do
@@ -638,8 +642,8 @@ elif [ "$USE_DHCP" = "" ]; then
--extra-label Edit \
--cancel-label Restart \
--inputmenu \
-"These are the settings you have entered. To accept them and complete \
-the networking setup, press enter. If you need to make any changes, you \
+"These are the settings you have entered. To accept them and complete \
+the networking setup, press enter. If you need to make any changes, you \
can do that now (or reconfigure later using 'netconfig')." \
22 60 12 \
"Hostname:" "$HOSTNM" \
@@ -696,11 +700,11 @@ if [ "$RETVAL" = "0" ]; then
chmod 755 etc/rc.d/rc.networkmanager
fi
if [ "$1" = "" ]; then
- dialog --msgbox "Settings accepted. Basic network configuration is complete." 6 40
+ dialog --msgbox "Settings accepted. Basic network configuration is complete." 6 40
fi
else
if [ "$1" = "" ]; then
- dialog --msgbox "Settings discarded. Run the 'netconfig' command again if you need to reconfigure your network settings." 6 60
+ dialog --msgbox "Settings discarded. Run the 'netconfig' command again if you need to reconfigure your network settings." 6 60
fi
fi
diff --git a/source/n/network-scripts/scripts/rc.inet1 b/source/n/network-scripts/scripts/rc.inet1
index 2f566ef8..cf9da0f4 100644
--- a/source/n/network-scripts/scripts/rc.inet1
+++ b/source/n/network-scripts/scripts/rc.inet1
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/bin/bash
# /etc/rc.d/rc.inet1
# This script is used to bring up the various network interfaces.
#
@@ -204,19 +204,28 @@ if_up() {
# 15 seconds should be a reasonable default DHCP timeout. 30 was too much.
echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -L -t ${DHCP_TIMEOUT[$i]:-15} ${DHCP_OPTIONS} ${1}" | $LOGGER
/sbin/dhcpcd -L -t ${DHCP_TIMEOUT[$i]:-15} ${DHCP_OPTIONS} ${1}
- # If the dhcpcd call succeeds, add extra IP addresses, if defined, to interface
- if [ "$?" == "0" ] && [ -n "${IPALIASES[$i]}" ]; then
- num=0
- for ipalias in ${IPALIASES[$i]}; do
- /sbin/ip address add ${ipalias}/32 dev ${1} label ${1}:${num} ;
- num=$(($num + 1))
- done
+ if [ "$?" == "0" ]; then # the dhcp call has succeeded
+ if [ -n "${IPALIASES[$i]}" ]; then
+ # Add extra IP addresses, if defined, to interface
+ num=0
+ for ipalias in ${IPALIASES[$i]}; do
+ ip="${ipalias%/*}"
+ nm="${ipalias#*/}"
+ [ -z "$nm" ] || [ "$ip" == "$nm" ] && nm="32"
+ /sbin/ip address add ${ip}/${nm} dev ${1} label ${1}:${num}
+ num=$(($num + 1))
+ done
+ fi
+ if [ "${PROMISCUOUS[$i]}" = "yes" ]; then
+ # Set promiscuous mode on the interface
+ /sbin/ip link set dev ${1} promisc on
+ fi
fi
else # bring up interface using a static IP address
if [ -n "${IPADDR[$i]}" ]; then # skip unconfigured interfaces
# Set up the network card:
- echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}" | $LOGGER
- /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} dev ${1}
+ echo "/etc/rc.d/rc.inet1: /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}" | $LOGGER
+ /sbin/ip address add ${IPADDR[$i]}/${NETMASK[$i]} broadcast + dev ${1}
if /sbin/ip link show dev ${1} | grep -wq "state DOWN" ; then
/sbin/ip link set dev ${1} up # Bring up interface
fi
@@ -224,10 +233,17 @@ if_up() {
if [ -n "${IPALIASES[$i]}" ]; then
num=0
for ipalias in ${IPALIASES[$i]}; do
- /sbin/ip address add ${ipalias}/32 dev ${1} label ${1}:${num} ;
+ ip="${ipalias%/*}"
+ nm="${ipalias#*/}"
+ [ -z "$nm" ] || [ "$ip" == "$nm" ] && nm="32"
+ /sbin/ip address add ${ip}/${nm} dev ${1} label ${1}:${num}
num=$(($num + 1))
done
fi
+ if [ "${PROMISCUOUS[$i]}" = "yes" ]; then
+ # Set promiscuous mode on the interface
+ /sbin/ip link set dev ${1} promisc on
+ fi
else
debug_log "${1} interface is not configured in /etc/rc.d/rc.inet1.conf"
fi
@@ -268,6 +284,8 @@ if_down() {
if [ -n "${BRNICS[$i]}" ]; then
br_close $i
fi
+ # Flush the address from the interface:
+ ip address flush dev ${1}
fi
}
diff --git a/source/n/network-scripts/scripts/rc.inet1.conf b/source/n/network-scripts/scripts/rc.inet1.conf
index 58766d25..551c4a70 100644
--- a/source/n/network-scripts/scripts/rc.inet1.conf
+++ b/source/n/network-scripts/scripts/rc.inet1.conf
@@ -104,10 +104,13 @@ DEBUG_ETH_UP="no"
## Config information for wlan0:
#IFNAME[4]="wlan0" # Use a different interface name instead of
# the default 'eth4'
-#IFNAME[4]="eth0:1" # Set up an IP alias.
+#IPALIASES[4]="192.168.5.10/24" # Set up an IP alias. A netmask may be given
+ # with a /<prefix> after the IP address - if
+ # not supplied, /32 will be used as default.
#HWADDR[4]="00:01:23:45:67:89" # Overrule the card's hardware MAC address
#MTU[4]="" # The default MTU is 1500, but you might need
# 1360 when you use NAT'ed IPSec traffic.
+#PROMISCUOUS[4]="yes" # Set promiscuous mode on the interface.
#DHCP_TIMEOUT[4]=15 # The default timeout for the DHCP client to
# wait for server resonse is 15 seconds, but
# you might want a shorter or longer wait.