sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by David Kowis (63afd9ef5eff6fc4950294659119e3c21a73833b)
- From: David Kowis <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by David Kowis (63afd9ef5eff6fc4950294659119e3c21a73833b)
- Date: Fri, 1 Feb 2008 16:27:41 -0600
GIT changes to master grimoire by David Kowis <dkowis AT shlrm.org>:
ChangeLog | 3
dev/null |binary
net/ifupdown/BUILD | 2
net/ifupdown/DEPENDS | 7 +
net/ifupdown/DETAILS | 16 ++
net/ifupdown/HISTORY | 3
net/ifupdown/INSTALL | 23 +++
net/ifupdown/PREPARE | 18 ++
net/ifupdown/init.d/mountnetwork | 43 ++++++
net/ifupdown/init.d/mountnetwork.conf | 4
net/ifupdown/init.d/network | 44 ++++++
net/net-tools/DEPENDS | 4
net/net-tools/DETAILS | 2
net/net-tools/HISTORY | 7 +
net/net-tools/INSTALL | 10 -
net/net-tools/PREPARE | 27 +++
net/net-tools/UP_TRIGGERS | 3
net/net-tools/ifdown | 101 --------------
net/net-tools/ifdown.8.gz | 0
net/net-tools/ifup | 227
---------------------------------
net/net-tools/ifup.8.gz | 0
net/net-tools/init.d/dhcpcd.conf | 10 -
net/net-tools/init.d/mountnetwork | 43 ------
net/net-tools/init.d/mountnetwork.conf | 4
net/net-tools/init.d/network | 77 -----------
25 files changed, 204 insertions(+), 474 deletions(-)
New commits:
commit 63afd9ef5eff6fc4950294659119e3c21a73833b
Author: David Kowis <dkowis AT shlrm.org>
Commit: David Kowis <dkowis AT shlrm.org>
I squished all this together because it is one atomic transaction.
None of these commits can be cherry-picked individually. The whole thing
must
go in all at once, or not at all.
Squashed commit of the following:
commit 242da7a7c41eeaa7531744f1d598e01cf9b6fa37
Author: David Kowis <dkowis AT shlrm.org>
Date: Fri Feb 1 16:26:30 2008 -0600
ChangeLog: adding notificiation of new ifupdown spell
commit 57aa160d8df9432bdb5129f05ca031fde80a0cb0
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 30 20:05:30 2008 -0600
ifupdown: Finalizing changes for ifupdown
commit b413b7289d8bf4d14baa0db29578009e9ec90e7b
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 30 20:04:38 2008 -0600
net-tools: Finalizing changes for the transition
commit c48271703c83ef2218089eb497c5f63e3e5f3b48
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 30 17:57:46 2008 -0600
ifupdown: Missing a critical dependency
commit f978ac6d13f0243efb3b40528e6750f3d1438170
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 30 17:52:32 2008 -0600
net-tools: Removing unneeded dependencies
commit 906ec84ab09803b7ccb5a516ddf0285bb572e151
Author: David Kowis <dkowis AT shlrm.org>
Date: Tue Jan 29 17:24:14 2008 -0600
ifupdown: Finishing up this spell.
commit 2ceaf1f911a1c23873235c8bdbedb35aff8cb5a5
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 23 21:24:13 2008 -0600
Should be committing a merge...
commit 9e13f64b184ae8684b153b990ac507beb72aa596
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 23 21:21:43 2008 -0600
net-tools: removing the ifup and ifdown stuff from here
commit c7ec11b436e44033b2c9fcd844764f2487981e45
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 23 21:05:01 2008 -0600
ifupdown: Lots of changes to get it to the 100% state. Time to try a
reboot :D
commit da89af3c3ca17c4cbc74e0c2ca9160ed5be9360d
Author: David Kowis <dkowis AT shlrm.org>
Date: Wed Jan 23 19:43:31 2008 -0600
ifupdown: adding a new spell to replace our crappy ifupdown
diff --git a/ChangeLog b/ChangeLog
index 1524781..a8c809c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2008-02-01 David Kowis <dkowis AT shlrm.org>
+ * net/ifupdown: new spell, Much better networking config
+
2008-02-01 Alexander Tsamutali <astsmtl AT gmail.com>
* shell-term-fm/hotwire: new spell, an object-oriented hypershell
diff --git a/net/ifupdown/BUILD b/net/ifupdown/BUILD
new file mode 100755
index 0000000..f5135ea
--- /dev/null
+++ b/net/ifupdown/BUILD
@@ -0,0 +1,2 @@
+make executables ifup.8.gz ifdown.8.gz interfaces.5.gz
+
diff --git a/net/ifupdown/DEPENDS b/net/ifupdown/DEPENDS
new file mode 100755
index 0000000..e3c8a0d
--- /dev/null
+++ b/net/ifupdown/DEPENDS
@@ -0,0 +1,7 @@
+depends run-parts &&
+depends net-tools &&
+
+optional_depends "dhcpcd" "" "" "For DHCP support" &&
+optional_depends "wireless_tools" "" "" "For wireless configuration" &&
+optional_depends "wpa_supplicant" "" "" "For WPA wireless configuration"
+
diff --git a/net/ifupdown/DETAILS b/net/ifupdown/DETAILS
new file mode 100755
index 0000000..e0f2520
--- /dev/null
+++ b/net/ifupdown/DETAILS
@@ -0,0 +1,16 @@
+ SPELL=ifupdown
+ VERSION=0.6.8
+ SOURCE=${SPELL}_$VERSION.tar.gz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+ SOURCE_URL[0]=http://ftp.de.debian.org/debian/pool/main/i/ifupdown/$SOURCE
+
SOURCE_HASH=sha512:9842dce853b483e02cb2d0ca08d3fa66b42e9b7d37b9d86d2180e89835472260d1c2aeb445bf9cde274870c63584b0bd4d8035adf037cbb9ce167a522e1252df
+ LICENSE[0]=GPL
+ WEB_SITE=http://packages.debian.org/etch/ifupdown
+ ENTERED=20080123
+ KEYWORDS="tools net"
+ SHORT="Interface control tools"
+cat << EOF
+This package provides the tools ifup and ifdown which may be used to
configure
+(or, respectively, deconfigure) network interfaces based on interface
+definitions in the file /etc/network/interfaces.
+EOF
diff --git a/net/ifupdown/HISTORY b/net/ifupdown/HISTORY
new file mode 100644
index 0000000..9bb0fe7
--- /dev/null
+++ b/net/ifupdown/HISTORY
@@ -0,0 +1,3 @@
+2008-01-30 David Kowis <dkowis AT shlrm.org>
+ * DETAILS,BUILD,DEPENDS,PREPARE: Created this spell
+
diff --git a/net/ifupdown/INSTALL b/net/ifupdown/INSTALL
new file mode 100755
index 0000000..d7a7916
--- /dev/null
+++ b/net/ifupdown/INSTALL
@@ -0,0 +1,23 @@
+# the makefile doesn't ln -sf so it might fail. so we destroy an easily
+# creatable symlink for safety
+if [ -h $INSTALL_ROOT/sbin/ifdown ]; then
+ rm -f $INSTALL_ROOT/sbin/ifdown
+fi &&
+
+default_install &&
+
+# install the man pages to smart places
+cp *.8.gz $INSTALL_ROOT/usr/share/man/man8/. &&
+cp *.5.gz $INSTALL_ROOT/usr/share/man/man5/. &&
+
+# install the documentation type things
+mkdir -p $INSTALL_ROOT/usr/share/doc/$SPELL &&
+cp -va examples $INSTALL_ROOT/usr/share/doc/$SPELL/. &&
+
+# make the default directories
+mkdir -p /etc/network &&
+mkdir -p /etc/network/run &&
+mkdir -p /etc/network/if-post-down.d &&
+mkdir -p /etc/network/if-pre-up.d &&
+mkdir -p /etc/network/if-down.d &&
+mkdir -p /etc/network/if-up.d
diff --git a/net/ifupdown/PREPARE b/net/ifupdown/PREPARE
new file mode 100755
index 0000000..c4840d1
--- /dev/null
+++ b/net/ifupdown/PREPARE
@@ -0,0 +1,18 @@
+persistent_add IFUPDOWNOKAY &&
+IFUPDOWNOKAY="n" &&
+if [ -f ${INSTALL_ROOT}/tmp/net-toolsNewInstall ] ; then
+ IFUPDOWNOKAY="y" &&
+ rm ${INSTALL_ROOT}/tmp/net-toolsNewInstall
+fi &&
+if ! spell_ok ifupdown ; then
+ if [[ "$IFUPDOWNOKAY" != "y" ]] ; then
+ if [ -x ${INSTALL_ROOT}/sbin/ifup ] ; then
+ # spell net-tools is still installed at the old version :/
+ message "${PROBLEM_COLOR}You have to upgrade net-tools first." &&
+ message "This spell will overwrite /sbin/ifup and /sbin/ifdown." &&
+ message "I've got to bail out right now, but I'm going to
pause.${DEFAULT_COLOR}" &&
+ sleep 5 &&
+ return 1
+ fi
+ fi
+fi
diff --git a/net/ifupdown/init.d/mountnetwork
b/net/ifupdown/init.d/mountnetwork
new file mode 100755
index 0000000..730529f
--- /dev/null
+++ b/net/ifupdown/init.d/mountnetwork
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/sysconfig/mountnetwork
+
+PROGRAM=/bin/false
+RUNLEVEL=3
+NEEDS="+network"
+PROVIDES="remote_fs"
+
+file_system_list=""
+
+for fs in ${FILESYSTEMS} ; do
+ if [[ $fs == "nfs" ]] ; then
+ NEEDS="$NEEDS +portmap"
+ fi
+ file_system_list="$file_system_list,$fs"
+done
+file_system_list=${file_system_list:1}
+
+. /etc/init.d/smgl_init
+
+start()
+{
+ if [ "$file_system_list" != "" ] ; then
+ required_executable /bin/mount
+
+ echo "Mounting remote filesystems..."
+ mount -a -F -t $file_system_list
+ evaluate_retval
+ fi
+}
+
+stop()
+{
+ if [ "$file_system_list" != "" ] ; then
+ required_executable /bin/umount
+
+ echo "Unmounting remote filesystems..."
+ umount -a -r -t $file_system_list
+ evaluate_retval
+ fi
+}
+
diff --git a/net/ifupdown/init.d/mountnetwork.conf
b/net/ifupdown/init.d/mountnetwork.conf
new file mode 100644
index 0000000..3211ca4
--- /dev/null
+++ b/net/ifupdown/init.d/mountnetwork.conf
@@ -0,0 +1,4 @@
+# A space separated list of network file systems that are to be mounted at
+# boot. Supported values are "cifs", "nfs", "ncpfs", "smbfs" and "9p"
(without
+# the quotes). The /usr hierachy may be loaded through this script.
+FILESYSTEMS="cifs nfs ncpfs smbfs 9p"
diff --git a/net/ifupdown/init.d/network b/net/ifupdown/init.d/network
new file mode 100755
index 0000000..3bde6dc
--- /dev/null
+++ b/net/ifupdown/init.d/network
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+PROGRAM=/bin/false # To get auto_init functionality
+RUNLEVEL=3
+PROVIDES=network
+
+[ "$USE_SYSLOG" = "yes" ] && NEEDS="+syslog"
+
+. /etc/init.d/smgl_init
+
+required_executable /sbin/ifup
+required_executable /sbin/ifdown
+
+start()
+{
+ # make sure all the interfaces really do come up
+ /sbin/ifup --force -a
+}
+
+stop()
+{
+ /sbin/ifdown -a
+}
+
+restart()
+{
+ echo "Shutting down ALL interfaces"
+ stop
+ # sleeping for some trickle time
+ sleep 3
+ start
+}
+
+status()
+{
+ exit 0
+}
+
+reload() { exit 3; }
+
+usage()
+{
+ echo "Usage: $0 {start|stop|restart|status} [DEVICE]"
+}
diff --git a/net/net-tools/DEPENDS b/net/net-tools/DEPENDS
index 6cfb39d..33a5a8f 100755
--- a/net/net-tools/DEPENDS
+++ b/net/net-tools/DEPENDS
@@ -8,6 +8,4 @@ depends smgl-fhs &&
# depends libdnet
#fi &&
-optional_depends "gettext" "" "" "for i18n internationalization support"
&&
-optional_depends "dhcpcd" "" "" "For dhcp support (dynamic ip)"
&&
-optional_depends "wireless_tools" "" "" "For wifi support (iwconfig)"
+optional_depends "gettext" "" "" "for i18n internationalization support"
diff --git a/net/net-tools/DETAILS b/net/net-tools/DETAILS
index 0104c66..517f4a9 100755
--- a/net/net-tools/DETAILS
+++ b/net/net-tools/DETAILS
@@ -4,7 +4,7 @@
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
SOURCE_URL[0]=http://www.tazenda.demon.co.uk/phil/net-tools/$SOURCE
SOURCE_HASH=sha512:8e1ae9bca726ad7d795a06c58388f9e11c1d617d94eebb9ed18bd11e5f34c6541e1ffe631706c407996db86e78df6e5cf1968a2d90b242b473596fda3b6d1eae
- PATCHLEVEL=10
+ PATCHLEVEL=11
LICENSE[0]=GPL
WEB_SITE=http://www.tazenda.demon.co.uk/phil/net-tools
ENTERED=20010922
diff --git a/net/net-tools/HISTORY b/net/net-tools/HISTORY
index 7cd06df..b4b5296 100644
--- a/net/net-tools/HISTORY
+++ b/net/net-tools/HISTORY
@@ -1,3 +1,10 @@
+2008-01-30 David Kowis <dkowis AT shlrm.org>
+ * DEPENDS: removed dependencies that aren't needed anymore
+ * PREPARE: added to do all the magic for updating systems to the new
ifupdown
+ * UP_TRIGGERS: makes ifupdown cast right after this one, but only the
first time
+ * if*: removed all the ifupdown stuff
+ * init.d: removed the initscripts
+
2008-01-28 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* BUILD: removed is_depends_enabled.function reference
diff --git a/net/net-tools/INSTALL b/net/net-tools/INSTALL
index b76d745..830a350 100755
--- a/net/net-tools/INSTALL
+++ b/net/net-tools/INSTALL
@@ -1,8 +1,2 @@
-make_normal &&
-make BASEDIR=${INSTALL_ROOT}/ install &&
-install -m 755 $SCRIPT_DIRECTORY/ifup ${INSTALL_ROOT}/sbin &&
-install -m 755 $SCRIPT_DIRECTORY/ifdown ${INSTALL_ROOT}/sbin &&
-install -m 755 $SCRIPT_DIRECTORY/ifup.8.gz \
- ${INSTALL_ROOT}/usr/share/man/man8/ &&
-install -m 755 $SCRIPT_DIRECTORY/ifdown.8.gz \
- ${INSTALL_ROOT}/usr/share/man/man8/
+make_normal &&
+make BASEDIR=${INSTALL_ROOT}/ install
diff --git a/net/net-tools/PREPARE b/net/net-tools/PREPARE
new file mode 100755
index 0000000..a170d4a
--- /dev/null
+++ b/net/net-tools/PREPARE
@@ -0,0 +1,27 @@
+persistent_add NETTOOLSHASTIME &&
+persistent_add NETTOOLSNEW &&
+if ! spell_ok ifupdown ; then
+ NETTOOLSNEW="y" &&
+ # Have to cheat to get a config option over into ifupdown
+ touch ${INSTALL_ROOT}/tmp/net-toolsNewInstall &&
+ # end cheat
+ unset NETTOOLSHASTIME &&
+ message "${PROBLEM_COLOR}This is a significant change to the way
networking works" &&
+ message "You will have to build an /etc/network/interfaces file."
&&
+ message "Its the same system that debian uses, so it's well documented."
&&
+ message "Installing the spell won't break your current network
connections." &&
+ message "But if you reboot, no network connections will come up."
&&
+ message "Because of this, you must say y to the following question, or
this" &&
+ message "spell will not install."
&&
+ message "Right after casting this spell, you need to cast
ifupdown.${DEFAULT_COLOR}" &&
+ config_query NETTOOLSHASTIME "Do you have time to configure your nifty new
networking?" n &&
+
+ if [[ "$NETTOOLSHASTIME" != "y" ]]; then
+ rm ${INSTALL_ROOT}/tmp/net-toolsNewInstall &&
+ return 1
+ fi
+else
+ NETTOOLSHASTIME="y" &&
+ NETTOOLSNEW="n"
+fi
+
diff --git a/net/net-tools/UP_TRIGGERS b/net/net-tools/UP_TRIGGERS
new file mode 100755
index 0000000..27c59e7
--- /dev/null
+++ b/net/net-tools/UP_TRIGGERS
@@ -0,0 +1,3 @@
+if [[ "$NETTOOLSNEW" == "y" ]]; then
+ up_trigger ifupdown cast_self
+fi
diff --git a/net/net-tools/ifdown b/net/net-tools/ifdown
deleted file mode 100644
index 1917cf7..0000000
--- a/net/net-tools/ifdown
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/bash
-
-# $1 - needle
-exists_in_text()
-{
- [ "$1" = "" ] && return 0
-
- IFS="
-"
-
- for x in $( cat ) ; do
- [ "$1" = "$x" ] && return 0
- done
-
- return 1
-}
-
-_set_bridge()
-{
- for port in "$@"
- do
- brctl delif $DEV $port
- ifconfig $port 0.0.0.0 down
- done
-}
-
-_do_device_down()
-{
- [[ -n "$BRIDGE_PORTS" ]] && _set_bridge $BRIDGE_PORTS
- if [[ "$MODE" =~ ^dynamic ]]; then
- echo "Stopping dhcpcd on $DEV ..."
- dhcpcd -k $DEV &&
- sleep 2
- fi
- echo "Shutting down network interface $DEV ..."
- ifconfig $DEV 0.0.0.0 down
- [[ -n "$BRIDGE_PORTS" ]] && brctl delbr $DEV
-}
-
-_do_route_down()
-{
- true
-}
-
-_on_down()
-{
- true
-}
-
-# Handles function "overloading"
-run_func() {
- # If for example do_route_up exists then run it, otherwise run _do_route_up
- if [ "$( type -t $1 )" = function ] ; then
- $1
- else
- _$1
- fi
-}
-
-netdevdir=/etc/sysconfig/network
-
-#change this if your .pid file hides somewhere else
-DHCPCD_PATH="/var/run/dhcpcd-"
-DEV=$1
-
-if [ -z $DEV ]; then
- echo "Usage: ifdown <device>"
- exit 2
-fi
-
-if [ ! -f $netdevdir/$DEV.dev ]; then
- echo "$DEV: no such network device"
- exit 1
-fi
-
-if ! /sbin/ifconfig -a 2>&1 | exists_in_text $DEV ; then
- echo "$DEV already down"
- exit 0
-fi
-
-unset MODE MODULE IP BROADCAST NETMASK GATEWAY POINTTOPOINT MTU WIFI
-unset do_device_down do_route_down on_down
-
-. $netdevdir/$DEV.dev
-
-if [ -z "$MODE" ]; then
- echo "There are errors in $netdevdir/$DEV.dev"
- exit 1
-fi
-
-run_func do_device_down &&
-run_func do_route_down &&
-
-# only do this if network device is a module
-# sort needed to ensure unique lsmod module name (often 2x entries in table)
-if [ "$MODULE" ] && /sbin/lsmod | exists_in_text "$MODULE" ; then
- echo "Unloading module $MODULE for $DEV ..."
- modprobe -r $MODULE
-fi &&
-
-run_func on_down
diff --git a/net/net-tools/ifdown.8.gz b/net/net-tools/ifdown.8.gz
deleted file mode 100644
index 37fbdde..0000000
Binary files a/net/net-tools/ifdown.8.gz and /dev/null differ
diff --git a/net/net-tools/ifup b/net/net-tools/ifup
deleted file mode 100644
index fba1147..0000000
--- a/net/net-tools/ifup
+++ /dev/null
@@ -1,227 +0,0 @@
-#!/bin/bash
-
-# $1 - needle
-exists_in_text()
-{
- [ "$1" = "" ] && return 0
-
- IFS="
-"
-
- for x in $( cat ) ; do
- [ "$1" = "$x" ] && return 0
- done
-
- return 1
-}
-
-# $1 - device name
-device_is_up()
-{
- if [ -x /usr/bin/grep ]; then
- /sbin/ifconfig ${1} | grep -q "UP"
- else
- /sbin/ifconfig ${1} 2>&1 | exists_in_text "UP"
- fi
-}
-
-# $* - parameters for iwconfig, except device name
-# to be called from _do_device_up
-_set_wlan()
-{
- iwconfig $DEV $* &&
- IWC="$IWC $*"
-}
-
-_set_bridge()
-{
- # if the bridge doesn't exist add it
- if ! brctl show | grep $DEV
- then
- brctl addbr $DEV
- fi
- for port in "$@"
- do
- if ! brctl show $DEV | grep $port
- then
- brctl addif $DEV $port
- fi &&
- ifconfig $port 0.0.0.0 promisc up
- done
-}
-
-_do_device_up()
-{
- # collect settings for iwconfig
- local IWC=
- [[ -n "$WIFI_NWID" ]] && _set_wlan nwid $WIFI_NWID
- [[ -n "$WIFI_ESSID" ]] && _set_wlan essid $WIFI_ESSID
- [[ -n "$WIFI_RATE" ]] && _set_wlan rate $WIFI_RATE
- [[ -n "$WIFI_MODE" ]] && _set_wlan mode $WIFI_MODE
- [[ -n "$WIFI_KEY1" ]] && _set_wlan key $WIFI_KEY1 '[1]'
- [[ -n "$WIFI_KEY2" ]] && _set_wlan key $WIFI_KEY2 '[2]'
- [[ -n "$WIFI_KEY3" ]] && _set_wlan key $WIFI_KEY3 '[3]'
- [[ -n "$WIFI_KEY4" ]] && _set_wlan key $WIFI_KEY4 '[4]'
- [[ -n "$WIFI_DEFAULTKEY" ]] && _set_wlan key "[$WIFI_DEFAULTKEY]"
- [[ -n "$WIFI_SECMODE" ]] && _set_wlan key $WIFI_SECMODE
- [[ -n "$WIFI_KEY" ]] && _set_wlan key $WIFI_KEY
- [[ -n "$BRIDGE_PORTS" ]] && _set_bridge $BRIDGE_PORTS
-
- # make sure the wifi settings are applied if any of them are present
- [[ -n "$IWC" ]] && iwconfig $DEV commit && sleep 2
-
- case "$MODE" in
- dynamic )
- sed -i 's/MODE=.*/MODE=dynamic_set_hostname/' $netdevdir/$DEV.dev &&
- echo "Fixed error in $DEV.dev"
- . /etc/sysconfig/dhcpcd
- ARGS="-h $HOSTNAME"
-
- echo "Starting dhcpcd on $DEV ..."
- if [ -e $DHCPCD_PATH$DEV.pid ]; then
- dhcpcPid=`cat $DHCPCD_PATH$DEV.pid`
- dhcpcd -k $DEV 1>/dev/null 2>&1 &&
- renice 10 $dhcpcPid 1>/dev/null 2>&1 || rm -f $DHCPCD_PATH$DEV.pid &&
- sleep 1
- fi &&
- dhcpcd -t $TIMEOUT $ARGS $OPTIONS $DEV
- ;;
- dynamic_set_hostname )
- . /etc/sysconfig/dhcpcd
- ARGS="-h $HOSTNAME"
-
- echo "Starting dhcpcd on $DEV ..."
- if [ -e $DHCPCD_PATH$DEV.pid ]; then
- dhcpcPid=`cat $DHCPCD_PATH$DEV.pid`
- dhcpcd -k $DEV 1>/dev/null 2>&1 &&
- renice 10 $dhcpcPid 1>/dev/null 2>&1 || rm -f $DHCPCD_PATH$DEV.pid &&
- sleep 1
- fi &&
- dhcpcd -t $TIMEOUT $ARGS $OPTIONS $DEV
- ;;
- dynamic_get_hostname )
- . /etc/sysconfig/dhcpcd
- ARGS="-H"
-
- echo "Starting dhcpcd on $DEV ..."
- if [ -e $DHCPCD_PATH$DEV.pid ]; then
- dhcpcPid=`cat $DHCPCD_PATH$DEV.pid`
- dhcpcd -k $DEV 1>/dev/null 2>&1 &&
- renice 10 $dhcpcPid 1>/dev/null 2>&1 || rm -f $DHCPCD_PATH$DEV.pid &&
- sleep 1
- fi &&
- dhcpcd -t $TIMEOUT $ARGS $OPTIONS $DEV
- ;;
- static )
- echo "Setting up static networking on $DEV..."
- ARGS=""
- if [ "$POINTOPOINT" != "" ] ; then
- ARGS="$ARGS pointopoint $POINTOPOINT"
- fi
- if [ "$MTU" != "" ] ; then
- ARGS="$ARGS mtu $MTU"
- fi
-
- ifconfig $DEV $IP broadcast $BROADCAST netmask $NETMASK $ARGS
- ;;
- * )
- echo "There are errors in $netdevdir/$DEV.dev"
- exit 1
- ;;
- esac
-}
-
-_do_route_up()
-{
- # check if GATEWAY is set; gateway is set by PPP or other software in some
- # cases
- if [ "$GATEWAY" ]; then
- route add default gw $GATEWAY dev $DEV
- fi
-}
-
-_on_up()
-{
- true
-}
-
-# Handles function "overloading"
-run_func() {
- # If for example do_route_up exists then run it, otherwise run _do_route_up
- if [ "$( type -t $1 )" = function ] ; then
- $1
- else
- _$1
- fi
-}
-
-netdevdir=/etc/sysconfig/network
-
-#change this if your .pid file hides somewhere else
-DHCPCD_PATH="/var/run/dhcpcd-"
-DEV=$1
-
-if [ -z $DEV ]; then
- echo "Usage: ifup <device>"
- exit 2
-fi
-
-if [ ! -f $netdevdir/$DEV.dev ]; then
- echo "$DEV: no such network device"
- exit 1
-fi
-
-if device_is_up $DEV ; then
- echo "$DEV already up"
- exit 0
-fi
-
-unset MODE MODULE IP BROADCAST NETMASK GATEWAY POINTOPOINT MTU UP_ON_BOOT
MAC NEEDS
-unset WIFI_NWID WIFI_ESSID WIFI_RATE WIFI_MODE WIFI_SECMODE WIFI_ENCKEY
-unset do_device_up do_route_up on_up
-
-. $netdevdir/$DEV.dev
-
-for needed_device in ${NEEDS}; do
- echo -n "Checking if $needed_device is up... "
- if ( ifconfig | grep -q $needed_device ); then
- echo "yes it is" ;
- else
- echo "NO, it's not! Aborting!"
- exit 1 ;
- fi
-done
-
-if [ -z "$MODE" ]; then
- echo "There are errors in $netdevdir/$DEV.dev"
- exit 1
-fi
-
-if [ "${_OBEY_UP_ON_BOOT}" = 1 -a "$UP_ON_BOOT" = no ] ; then
- exit 0
-fi
-
-if [ "$MODULE" ] && ! /sbin/lsmod | exists_in_text "$MODULE" ; then
- echo "Loading module $MODULE for $DEV ..."
- modprobe $MODULE
-fi &&
-
-if [ "$WIFI" ]; then
- echo "Configuring wifi for $DEV ..."
- sleep 1 # to give the card time to start, needed on some cards.
- iwconfig $DEV ${WIFI}
-fi &&
-
-if [ "$MAC" ]; then
- echo "Setting custom MAC address for $DEV ..."
- if ( ifconfig $DEV | grep -q Ethernet ); then
- ifconfig $DEV hw ether $MAC
- echo "Custom MAC set for device $DEV";
- else
- echo "Can't set custom MAC for non-ethernet device $DEV";
- fi
-fi
-
-run_func do_device_up
-run_func do_route_up
-run_func on_up
diff --git a/net/net-tools/ifup.8.gz b/net/net-tools/ifup.8.gz
deleted file mode 100644
index ae72c22..0000000
Binary files a/net/net-tools/ifup.8.gz and /dev/null differ
diff --git a/net/net-tools/init.d/dhcpcd.conf
b/net/net-tools/init.d/dhcpcd.conf
deleted file mode 100644
index 368cbc9..0000000
--- a/net/net-tools/init.d/dhcpcd.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# How many seconds should dhcpcd wait for an IP address?
-TIMEOUT=30
-
-# Set this variable to yes if you wish dhcpcd to use syslog for logging.
-USE_SYSLOG=no
-
-# Any command line options that should be passed to dhcpcd when it is
started.
-# Example usage: OPTIONS="-d -h $( hostname )"
-# See the manual page for dhcpcd for more information.
-OPTIONS=
diff --git a/net/net-tools/init.d/mountnetwork
b/net/net-tools/init.d/mountnetwork
deleted file mode 100755
index 730529f..0000000
--- a/net/net-tools/init.d/mountnetwork
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. /etc/sysconfig/mountnetwork
-
-PROGRAM=/bin/false
-RUNLEVEL=3
-NEEDS="+network"
-PROVIDES="remote_fs"
-
-file_system_list=""
-
-for fs in ${FILESYSTEMS} ; do
- if [[ $fs == "nfs" ]] ; then
- NEEDS="$NEEDS +portmap"
- fi
- file_system_list="$file_system_list,$fs"
-done
-file_system_list=${file_system_list:1}
-
-. /etc/init.d/smgl_init
-
-start()
-{
- if [ "$file_system_list" != "" ] ; then
- required_executable /bin/mount
-
- echo "Mounting remote filesystems..."
- mount -a -F -t $file_system_list
- evaluate_retval
- fi
-}
-
-stop()
-{
- if [ "$file_system_list" != "" ] ; then
- required_executable /bin/umount
-
- echo "Unmounting remote filesystems..."
- umount -a -r -t $file_system_list
- evaluate_retval
- fi
-}
-
diff --git a/net/net-tools/init.d/mountnetwork.conf
b/net/net-tools/init.d/mountnetwork.conf
deleted file mode 100644
index 3211ca4..0000000
--- a/net/net-tools/init.d/mountnetwork.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# A space separated list of network file systems that are to be mounted at
-# boot. Supported values are "cifs", "nfs", "ncpfs", "smbfs" and "9p"
(without
-# the quotes). The /usr hierachy may be loaded through this script.
-FILESYSTEMS="cifs nfs ncpfs smbfs 9p"
diff --git a/net/net-tools/init.d/network b/net/net-tools/init.d/network
deleted file mode 100755
index bdfc2b2..0000000
--- a/net/net-tools/init.d/network
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-
-. /etc/sysconfig/dhcpcd
-
-PROGRAM=/bin/false # To get auto_init functionality
-RUNLEVEL=3
-PROVIDES=network
-
-[ "$USE_SYSLOG" = "yes" ] && NEEDS="+syslog"
-
-. /etc/init.d/smgl_init
-
-required_executable /sbin/ifconfig
-required_executable /sbin/route
-required_executable /sbin/modprobe
-
-netdevdir=/etc/sysconfig/network
-
-# this provides you with the ability to start/stop/check status on
-# one or more cards if you so desire.
-
-if [ "$#" -le 1 ]; then
- devices="$(ls $netdevdir | grep dev$ | cut -d. -f1)"
-else
- devices="$(builtin echo $@ | sed s/$1//)"
-fi
-
-start()
-{
- required_executable /sbin/ifup
-
- export _OBEY_UP_ON_BOOT=1
- for DEVICE in $devices ; do
- [ "$DEVICE" = "lo" ] && continue
- echo "$(unset -f echo; /sbin/ifup $DEVICE)"
- evaluate_retval
- done
- unset _OBEY_UP_ON_BOOT
-}
-
-stop()
-{
- required_executable /sbin/ifdown
-
- for DEVICE in $devices ; do
- [ "$DEVICE" = "lo" ] && continue
- echo "$(unset -f echo; /sbin/ifdown $DEVICE)"
- evaluate_retval
- done
-}
-
-status()
-{
- for DEVICE in $devices ; do
- unset MODE on_status
-
- . $netdevdir/$DEVICE.dev
-
- if [ "$( type -t do_status )" = function ] ; then
- do_status # If on_status is defined in the device file
- elif [ -z "$MODE" ] ; then
- echo " There are errors in $netdevdir/$DEVICE.dev"
- else
- if [ "$MODE" = dynamic ]; then
- statusproc dhcpcd
- fi
- ifconfig $DEVICE
- fi
- done
-}
-
-reload() { exit 3; }
-
-usage()
-{
- echo "Usage: $0 {start|stop|restart|status} [DEVICE]"
-}
- [SM-Commit] GIT changes to master grimoire by David Kowis (63afd9ef5eff6fc4950294659119e3c21a73833b), David Kowis, 02/01/2008
Archive powered by MHonArc 2.6.24.