V961 Tree Umbau

git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_upstart@4329 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2008-05-03 16:59:18 +00:00
commit 7b7f6e837b
47 changed files with 1654 additions and 0 deletions

BIN
etc/event.d/.sulogin.swp Normal file

Binary file not shown.

59
etc/event.d/checkfs Normal file
View File

@ -0,0 +1,59 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped initlvm
#stop on runlevel
description "Check Filesystems"
author "Harald Kueller <harald.kueller@compuextreme.de>"
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
if [ -f /fastboot ]; then
echo "Fast boot, no file system check"
else
echo "Changing state of rootfs to ro"
/bin/mount -n -o remount,ro /
evaluate_retval
if [ $? = 0 ]; then
if [ -f /forcefsck ]; then
echo -n "/forcefsck exists, forcing "
echo "file system check"
force="-f"
else
force=""
fi
echo "Checking file systems..."
/sbin/fsck $force -a -A -C -T
if [ $? -gt 1 ]; then
$FAILURE
echo
echo -n "fsck failed. Please repair your file "
echo "systems manually by running /sbin/fsck"
echo "without the -a option"
echo
echo -n "Please note that the root file system "
echo "is currently mounted in read-only mode."
echo
echo -n "I will start sulogin now. When you "
echo "logout I will reboot your system."
echo
$NORMAL
/sbin/initctl emit stalled
exit 1
else
print_status success
fi
else
echo -n "Cannot check root file system because it "
echo "could not be mounted in read-only mode."
fi
fi
end script

25
etc/event.d/checkvar Normal file
View File

@ -0,0 +1,25 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on startup
#stop on runlevel
description "Check if / ist nfs"
author "Harald Kueller <harald.kueller@compuextreme.de>"
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
mount -t proc none /proc
if mount|grep /dev/root|grep nfs &>/dev/null; then
/sbin/initctl emit varmake
else
umount /proc
mount -t tmpfs none /var/lock
/sbin/initctl emit start udev
fi
end script

View File

@ -0,0 +1,9 @@
# control-alt-delete - emergency keypress handling
#
# This task is run whenever the Control-Alt-Delete key combination is
# pressed. Usually used to shut down the machine.
start on control-alt-delete
emit shutdown
exec /sbin/shutdown -t1 -a -r now "Control-Alt-Delete pressed"

19
etc/event.d/hostname Normal file
View File

@ -0,0 +1,19 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped udevstart
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
if [ -f /etc/sysconfig/nodename ]; then
/bin/hostname `cat /etc/sysconfig/nodename`
else
/bin/hostname "localhost"
fi
end script

14
etc/event.d/hotplug Normal file
View File

