Neue erst versionen für den einsatz von upstart als std init prozess

git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_upstart@5506 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2010-04-20 12:58:29 +00:00
parent c90b7d0eb4
commit 9df088532e
30 changed files with 257 additions and 407 deletions

View File

@ -1,20 +1,14 @@
# rcS - runlevel compatibility description "Check Filesystems"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped initlvm 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 console output
script script
source /etc/event.d/functions echo "running checkfs"
source /etc/init/functions
if [ -f /fastboot ]; then if [ -f /fastboot ]; then
echo "Fast boot, no file system check" echo "Fast boot, no file system check"
else else

View File

@ -1,22 +1,24 @@
# rcS - runlevel compatibility description "Check if / ist nfs"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits varmake startudev
start on startup start on startup
#stop on runlevel
description "Check if / ist nfs"
author "Harald Kueller <harald.kueller@compuextreme.de>"
console output console output
script script
echo "Starting checkvar script"
source /etc/init/functions
mount -t proc none /proc mount -t proc none /proc
status_message "/proc mounted"
if mount|grep /dev/root|grep nfs &>/dev/null; then if mount|grep /dev/root|grep nfs &>/dev/null; then
/sbin/initctl emit varmake /sbin/initctl emit varmake
status_message "emitting varmake"
else else
umount /proc umount /proc
mount -t tmpfs none /var/lock mount -t tmpfs none /var/lock
/sbin/initctl emit start udev /sbin/initctl emit startudev
status_message "emitting startudev"
fi fi
end script end script

View File

@ -1,9 +1,12 @@
# control-alt-delete - emergency keypress handling # control-alt-delete - emergency keypress handling
# #
# This task is run whenever the Control-Alt-Delete key combination is # This task is run whenever the Control-Alt-Delete key combination is
# pressed. Usually used to shut down the machine. # pressed, and performs a safe reboot of the machine.
description "emergency keypress handling"
author "Scott James Remnant <scott@netsplit.com>"
start on control-alt-delete start on control-alt-delete
emit shutdown task
exec /sbin/shutdown -t1 -a -r now "Control-Alt-Delete pressed" exec shutdown -r now "Control-Alt-Delete pressed"

View File

@ -117,11 +117,12 @@ status_message() {
echo "Usage: status_message <Message>" echo "Usage: status_message <Message>"
fi fi
echo -n $Message echo -n $Message
if [ $? = 0 ]; then if [ $STATUS = 0 ]; then
print_status success print_status success
else else
print_status failure print_status failure
fi fi
return 0
} }
@ -412,20 +413,3 @@ GetShortMask () {
done done
echo $NumIP 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
status_message "automount is ..."
done
exec 3>&-
rm /tmp/autofs
}
# End /etc/init.d/functions

View File

@ -1,17 +1,14 @@
# rcS - runlevel compatibility description "Setup System Hostname"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped udevstart start on ( runlevel [S012345] and ( started udev ))
#stop on runlevel console none
# 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 script
source /etc/event.d/functions echo "setting up hostname"
source /etc/init/functions
if [ -f /etc/sysconfig/nodename ]; then if [ -f /etc/sysconfig/nodename ]; then
/bin/hostname `cat /etc/sysconfig/nodename` /bin/hostname `cat /etc/sysconfig/nodename`
status_message "Hostname set to $HOSTNAME" status_message "Hostname set to $HOSTNAME"

View File

