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

View File

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

View File

@ -1,9 +1,12 @@
# 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.
# 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
emit shutdown
exec /sbin/shutdown -t1 -a -r now "Control-Alt-Delete pressed"
task
exec shutdown -r now "Control-Alt-Delete pressed"

View File

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

View File

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

View File

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

View File

@ -1,58 +1,17 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
description "Setup all configured Network Interfaces"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on stopped maccfg
stop on stopping mountfs
start on ( runlevel [2345] and (stopped maccfg))
console logged
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
console output
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`
if [ -f /usr/sbin/ethtool ]; then
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
/sbin/if_up $DEVNAME
done
end script
@ -73,10 +32,3 @@ post-start script
fi
fi
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
#
# This task runs the old sysv-rc startup scripts.
description "Initialize Logical Volume Manager (LVM)"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
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/event.d/functions
echo "Initializing volumes"
source /etc/init/functions
if [ -f /sbin/vgscan ]; then
/sbin/vgscan >/dev/null 2>&1
status_message "Scanning of Volumes....."
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 ..."
done
fi

View File

@ -1,11 +1,13 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
description "Startup Kernel Logging daemon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on started mountfs
stop on stopping mountfs
start on ( runlevel [12345] and (stopped 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

View File

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

View File

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

View File

@ -1,24 +1,15 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
description "Loopback Network Setup"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on stopped udevstart
start on ( runlevel [S012345] and ( started udev ))
#stop on runlevel
console output
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
source /etc/event.d/functions
/sbin/ifconfig lo 127.0.0.1
script
echo "Setting up localhost"
source /etc/init/functions
/sbin/ifconfig lo 127.0.0.1 up
status_message "Setup local net..."
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
exec /sbin/logd
post-start script
echo "Starting logd"
end script
respawn
exec /sbin/logd

View File

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

View File

@ -1,22 +1,13 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
description "Mounting all Filesystem not depending on Network"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
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/event.d/functions
script
source /etc/init/functions
echo -n "Remounting rootfs in rw mode..."
/bin/mount -n -o remount,rw /
evaluate_retval
@ -34,21 +25,13 @@ pre-start script
&& [ ! "$FILESYSTEM" == "swap" ] \
&& [ ! "$MOUNTPOINT" == "/" ] \
&& [ ! "$DEVICE" == "none" ]; then
echo -n "Mounting $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
if [ -d $MOUNTPOINT ]; then
echo -n "Mounting $MOUNTPOINT"
mount $MOUNTPOINT
evaluate_retval
else
echo "Mountpoint $MOUNTPOINT not existing!"
fi
fi
done
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
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
description "Mounting NFS Filesystems"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on started nfsclient
stop on stopping nfsclient
start on ( runlevel [2345] and (started nfsclient))
console output
pre-start script
source /etc/event.d/functions
script
source /etc/init/functions
for i in `sed -e "/^#/d" /etc/fstab|awk '{print $2}'`; do
MOUNTPOINT=$i
FILESYSTEM=`awk '{if( $2 == "'$MOUNTPOINT'") print $3}' /etc/fstab`
@ -19,15 +18,3 @@ pre-start script
fi
done
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
#
# This task runs the old sysv-rc startup scripts.
description "Special Handling for nfs / (root) Filesystem"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
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/event.d/functions
source /etc/init/functions
mount -t tmpfs none /var
status_message "Mount tmpfs on /var"
ifconfig|\

View File

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

View File

@ -1,17 +1,13 @@
# rcS - runlevel compatibility
#
# This task runs the old sysv-rc startup scripts.
description "Set Clock from hw System clock"
author "Harald Kueller <harald.kueller@compuextreme.de>"
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
script
source /etc/event.d/functions
source /etc/init/functions
CLOCKPARAMS="--hctosys"
case "$UTC" in
yes|true|1)

View File

@ -1,11 +1,15 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
description "Startup Syslog"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on stopped routing
stop on stopping ifup
start on ( runlevel [12345] and (stopped routing))
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
respawn

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,27 +1,48 @@
# rc - runlevel compatibility
#
# This task guesses what the "default runlevel" should be and starts the
# appropriate script.
description "Staring udevdaemon to create all the /dev entrys"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on started mountfs
stop on stopping mountfs
start on startudev
stop on runlevel [06]
console output
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
source /etc/init/functions
echo "Starting udev"
mount -t sysfs none /sys
status_message "udev: mount sysfs"
if [ ! -d /var/lock/subsys ]; then
mkdir /var/lock/subsys
fi
if [ ! -d /dev ]; then
mkdir /dev
fi
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
respawn
exec /sbin/udevd
post-stop script
rm /var/lock/subsys/udev
post-start script
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

View File

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

View File

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

View File

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