@ -0,0 +1,14 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started udev
script
source /etc/init.d/functions
for RC in /etc/hotplug/*.rc; do
$RC start
done
touch /var/lock/subsys/hotplug
end script

34
etc/event.d/ifup Normal file
View File

@ -0,0 +1,34 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on stopped maccfg
stop on stopping mountfs
console logged
pre-start script
for IF in `ls -d /sys/class/net/*[^lo]`; do
DEVNAME=`basename $IF`
if [ -d /sys/class/net/$DEVNAME/wireless ]; then
/sbin/wlan_setup $DEVNAME
#give wlan a chance go create link
sleep 1
fi
if [ -f /usr/sbin/ethtool ]; then
if [ `ethtool $DEVNAME|grep Link|awk '{print $3}'` == "yes" ]; then
/sbin/if_up $DEVNAME
fi
else
/sbin/if_up $DEVNAME
fi
done
end script
post-stop script
for IF in `ls -d /sys/class/net/*[^lo]`; do
DEVNAME=`basename $IF`
/sbin/if_down $DEVNAME
done
end script

30
etc/event.d/initlvm Normal file
View File

@ -0,0 +1,30 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped virtualfs
#stop on runlevel
description "Initialize Locical Volume Manager (LVM)"
author "Harald Kueller <harald.kueller@compuextreme.de>"
console logged
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
if [ -f /sbin/vgscan ]; then
echo -n "Scanning Volumes"
/sbin/vgscan >/dev/null 2>&1
evaluate_retval
for i in `vgdisplay|grep "VG Name"|awk '{print $3}'`; do
echo -n "Activating Volume $i"
vgchange -a y $i
evaluate_retval
done
fi
end script

11
etc/event.d/klogd Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started mountfs
stop on stopping mountfs
console logged
exec /usr/sbin/klogd -n -f /var/log/kern.log

26
etc/event.d/loadkeys Normal file
View File

@ -0,0 +1,26 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on started mountfs
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
if [ -f /etc/sysconfig/kbd/setkeys ]; then
echo -n "Loading Special kbd mappings"
exec 3</etc/sysconfig/kbd/setkeys
while read <&3 CODE MAP; do
setkeycodes $CODE $MAP
done
evaluate_retval
exec 3>&-
fi
echo -n "Loading keymap..."
/bin/loadkeys -d >/dev/null
end script

42
etc/event.d/loadmodules Normal file
View File

@ -0,0 +1,42 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started udev
stop on stopping udev
pre-start script
source /etc/init.d/functions
if [ -f /etc/sysconfig/loadmods ]; then
sed -e "/^#/d" /etc/sysconfig/loadmods |
sed -e "/^ *$/d" >/tmp/loadmods
exec 3</tmp/loadmods
while read <&3 MODULE OPTIONS; do
modprobe -s $MODULE $OPTIONS
done
rm /tmp/loadmods
fi
end script
post-stop script
if [ -f /etc/sysconfig/loadmods ]; then
Z=0
while [ "$Z" "<" "9" ]; do
exec 3</proc/modules
while read <&3 MODNAME INFO; do
if rmmod -s $MODNAME &>/dev/null; then
print_status success
else
if [ "$Z" == "8" ]; then
print_status failure
else
echo "failed"
fi
fi
done
(( Z = $Z + 1 ))
exec 3>&-
done
fi
end script

20
etc/event.d/localnet Normal file
View File

@ -0,0 +1,20 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped udevstart
#stop on runlevel
console logged
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
pre-start script
/sbin/ifconfig lo 127.0.0.1
end script
post-stop script
/sbin/ifconfig lo down
end script

16
etc/event.d/logd Normal file
View File

@ -0,0 +1,16 @@
# logd
#
# This service is started automatically by init so that the output from
# other services can be logged.
description "service logging daemon"
author "Scott James Remnant <scott@ubuntu.com>"
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
console output
exec /sbin/logd
respawn

16
etc/event.d/maccfg Normal file
View File

@ -0,0 +1,16 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started loadmodules
console logged
script
if ls /etc/mactab* &>/dev/null; then
for maccfg in /etc/mactab*; do
nameif -c $maccfg >/dev/null
done
fi
end script

54
etc/event.d/mountfs Normal file
View File

@ -0,0 +1,54 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped checkfs
stop on shutdown
stop on runlevel 6
stop on runlevel 0
description "Mount all Filesystem which are not NFS"
author "Harald Kueller <harald.kueller@compuextreme.de>"
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
pre-start script
source /etc/init.d/functions
echo -n "Remounting rootfs in rw mode..."
/bin/mount -n -o remount,rw /
evaluate_retval
echo >/etc/mtab
/bin/mount -f -o remount,rw /
/bin/rm -f /fastboot /forcefsck
echo -n "Activating swap..."
/sbin/swapon -a
evaluate_retval
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab`
if [ ! "$FILESYSTEM" == "nfs" ] \
&& [ ! "$FILESYSTEM" == "swap" ] \
&& [ ! "$MOUNTPOINT" == "/" ] \
&& [ ! "$DEVICE" == "none" ]; then
echo -n "Mounting $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
fi
done
end script
post-stop script
source /etc/init.d/functions
echo -n "Deactivating swap..."
/sbin/swapoff -a
evaluate_retval
echo -n "Unmounting file systems..."
/bin/umount -a -r
evaluate_retval
end script

35
etc/event.d/mountnfs Normal file
View File

@ -0,0 +1,35 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started nfsclient
stop on stopping nfsclient
console output
pre-start script
source /etc/init.d/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
if [ "$FILESYSTEM" == "nfs" ]; then
echo -n "Mounting nfs $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
fi
done
end script
post-stop script
source /etc/init.d/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
if [ "$FILESYSTEM" == "nfs" ]; then
echo -n "Mounting nfs $MOUNTPOINT"
umount $MOUNTPOINT
evaluate_retval
fi
done
end script

46
etc/event.d/nfsroot Normal file
View File

@ -0,0 +1,46 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on varmake
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
echo -n "Mounting tmpfs on /var"
mount -t tmpfs none /var
evaluate_retval
echo -n "Getting Hostname ..."
ifconfig|\
grep Protokoll|\
awk '{ if ( $2 == "Protokoll:Ethernet" ) print $1 }' >/var/devices
for i in `cat /var/devices`; do
INET=`ifconfig $i|\
grep inet|\
awk -F ":" '{print $2}'|\
awk '{print $1}'`
ANET=`echo $INET|awk -F "." '{print $1}'`
if [ ! "$ANET" == "127" ]; then
HOSTNAME=`getent hosts $INET`
HOSTNAME=`echo $HOSTNAME|\
awk '{print $2}'|\
awk -F "." '{print $1}'`
break
fi
done
echo -n " $HOSTNAME"
evaluate_retval
echo -n "Restoring var folder"
cd /var
tar -zxf /boot/var_${HOSTNAME}.tgz
echo $HOSTNAME >etc/sysconfig/nodename
cd -
evaluate_retval
umount /proc
/sbin/initctl mount_virtual
end script

28
etc/event.d/rc-default Normal file
View File

@ -0,0 +1,28 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started syslogd
stop on runlevel
console logged
script
echo "Starting rc-default script"
/sbin/runlevel --reboot || true
if grep -q -w -- "-s\|single\|S" /proc/cmdline; then
/sbin/telinit S
elif [ -r /etc/inittab ]; then
RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
if [ -n "$RL" ]; then
/sbin/telinit $RL
else
/sbin/telinit 2
fi
else
/sbin/telinit 2
fi
end script

25
etc/event.d/rc0 Normal file
View File

@ -0,0 +1,25 @@
# rc0 - runlevel 0 compatibility
#
# This task runs the old sysv-rc runlevel 0 ("halt/poweroff") scripts with
# the decision as to whether to halt or power off the system left up to the
# script (and thus /etc/default/poweroff).
start on runlevel 0
stop on runlevel
console output
script
set $(runlevel || true)
if [ "$2" != "0" ] && [ "$2" != "6" ]; then
set $(runlevel --set 0 || true)
fi
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 0
end script

19
etc/event.d/rc1 Normal file
View File

@ -0,0 +1,19 @@
# rc1 - runlevel 1 compatibility
#
# This task runs the old sysv-rc runlevel 1 ("single-user") scripts.
start on runlevel 1
stop on runlevel
console output
script
set $(runlevel --set 1 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 1
end script

20
etc/event.d/rc2 Normal file
View File

@ -0,0 +1,20 @@
# rc2 - runlevel 2 compatibility
#
# This task runs the old sysv-rc runlevel 2 ("multi-user") scripts. It
# is usually started by the telinit compatibility wrapper.
start on runlevel 2
stop on runlevel
console output
script
set $(runlevel --set 2 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 2
end script

20
etc/event.d/rc3 Normal file
View File

@ -0,0 +1,20 @@
# rc3 - runlevel 3 compatibility
#
# This task runs the old sysv-rc runlevel 3 (user defined) scripts. It
# is usually started by the telinit compatibility wrapper.
start on runlevel 3
stop on runlevel
console output
script
set $(runlevel --set 3 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 3
end script

20
etc/event.d/rc4 Normal file
View File

@ -0,0 +1,20 @@
# rc3 - runlevel 3 compatibility
#
# This task runs the old sysv-rc runlevel 3 (user defined) scripts. It
# is usually started by the telinit compatibility wrapper.
start on runlevel 4
stop on runlevel
console output
script
set $(runlevel --set 4 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 4
end script

20
etc/event.d/rc5 Normal file
View File

@ -0,0 +1,20 @@
# rc5 - runlevel 5 compatibility
#
# This task runs the old sysv-rc runlevel 5 (user defined) scripts. It
# is usually started by the telinit compatibility wrapper.
start on runlevel 5
stop on runlevel
console output
script
set $(runlevel --set 5 || true)
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 5
end script

23
etc/event.d/rc6 Normal file
View File

@ -0,0 +1,23 @@
# rc6 - runlevel 6 compatibility
#
# This task runs the old sysv-rc runlevel 6 ("reboot") scripts.
start on runlevel 6
stop on runlevel
console output
script
set $(runlevel || true)
if [ "$2" != "0" ] && [ "$2" != "6" ]; then
set $(runlevel --set 6 || true)
fi
if [ "$1" != "unknown" ]; then
PREVLEVEL=$1
RUNLEVEL=$2
export PREVLEVEL RUNLEVEL
fi
exec /etc/init.d/rc 6
end script

25
etc/event.d/rcS-sulogin Normal file
View File

@ -0,0 +1,25 @@
# rcS-sulogin - "single-user" runlevel compatibility
#
# This task runs the sulogin binary during "single-user" mode.
start on runlevel S
stop on runlevel
console owner
script
runlevel --set S >/dev/null || true
/sbin/sulogin
if [ -r /etc/inittab ]; then
RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
if [ -n "$RL" ]; then
telinit $RL
else
telinit 2
fi
else
telinit 2
fi
end script

47
etc/event.d/routing Normal file
View File

@ -0,0 +1,47 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started ifup
console logged
script
source /etc/init.d/functions
if [ ! -f /etc/sysconfig/net/notrouter ]; then
echo "Configuring System with routing allowed"
if [ -f /etc/sysconfig/net/gateways ]; then
sed -e "/^#/d" /etc/sysconfig/net/gateways | \
sed -e "/^ *$/d" >/tmp/gateways
exec 3</tmp/gateways
read <&3 TYPE NETWORK OPTION GW NETMASK
while [ $TYPE ]; do
if [ "$OPTION" == "dev" ]; then
echo -n "Adding device Route to $NETWORK with $NETMASK on $GW"
route add -$TYPE $NETWORK netmask $NETMASK dev $GW
evaluate_retval
fi
if [ "$OPTION" == "gw" ]; then
echo -n "Adding net Route to $NETWORK with $NETMASK and gw $GW"
route add -$TYPE $NETWORK netmask $NETMASK gw $GW
evaluate_retval
fi
read <&3 TYPE NETWORK OPTION GW NETMASK
done
exec 3>&-
rm /tmp/gateways
fi
if [ -f /etc/sysconfig/net/defaultrouter ]; then
echo -n "setting up defaultrouter `cat /etc/sysconfig/net/defaultrouter`"
$DEBUG route add default gw `cat /etc/sysconfig/net/defaultrouter`
evaluate_retval
fi
NUMIF=`ip -f inet addr show|grep inet|wc -l`
if [ $NUMIF -gt 2 ]; then
echo -n "Enable ip_forwarding"
echo "1" >/proc/sys/net/ipv4/ip_forward
evaluate_retval
fi
fi
end script

24
etc/event.d/setclock Normal file
View File

@ -0,0 +1,24 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on started mountfs
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
CLOCKPARAMS="--hctosys"
case "$UTC" in
yes|true|1)
CLOCKPARAMS="$CLOCKPARAMS -u"
;;
esac
echo -n "Setting clock.."
/sbin/hwclock $CLOCKPARAMS
evaluate_retval
end script

18
etc/event.d/sulogin Normal file
View File

@ -0,0 +1,18 @@
# sulogin - rescue mode
#
# This task ensures that should the system fail to have any active jobs
# that the system administrator can rescue it; by giving them a shell.
start on stalled
exec /sbin/sulogin
console owner
pre-start script
echo
echo "The system has reached a state where there are no jobs running."
echo "A shell will be spawned so that you may start such jobs that are"
echo "necessary."
echo
echo "Type 'exit' when finished."
end script

11
etc/event.d/syslogd Normal file
View File

@ -0,0 +1,11 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on stopped routing
stop on stopping ifup
console logged
exec /usr/sbin/syslogd -n -m 0
respawn

16
etc/event.d/tty1 Normal file
View File

@ -0,0 +1,16 @@
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /sbin/agetty /dev/tty1 9600

17
etc/event.d/tty2 Normal file
View File

@ -0,0 +1,17 @@
# tty2 - getty
#
# This service maintains a getty on tty2 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 5
stop on runlevel 6
respawn
exec /sbin/agetty /dev/tty2 9600

16
etc/event.d/tty3 Normal file
View File

@ -0,0 +1,16 @@
# tty3 - getty
#
# This service maintains a getty on tty3 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /sbin/agetty /dev/tty3 9600

16
etc/event.d/tty4 Normal file
View File

@ -0,0 +1,16 @@
# tty4 - getty
#
# This service maintains a getty on tty4 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /sbin/agetty /dev/tty4 9600

16
etc/event.d/tty5 Normal file
View File

@ -0,0 +1,16 @@
# tty5 - getty
#
# This service maintains a getty on tty5 from the point the system is
# started until it is shut down again.
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn
exec /sbin/agetty /dev/tty5 9600

8
etc/event.d/tty6 Normal file
View File

@ -0,0 +1,8 @@
# tty6 - getty
#
# This service maintains a getty on tty6 from the point the system is
# started until it is shut down again.
start on started udev
respawn
exec /sbin/agetty /dev/tty6 9600

27
etc/event.d/udev Normal file
View File

@ -0,0 +1,27 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started mountfs
stop on stopping mountfs
pre-start script
source /etc/udev/udev.conf
prog=udev
sysfs_dir=/sys
bin=/sbin/udev
udevd=/sbin/udevd
udev_root=/dev
if [ ! -d $sysfs_dir/block ]; then
exit 1
fi
export ACTION=add
touch /var/lock/subsys/udev
end script
exec /sbin/udevd
post-stop script
rm /var/lock/subsys/udev
end script

42
etc/event.d/udevstart Normal file
View File

@ -0,0 +1,42 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on start udev
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
if [ -f /sbin/udevstart ]; then
. /etc/init.d/functions
. /etc/udev/udev.conf
prog=udev
szsfs_dir=/sys
bin=/lib/udev
udevd=/sbin/udevd
udev_root=/dev
echo "Bringing udev system up"
echo -n "mounting sys"
mount -t sysfs none /sys
evaluate_retval
echo -n ".../var/lock"
if [ ! -d /var/lock/subsys ]; then
mkdir /var/lock/subsys
fi
if [ ! -d $udev_root ]; then
mkdir $udev_root
fi
evaluate_retval
echo -n ".../dev "
mount -t tmpfs none /dev
evaluate_retval
export ACTION=add
echo -n "Creating initial udev device nodes"
/sbin/udevstart
mkdir /dev/pts
fi
end script

8
etc/event.d/udevtrigger Normal file
View File

@ -0,0 +1,8 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started udev
exec /sbin/udevtrigger

44
etc/event.d/varmake Normal file
View File

@ -0,0 +1,44 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on varmake
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
echo -n "Mounting tmpfs on /var"
mount -t tmpfs none /var
evaluate_retval
echo -n "Getting Hostname ..."
ifconfig|\
grep Protokoll|\
awk '{ if ( $2 == "Protokoll:Ethernet" ) print $1 }' >/var/devices
for i in `cat /var/devices`; do
INET=`ifconfig $i|\
grep inet|\
awk -F ":" '{print $2}'|\
awk '{print $1}'`
ANET=`echo $INET|awk -F "." '{print $1}'`
if [ ! "$ANET" == "127" ]; then
HOSTNAME=`getent hosts $INET`
HOSTNAME=`echo $HOSTNAME|\
awk '{print $2}'|\
awk -F "." '{print $1}'`
break
fi
done
echo -n " $HOSTNAME"
evaluate_retval
echo -n "Restoring var folder"
cd /var
tar -zxf /boot/var_${HOSTNAME}.tgz
echo $HOSTNAME >etc/sysconfig/nodename
cd -
evaluate_retval
/sbin/initctl emit start udev
end script

29
etc/event.d/virtualfs Normal file
View File

@ -0,0 +1,29 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
start on stopped udevstart
#stop on runlevel
# Note: there can be no previous runlevel here, if we have one it's bad
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc
# without information so that it defaults to previous=N runlevel=S.
console output
script
source /etc/init.d/functions
echo -n "Changing state of rootfs to rw"
/bin/mount -n -o remount,rw /
evaluate_retval
echo >/dev/mtab
/bin/mount -f -o remount,rw /
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab`
if [ "$DEVICE" == "none" ]; then
echo -n "Mounting $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
fi
done
end script

21
etc/event.d/ypclient Normal file
View File

@ -0,0 +1,21 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
start on started rpc
stop on stopping rpc
console output
pre-start script
if [ -f /etc/sysconfig/nis/defaultdomain ]; then
domainname `cat /etc/sysconfig/nis/defaultdomain`
/usr/sbin/ypbind
sleep 2
fi
end script
post-stop script
pkill ypbind
end script

416
etc/init.d/functions Executable file
View File

@ -0,0 +1,416 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /export/Data/cvs/Viitor_sysvinit/etc/init.d/functions,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#InitScript zum Start des Daemons:
#Funktionen für die init scripten
#Dieses Script basiert auf der Vorlage des Linuxfromscratch Projetes
#
#Letzte Änderung von: $Author: kueller $
#Datum der letzten Änderung: $Date: 2004/03/03 12:48:07 $
#Version der Datei: $Revision: 1.12 $
#
#$Log: functions,v $
#Revision 1.12 2004/03/03 12:48:07 kueller
#Header auf neuen Viitor GPL Header umgestellt
#
#
#Revision 1.11 2002/09/30 20:32:22 kueller
#Korrektur der Funktion getmasks - bei nichtvorhandener /etc/netmasks
#bricht die Funktion mit einem [] Fehler ab. Variable FOUND wurde
#in diesem Fall nicht gesetzt. Fehler behoben
#
#Revision 1.10 2002/09/23 20:22:09 hkueller
#Anpassung der Funktionen an BASH - dazu musste jedes typeset kommando
#entfernt werden, da bash keine zahlenumrechnung kann. Durch Neue Funktion
#GetShortMask problem mit short mask angabe bei ip kommando ohne verwendung
#von umrechnungsfunktionen gelöst.
#
#Revision 1.9 2002/09/11 18:16:05 hkueller
#Korrekturen bei der netzmask erkennung unter zsh
#
#Revision 1.8 2002/08/09 07:00:00 hkueller
#getmask vereinfacht und beschleunigt
#
#Revision 1.6 2002/05/05 14:40:08 hkueller
#mit neuem Release wandert basename von /usr/bin nach /bin. functions
#entsprechend angepasst
#
#Revision 1.5 2002/02/05 02:59:04 hkueller
#functions: getbroadcast() hinzugefuegt - gibt broadcast eines Netzes
# zurueck - Aufruf: getbroadcast <IP> <NETMASK>
# getmask erweitert - keine mask in /etc/netmasks ->
# defaultmask (Class A/B/C)
#networks: Ueberfaelliger eintrag fuer PTP entfernt
# Eintraege zur Konfiguration mit ifconfig hinzugefuegt - aber
# auskommentiert.
#
#Revision 1.4 2001/11/18 21:25:52 kueller
#Korrektur der Aufräumfunktion (sed Regulare Expression) für /etc/netmasks
#(getmask funktion)
#
#Revision 1.3 2001/11/17 23:41:35 kueller
#Network Setup erweitert. Netmasks werden jetzt aus /etc/netmasks erkannt.
#Konfiguration der Netmask in /etc/sysconfig/hostname.<if> nicht mehr
#notwendig!
#
#Revision 1.2 2001/11/17 22:20:33 kueller
#Funktionen dectohex und dectobin zur Umrechnung von dezimalen IP Adressen in
#Binäre bzw. Dezimale Darstellung hinzugefügt.
#Achtung: Diese Funktione funktionieren nur in Verbindung mit der zsh oder
#eine ksh - nicht mit sh oder bash!!!!
#
#Revision 1.1.1.1 2001/09/23 00:02:08 kueller
#Neustart wg. Datenverlust
#
#Revision 1.2 2001/08/25 10:14:28 kueller
#
#Optische Retusche der READY und FAILED Meldungen
#
#Revision 1.1.1.1 2001/08/08 10:02:32 kueller
#sysvinit addons
#
#
if [ "$COLUMNS" ]; then
(( COL = $COLUMNS - 10 ))
else
COL=70
fi
SET_COL="/bin/echo -en \\033[${COL}G"
NORMAL="/bin/echo -en \\033[0;39m"
SUCCESS="/bin/echo -en \\033[1;42m"
FAILURE="/bin/echo -en \\033[1;41m"
evaluate_retval()
{
if [ $? = 0 ]
then
print_status success
else
print_status failure
fi
}
print_status()
{
if [ $# = 0 ]
then
echo "Usage: print_status {success|failure}"
exit 1
fi
case "$1" in
success)
$SET_COL
$SUCCESS
echo -n " READY "
$NORMAL
echo ""
;;
failure)
$SET_COL
$FAILURE
echo -n " FAILED "
$NORMAL
echo ""
;;
esac
}
loadproc()
{
if [ $# = 0 ]
then
echo "Usage: loadproc {program}"
exit 1
fi
base=`/bin/basename $1`
pidlist=`/bin/pidof -o $$ -o $PPID -o %PPID -x $base`
pid=""
for apid in $pidlist
do
if [ -d /proc/$apid ]
then
pid="$pid $apid"
fi
done
if [ ! -n "$pid" ]
then
$*
evaluate_retval
else
print_status failure
fi
}
killproc()
{
if [ $# = 0 ]
then
echo "Usage: killproc {program} [signal]"
exit 1
fi
base=`/bin/basename $1`
if [ "$2" != "" ]
then
killlevel=$2
else
nolevel=1
fi
pidlist=`/bin/pidof -o $$ -o $PPID -o %PPID -x $base`
pid=""
for apid in $pidlist
do
if [ -d /proc/$apid ]
then
pid="$pid $apid"
fi
done
if [ -n "$pid" ]
then
if [ "$nolevel" = 1 ]
then
/bin/kill -TERM $pid
if ps h $pid >/dev/null 2>&1
then
/bin/kill -KILL $pid
fi
/bin/ps h $pid >/dev/null 2>&1
if [ $? = 0 ]
then
print_status failure
else
/bin/rm -f /var/run/$base.pid
print_status success
fi
else
/bin/kill $killlevel $pid
/bin/ps h $pid >/dev/null 2>&1
if [ $? = 0 ]
then
print_status failure
else
/bin/rm -f /var/run/$base.pid
print_status success
fi
fi
else
print_status failure
fi
}
reloadproc()
{
if [ $# = 0 ]
then
echo "Usage: reloadproc {program} [signal]"
exit 1
fi
base=`/bin/basename $1`
if [ -n "$2" ]
then
killlevel=-$2
else
nolevel=1
fi
pidlist=`/bin/pidof -o $$ -o $PPID -o %PPID -x $base`
pid=""
for apid in $pidlist
do
if [ -d /proc/$apid ]
then
pid="$pid $apid"
fi
done
if [ -n "$pid" ]
then
if [ "$nolevel" = 1 ]
then
/bin/kill -SIGHUP $pid
evaluate_retval
else
/bin/kill -$killlevel $pid
evaluate_retval
fi
else
print_status failure
fi
}
statusproc()
{
if [ $# = 0 ]
then
echo "Usage: status {program}"
return 1
fi
pid=`/bin/pidof -o $$ -o $PPID -o %PPID -x $1`
if [ -n "$pid" ]
then
echo "$1 running with Process ID $pid"
return 0
fi
if [ -f /var/run/$1.pid ]
then
pid=`/usr/bin/head -1 /var/run/$1.pid`
if [ -n "$pid" ]
then
echo "$1 not running but /var/run/$1.pid exists"
return 1
fi
else
echo "$i is not running"
fi
}
getbroadcast() {
IP=$1
MASK=$2
for i in 1 2 3 4; do
IP[$i]=`echo $IP|awk -F. '{print $'$i'}'`
MASK[$i]=`echo $MASK|awk -F. '{print $'$i'}'`
(( BCAST[$i] = ${IP[$i]} | (( ${MASK[$i]} ^ 255 )) ))
done
echo ${BCAST[1]}.${BCAST[2]}.${BCAST[3]}.${BCAST[4]}
}
getnetaddr() {
IP=$1
MASK=$2
for i in 1 2 3 4; do
IPS=`echo $IP|awk -F. '{print $'$i'}'`
MASKS=`echo $MASK|awk -F. '{print $'$i'}'`
(( BCASTS = $IPS & $MASKS ))
if [ "$i" = "4" ]; then
printf "$BCASTS"
else
printf "$BCASTS."
fi
done
echo
}
getmask() {
IP=$1
FOUND=0
if [ -f /etc/netmasks ]; then
sed -e "/^#/d" /etc/netmasks |\
sed -e "/^ *$/d" >/tmp/if
while read NETADDR NETMASK; do
NETIP=`getnetaddr $IP $NETMASK`
if [ "$NETADDR" = "$NETIP" ]; then
echo $NETMASK
FOUND=1
break
fi
done </tmp/if
rm /tmp/if
fi
if [ "$FOUND" -eq "0" ]; then
Byte=`echo $IP|awk -F . '{ print $1 }'`
if [ "$Byte" -le 127 ] && [ "$Byte" -ge 1 ]; then
echo "255.0.0.0"
elif [ "$Byte" -le 191 ] && [ "$Byte" -ge 128 ]; then
echo "255.255.0.0"
elif [ "$Byte" -le 223 ] && [ "$Byte" -ge 192 ]; then
echo "255.255.255.0"
else
echo "255.255.255.255"
fi
fi
}
GetShortMask () {
IP=$1
NumIP=0
for i in 1 2 3 4; do
Byte=`echo $IP|awk -F . '{ print $'$i' }'`
if (( "$Byte" & 128 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 64 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 32 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 16 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 8 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 4 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 2 )); then
(( NumIP = $NumIP + 1 ))
fi
if (( "$Byte" & 1 )); then
(( NumIP = $NumIP + 1 ))
fi
done
echo $NumIP
}
initautomount() {
MOUNTSOURCE=$1
AUTOMOUNTSOURCE=$2
source /etc/sysconfig/autofstime
sed -e '/^#/d' |\
sed -e '/^ *$/d' >/tmp/autofs
exec 3</tmp/autofs
while read <&3 MOUNTPOINT FILE; do
echo -n "starting automount for $MOUNTPOINT ($MOUNTSOURCE)"
automount -t $TIMEOUT $MOUNTPOINT $AUTOMOUNTSOURCE,sun $FILE
evaluate_retval
done
exec 3>&-
rm /tmp/autofs
}
# End /etc/init.d/functions

56
sbin/if_down Executable file
View File

@ -0,0 +1,56 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /Data/cvs/ViitorMake/templates/Script.template,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#Script:if_up
#
#Letzte Änderung von: $Author: $
#Datum der letzten Änderung: $Date: $
#Version der Datei: $Revision: $
#
#$Log: $
#
source /etc/init.d/functions
DEV=$1
if [ ! "$DEV" ]; then
echo "Usage: $0 <NetworkInterfaceName>"
exit 10
fi
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
kill `ps -ef|grep dhclient|grep eth0|awk '{print $2}'`
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
IP=`grep $HOST /etc/hosts|awk '{print $1}'`
NETMASK=`getmask $IP`
SHMASK=`GetShortMask $NETMASK`
echo -n "setting up interface $i:IP=$IP NMASK=$NETMASK"
if [ "$NETMASK" = "" ]; then
DEV=`echo $i|cut -d ":" -f 1`
$DEBUG ip addr del $IP broadcast + dev $DEV
$DEBUG ip link set $DEV down
else
DEV=`echo $i|cut -d ":" -f 1`
$DEBUG ip addr del $IP/$SHMASK broadcast + dev $DEV
$DEBUG ip link set $DEV down
fi
evaluate_retval
fi

56
sbin/if_up Executable file
View File

@ -0,0 +1,56 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /Data/cvs/ViitorMake/templates/Script.template,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#Script:if_up
#
#Letzte Änderung von: $Author: $
#Datum der letzten Änderung: $Date: $
#Version der Datei: $Revision: $
#
#$Log: $
#
source /etc/init.d/functions
DEV=$1
if [ ! "$DEV" ]; then
echo "Usage: $0 <NetworkInterfaceName>"
exit 10
fi
if [ -f /etc/sysconfig/net/${DEV}.dhcp ]; then
dhclient -q ${DEV}
elif [ -f /etc/sysconfig/net/hostname.${DEV} ]; then
HOST=`cat /etc/sysconfig/net/hostname.${DEV}|awk '{print $1}'`
IP=`grep $HOST /etc/hosts|awk '{print $1}'`
NETMASK=`getmask $IP`
SHMASK=`GetShortMask $NETMASK`
echo -n "setting up interface $i:IP=$IP NMASK=$NETMASK"
if [ "$NETMASK" = "" ]; then
DEV=`echo $i|cut -d ":" -f 1`
$DEBUG ip addr add $IP broadcast + dev $DEV
$DEBUG ip link set $DEV up
else
DEV=`echo $i|cut -d ":" -f 1`
$DEBUG ip addr add $IP/$SHMASK broadcast + dev $DEV
$DEBUG ip link set $DEV up
fi
evaluate_retval
fi

75
sbin/wlan_setup Executable file
View File

@ -0,0 +1,75 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.compuextreme.de:/Data/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source: /export/Data/cvs/Viitor_wireless/etc/init.d/wireless,v $
#
#(c) 2003 Harald Kueller, Germany
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#Script:wlan_setup
#Setup eines WLAN Interfaces per accesspoint config files in
#/etc/sysconfig/wlan/<apname>
#
#Letzte Änderung von: $Author$
#Datum der letzten Änderung: $Date$
#Version der Datei: $Revision$
#
#$Log: wireless,v $
#Revision 1.1.1.1 2004/12/05 13:10:59 kueller
#New Package wireless
#
#
source /etc/init.d/functions
DEV=$1
if [ ! "$DEV" ]; then
echo "usage: $0 <WireLessLanDevice>"
exit 1
fi
if [ ! -d /sys/class/net/$DEV/wireless ]; then
echo "No Wireless Device"
exit 2
fi
for AP in `iwlist $DEV scan 2>/dev/null|\
grep ESSID|\
cut -d":" -f 2-`; do
AP=`echo $AP|sed -e "s/\"//g"`
if [ -f /etc/sysconfig/wlan/$AP ]; then
echo -n "Binding Wireless Network to AP $AP"
$DEBUG iwconfig $DEV essid $AP
evaluate_retval
sed -e "/^#/d" /etc/sysconfig/wlan/$AP | \
sed -e "/^ *$/d" >/tmp/AP
exec 3</tmp/AP
read <&3 OPTION ARG1 ARG2
while [ $OPTION ]; do
case $OPTION in
KEY)
echo -n "Configuring Wireless Interface KEY"
$DEBUG iwconfig $DEV key $ARG1 $ARG2
;;
TXPOWER)
echo -n "Configuring txpower to $ARG1"
$DEBUG iwconfig $DEV txpower $ARG1
;;
esac
read <&3 OPTION ARG1 ARG2
done
exec 3>&-
rm /tmp/AP
fi
done

35
tmp/postinstall Normal file
View File

@ -0,0 +1,35 @@
cd /etc/init.d
for i in 0 1 2 3 4 5 6; do
cd rc$i.d
if [ ! -d upstart_disabled ]; then
mkdir upstart_disabled
fi
if [ -h S03sysklogd ]; then
mv S03sysklogd upstart_disabled/S03sysklogd
fi
if [ -h S04hotplug ]; then
mv S04hotplug upstart_disabled/S04hotplug
fi
if [ -h S05loadmodules ]; then
mv S05loadmodules upstart_disabled/S05loadmodules
fi
if [ -h S05udev ]; then
mv S05udev upstart_disabled/S05udev
fi
if [ -h S08wireless ]; then
mv S08wireless upstart_disabled/S08wireless
fi
if [ -h S09localnet ]; then
mv S09localnet upstart_disabled/S09localnet
fi
if [ -h S10dhcpclient ]; then
mv S10dhcpclient upstart_disabled/S10dhcpclient
fi
if [ -h S10networks ]; then
mv S10networks upstart_disabled/S10networks
fi
if [ -h S13ypclient ]; then
mv S13ypclient upstart_disabled/S13ypclient
fi
cd ..
done