summaryrefslogtreecommitdiffstats
path: root/source/n/network-scripts/scripts/netconfig
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/n/network-scripts/scripts/netconfig
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.gz
current-9664bee729d487bcc0a0bc35859f8e13d5421c75.tar.xz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/n/network-scripts/scripts/netconfig')
-rw-r--r--source/n/network-scripts/scripts/netconfig51
1 files changed, 43 insertions, 8 deletions
diff --git a/source/n/network-scripts/scripts/netconfig b/source/n/network-scripts/scripts/netconfig
index 04afd698e..1e1151484 100644
--- a/source/n/network-scripts/scripts/netconfig
+++ b/source/n/network-scripts/scripts/netconfig
@@ -69,6 +69,16 @@ GATEWAY="$GATEWAY"
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"
+# Example of how to configure a bridge:
+# Note the added "BRNICS" variable which contains a space-separated list
+# of the physical network interfaces you want to add to the bridge.
+#IFNAME[0]="br0"
+#BRNICS[0]="eth0"
+#IPADDR[0]="192.168.0.1"
+#NETMASK[0]="255.255.255.0"
+#USE_DHCP[0]=""
+#DHCP_HOSTNAME[0]=""
+
## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
#IFNAME[4]="wlan0"
@@ -309,9 +319,14 @@ EOF
fi
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
-dialog --title "SETUP IP ADDRESS FOR '$HOSTNM.$DOMAIN'" \
+dialog --title "CONFIGUATION TYPE FOR '$HOSTNM.$DOMAIN'" \
--default-item DHCP \
--menu \
"Now we need to know how your machine connects to the network.\n\
@@ -319,14 +334,14 @@ 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 \
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. 'loopback' is also the correct choice if your \
-only connection to the network will be through a serial modem \
-(with SLIP or PPP), or if you are using a laptop network card (these \
-are configured in /etc/pcmcia/). What type of network connection \
-best describes your machine?" 20 70 3 \
+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 \
"static IP" "Use a static IP address to configure ethernet" \
"DHCP" "Use a DHCP server to configure ethernet" \
-"loopback" "Set up a loopback connection (modem or no net)" 2> $TMP/reply
+"loopback" "Set up a loopback connection (modem or no net)" \
+"NetworkManager" "Autoconfigure network using NetworkManager" 2> $TMP/reply
if [ $? = 1 -o $? = 255 ]; then
rm -f $TMP/reply
exit
@@ -348,6 +363,9 @@ below. If you do not have a DHCP hostname, just hit ENTER or Cancel." 13 62 \
DHCP_HOSTNAME="$NEW_DHCPHOST"
elif [ "$REPLY" = "loopback" ]; then
LOOPBACK="yes"
+elif [ "$REPLY" = "NetworkManager" ]; then
+ LOOPBACK="yes"
+ NETWORKMANAGER="yes"
else
LOOPBACK="no"
fi
@@ -554,7 +572,7 @@ You'll have to try to configure the card later by editing \
fi
fi
-if [ "$LOOPBACK" = "yes" ]; then
+if [ "$LOOPBACK" = "yes" -a ! "$NETWORKMANAGER" = "yes" ]; then
dialog --title "NETWORK SETUP COMPLETE" --yesno "Your networking \
system is now configured to use loopback:
@@ -563,6 +581,15 @@ Netmask: 255.255.255.0
Is this correct? Press 'Yes' to continue, or 'No' to reconfigure." 0 0
RETVAL=$?
+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
+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
+ RETVAL=$?
elif [ "$USE_DHCP" = "" ]; then
while [ 0 ]; do
dialog --title "CONFIRM NETWORK SETUP" \
@@ -617,8 +644,16 @@ Is this correct? Press 'Yes' to continue, or 'No' to reconfigure." 0 0
fi
if [ "$RETVAL" = "0" ]; then
+ # 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
write_config_files
+ if [ "$NETWORKMANAGER" = "yes" -a -r etc/rc.d/rc.networkmanager ]; then
+ chmod 755 etc/rc.d/rc.networkmanager
+ fi
if [ "$1" = "" ]; then
dialog --msgbox "Settings accepted. Basic network configuration is complete." 6 40
fi