@ -1,16 +1,16 @@
# rc - runlevel compatibility description "Startup Hotplug Service"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started udev start on started udev
script script
source /etc/event.d/functions echo "starting hotplug scripts"
source /etc/init/functions
for RC in /etc/hotplug/*.rc; do for RC in /etc/hotplug/*.rc; do
$RC start $RC start
done done
touch /var/lock/subsys/hotplug touch /var/lock/subsys/hotplug
echo -n "starting of hotplug" status_message "hotplug startup ready"
print_status success
end script end script

View File

@ -1,58 +1,17 @@
# rc - runlevel compatibility description "Setup all configured Network Interfaces"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on stopped maccfg start on ( runlevel [2345] and (stopped maccfg))
stop on stopping mountfs
console logged console output
pre-start script
WAITTIME=7
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
ifconfig $DEVNAME up
ZAHLER=0
if ! ethtool $DEVNAME|grep -q "No data available"; then
while [ ${ZAHLER} -le ${WAITTIME} ]; do
if [ `ethtool $DEVNAME|grep Link|awk '{print $3}'` == "yes" ]; then
(( ZAHLER++ ))
else
break
fi
sleep 1
done
fi
fi
ifconfig $DEVNAME up
ZAHLER=0
while [ ${ZAHLER} -le ${WAITTIME} ]; do
if [ "`cat /sys/class/net/$DEVNAME/carrier`" == "0" ]; then
(( ZAHLER++ ))
else
break
fi
sleep 1
done
end script
script script
for IF in `ld -d /sys/class/net/*[^lo]`; do echo "Configuring network"
for IF in `ls -d /sys/class/net/*[^lo]`; do
DEVNAME=`basename $IF` DEVNAME=`basename $IF`
if [ -f /usr/sbin/ethtool ]; then /sbin/if_up $DEVNAME
DEVSTATUS=`ethtool $DEVNAME|grep Link|awk '{print $3}'`
fi
if [ "$DEVSTATUS" == "yes" ] || [ `cat /sys/class/net/$DEVNAME/carrier` == "1" ]; then
/sbin/if_up $DEVNAME
touch /var/run/net_up
fi
done done
end script end script
@ -73,10 +32,3 @@ post-start script
fi fi
fi fi
end script 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

View File

@ -1,27 +1,19 @@
# rcS - runlevel compatibility description "Initialize Logical Volume Manager (LVM)"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped virtualfs 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 console output
script script
source /etc/event.d/functions echo "Initializing volumes"
source /etc/init/functions
if [ -f /sbin/vgscan ]; then if [ -f /sbin/vgscan ]; then
/sbin/vgscan >/dev/null 2>&1 /sbin/vgscan >/dev/null 2>&1
status_message "Scanning of Volumes....." status_message "Scanning of Volumes....."
for i in `vgdisplay|grep "VG Name"|awk '{print $3}'`; do for i in `vgdisplay|grep "VG Name"|awk '{print $3}'`; do
vgchange -a -y $i vgchange -a y $i
status_message "Volume Aktivation of $i ..." status_message "Volume Aktivation of $i ..."
done done
fi fi

View File

@ -1,11 +1,13 @@
# rc - runlevel compatibility description "Startup Kernel Logging daemon"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started mountfs start on ( runlevel [12345] and (stopped mountfs))
stop on stopping mountfs stop on ( runlevel [S06] and stopping udev))
console logged pre-start script
echo "Starting kernel log daemon"
end script
exec /usr/sbin/klogd -n -f /var/log/kern.log exec /usr/sbin/klogd -n -f /var/log/kern.log

View File

@ -1,17 +1,14 @@
# rcS - runlevel compatibility description "Load System default Keymap"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on started mountfs start on stopped 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 console output
script script
source /etc/event.d/functions echo "Loading Keymap"
source /etc/init/functions
if [ -f /etc/sysconfig/kbd/setkeys ]; then if [ -f /etc/sysconfig/kbd/setkeys ]; then
exec 3</etc/sysconfig/kbd/setkeys exec 3</etc/sysconfig/kbd/setkeys
while read <&3 CODE MAP; do while read <&3 CODE MAP; do
@ -20,6 +17,6 @@ script
status_message "Load of Special kbd mappings..." status_message "Load of Special kbd mappings..."
exec 3>&- exec 3>&-
fi fi
/bin/loadkeys -d >/dev/null /usr/bin/loadkeys -d >/dev/null
status_message "Load Keymap ..." status_message "Loaded Keymap ..."
end script end script

View File

@ -1,13 +1,13 @@
# rc - runlevel compatibility description "Force load of special Modules defined in /etc/sysconfig/loadmods"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started udev start on ( runlevel [S012345] and ( started udev )
stop on stopping udev
pre-start script pre-start script
source /etc/event.d/functions echo "Loading additional modules"
source /etc/init/functions
if [ -f /etc/sysconfig/loadmods ]; then if [ -f /etc/sysconfig/loadmods ]; then
sed -e "/^#/d" /etc/sysconfig/loadmods | sed -e "/^#/d" /etc/sysconfig/loadmods |
sed -e "/^ *$/d" >/tmp/loadmods sed -e "/^ *$/d" >/tmp/loadmods
@ -19,25 +19,3 @@ pre-start script
rm /tmp/loadmods rm /tmp/loadmods
fi fi
end script 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

View File

@ -1,24 +1,15 @@
# rcS - runlevel compatibility description "Loopback Network Setup"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped udevstart start on ( runlevel [S012345] and ( started udev ))
#stop on runlevel console output
console logged script
echo "Setting up localhost"
# Note: there can be no previous runlevel here, if we have one it's bad source /etc/init/functions
# information (we enter rc1 not rcS for maintenance). Run /etc/init.d/rc /sbin/ifconfig lo 127.0.0.1 up
# without information so that it defaults to previous=N runlevel=S.
pre-start script
source /etc/event.d/functions
/sbin/ifconfig lo 127.0.0.1
status_message "Setup local net..." status_message "Setup local net..."
end script end script
post-stop script
source /etc/event.d/functions
/sbin/ifconfig lo down
status_message "Remove Local Net..."
end script

View File

@ -12,5 +12,9 @@ stop on runlevel 6
console output console output
exec /sbin/logd post-start script
echo "Starting logd"
end script
respawn respawn
exec /sbin/logd

View File

@ -1,14 +1,15 @@
# rc - runlevel compatibility description "Special MAC Address Setup based on /etc/mactab*"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started loadmodules start on ( runlevel [2345] and (stopped mountfs))
console logged console output
script script
if ls /etc/mactab* &>/dev/null; then if ls /etc/mactab* &>/dev/null; then
echo "Setting up mac adresses"
for maccfg in /etc/mactab*; do for maccfg in /etc/mactab*; do
nameif -c $maccfg >/dev/null nameif -c $maccfg >/dev/null
done done

View File

@ -1,22 +1,13 @@
# rcS - runlevel compatibility description "Mounting all Filesystem not depending on Network"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped checkfs 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 console output
pre-start script script
source /etc/event.d/functions source /etc/init/functions
echo -n "Remounting rootfs in rw mode..." echo -n "Remounting rootfs in rw mode..."
/bin/mount -n -o remount,rw / /bin/mount -n -o remount,rw /
evaluate_retval evaluate_retval
@ -34,21 +25,13 @@ pre-start script
&& [ ! "$FILESYSTEM" == "swap" ] \ && [ ! "$FILESYSTEM" == "swap" ] \
&& [ ! "$MOUNTPOINT" == "/" ] \ && [ ! "$MOUNTPOINT" == "/" ] \
&& [ ! "$DEVICE" == "none" ]; then && [ ! "$DEVICE" == "none" ]; then
echo -n "Mounting $MOUNTPOINT" if [ -d $MOUNTPOINT ]; then
mount $MOUNTPOINT echo -n "Mounting $MOUNTPOINT"
evaluate_retval mount $MOUNTPOINT
evaluate_retval
else
echo "Mountpoint $MOUNTPOINT not existing!"
fi
fi fi
done done
end script end script
post-stop script
source /etc/event.d/functions
echo -n "Deactivating swap..."
/sbin/swapoff -a
evaluate_retval
echo -n "Unmounting file systems..."
/bin/umount -a -r
evaluate_retval
end script

View File

@ -1,15 +1,14 @@
# rc - runlevel compatibility description "Mounting NFS Filesystems"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started nfsclient start on ( runlevel [2345] and (started nfsclient))
stop on stopping nfsclient
console output console output
pre-start script script
source /etc/event.d/functions source /etc/init/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab` FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
@ -19,15 +18,3 @@ pre-start script
fi fi
done done
end script end script
post-stop script
source /etc/event.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
umount $MOUNTPOINT
status_message "umount NFS Filesystem from $MOUNTPOINT"
fi
done
end script

View File

@ -1,17 +1,13 @@
# rcS - runlevel compatibility description "Special Handling for nfs / (root) Filesystem"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on varmake 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 console output
script script
source /etc/event.d/functions source /etc/init/functions
mount -t tmpfs none /var mount -t tmpfs none /var
status_message "Mount tmpfs on /var" status_message "Mount tmpfs on /var"
ifconfig|\ ifconfig|\

View File

@ -1,14 +1,14 @@
# rc - runlevel compatibility description "Setup Routing depending on several config files"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started ifup start on stopped ifup
console logged console output
script script
source /etc/event.d/functions source /etc/init/functions
if [ ! -f /etc/sysconfig/net/notrouter ]; then if [ ! -f /etc/sysconfig/net/notrouter ]; then
echo "Configuring System with routing allowed" echo "Configuring System with routing allowed"
if [ -f /etc/sysconfig/net/gateways ]; then if [ -f /etc/sysconfig/net/gateways ]; then

View File

@ -1,17 +1,13 @@
# rcS - runlevel compatibility description "Set Clock from hw System clock"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on started mountfs start on ( runlevel [12345] and (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 console output
script script
source /etc/event.d/functions source /etc/init/functions
CLOCKPARAMS="--hctosys" CLOCKPARAMS="--hctosys"
case "$UTC" in case "$UTC" in
yes|true|1) yes|true|1)

View File

@ -1,11 +1,15 @@
# rc - runlevel compatibility description "Startup Syslog"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on stopped routing start on ( runlevel [12345] and (stopped routing))
stop on stopping ifup stop on (runlevel [S06] and stopping udev)
console output
pre-start script
echo "Starting syslog"
end script
console logged
exec /usr/sbin/syslogd -n -m 0 exec /usr/sbin/syslogd -n -m 0
respawn respawn

View File

@ -1,16 +1,10 @@
# tty1 - getty description "Startup login getty on tty1"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty1 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on runlevel 2 start on runlevel [2345]
start on runlevel 3 stop on runlevel [016]
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn respawn
exec /sbin/agetty /dev/tty1 9600 exec /sbin/agetty /dev/tty1 9600

View File

@ -1,17 +1,10 @@
# tty2 - getty description "Startup login getty on tty2"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty2 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on runlevel 2 start on ( runlevel [2345] and ( started udev ))
start on runlevel 3 stop on ( runlevel [S016] and ( stopping udev ))
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 respawn
exec /sbin/agetty /dev/tty2 9600 exec /sbin/agetty /dev/tty2 9600

View File

@ -1,16 +1,10 @@
# tty3 - getty description "Startup login getty on tty3"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty3 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on runlevel 2 start on ( runlevel [2345] and (started udev))
start on runlevel 3 stop on ( runlevel [S016] and (stopping udev))
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn respawn
exec /sbin/agetty /dev/tty3 9600 exec /sbin/agetty /dev/tty3 9600

View File

@ -1,16 +1,10 @@
# tty4 - getty description "Startup login getty on tty4"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty4 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on runlevel 2 start on ( runlevel [2345] and (started udev))
start on runlevel 3 stop on ( runlevel [S016] and (stopping udev))
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn respawn
exec /sbin/agetty /dev/tty4 9600 exec /sbin/agetty /dev/tty4 9600

View File

@ -1,16 +1,10 @@
# tty5 - getty description "Startup login getty on tty5"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty5 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on runlevel 2 start on ( runlevel [2345] and (started udev))
start on runlevel 3 stop on ( runlevel [S016] and (stopping udev))
start on runlevel 4
start on runlevel 5
stop on runlevel 0
stop on runlevel 1
stop on runlevel 6
respawn respawn
exec /sbin/agetty /dev/tty5 9600 exec /sbin/agetty /dev/tty5 9600

View File

@ -1,8 +1,10 @@
# tty6 - getty description "Startup login getty on tty6"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This service maintains a getty on tty6 from the point the system is version 1.0
# started until it is shut down again. emits none special
start on ( runlevel [2345] and (started udev))
#stop on ( runlevel [S016] and (stopping udev))
start on started udev
respawn respawn
exec /sbin/agetty /dev/tty6 9600 exec /sbin/agetty /dev/tty6 9600

View File

@ -1,27 +1,48 @@
# rc - runlevel compatibility description "Staring udevdaemon to create all the /dev entrys"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started mountfs start on startudev
stop on stopping mountfs stop on runlevel [06]
console output
pre-start script pre-start script
source /etc/udev/udev.conf source /etc/init/functions
prog=udev echo "Starting udev"
sysfs_dir=/sys mount -t sysfs none /sys
bin=/sbin/udev status_message "udev: mount sysfs"
udevd=/sbin/udevd if [ ! -d /var/lock/subsys ]; then
udev_root=/dev mkdir /var/lock/subsys
if [ ! -d $sysfs_dir/block ]; then fi
exit 1 if [ ! -d /dev ]; then
fi mkdir /dev
export ACTION=add fi
touch /var/lock/subsys/udev mount -n -t tmpfs -o mode=0755 udev /dev
status_message "udev: tmpfs on /dev created"
if [ -d /lib/udev/devices ]; then
cp --preserve=all --recursive --remove-destination /lib/udev/devices/* /dev
status_message "udev: Static entries copied..."
fi
/bin/mkdir /dev/shm
/bin/mount -n -t tmpfs -o mode=1755 none /dev/shm
status_message "udev: generation of /dev/shm done"
/bin/mknod /dev/null c 1 3
/bin/chmod 666 /dev/null
/bin/mknod /dev/console c 5 1
status_message "udev: permissions on /dev/shm corrected..."
echo "udev:pre-start end with rc $?"
end script end script
respawn
exec /sbin/udevd exec /sbin/udevd
post-stop script post-start script
rm /var/lock/subsys/udev source /etc/init/functions
/bin/mkdir -p /dev/.udev/queue
status_message "udev: queue maked"
/sbin/udevadm trigger
status_message "udev: trigger done"
/sbin/udevadm settle
status_message "udev: Coldplug ready..."
end script end script

View File

@ -1,11 +1,10 @@
# rcS - runlevel compatibility description "Make special handling for ro nfs root"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on varmake start on varmake
#stop on runlevel
console output console output
script script
source /etc/init.d/functions source /etc/init.d/functions
@ -35,5 +34,5 @@ script
echo $HOSTNAME >etc/sysconfig/nodename echo $HOSTNAME >etc/sysconfig/nodename
cd - cd -
status_message "Restore of var Filesystem..." status_message "Restore of var Filesystem..."
/sbin/initctl emit start udev /sbin/initctl emit startudev
end script end script

View File

@ -1,17 +1,13 @@
# rcS - runlevel compatibility description "Mount all Virtual Filesystems like /proc /sys /tmp.."
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task runs the old sysv-rc startup scripts. version 1.0
emits none special
start on stopped udevstart start on started 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 console output
script script
source /etc/event.d/functions source /etc/init/functions
/bin/mount -n -o remount,rw / /bin/mount -n -o remount,rw /
status_message "Changing state of rootfs to rw" status_message "Changing state of rootfs to rw"
echo >/dev/mtab echo >/dev/mtab
@ -20,8 +16,12 @@ script
MOUNTPOINT=$i MOUNTPOINT=$i
DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab` DEVICE=`awk '{if( $2 == "'$MOUNTPOINT'") print $1}' /etc/fstab`
if [ "$DEVICE" == "none" ]; then if [ "$DEVICE" == "none" ]; then
mount $MOUNTPOINT if [ -d $MOUNTPOINT ]; then
status_message "Mounting $MOUNTPOINT ..." mount $MOUNTPOINT
status_message "Mounting $MOUNTPOINT ..."
else
echo "Mountpoint $MOUNTPOINT not existing"
fi
fi fi
done done
end script end script

View File

@ -1,23 +1,19 @@
# rc - runlevel compatibility description "If configured, startup ypbind prozess"
# author "Harald Kueller <harald.kueller@compuextreme.de>"
# This task guesses what the "default runlevel" should be and starts the version 1.0
# appropriate script. emits none special
start on started rpc start on ( runlevel [2345] and (started rpc))
stop on stopping rpc stop on stopping rpc
console output
pre-start script #exect daemon
source /etc/event.d/functions #pid binary /usr/sbin/ypbind
console none
script
source /etc/init/functions
if [ -f /etc/sysconfig/nis/defaultdomain ]; then if [ -f /etc/sysconfig/nis/defaultdomain ]; then
domainname `cat /etc/sysconfig/nis/defaultdomain` domainname `cat /etc/sysconfig/nis/defaultdomain`
/usr/sbin/ypbind /usr/sbin/ypbind -debug
status_message "ypclient started"
sleep 2
fi fi
end script end script
post-stop script
pkill ypbind
end script