Группа :: Система/Настройка/Прочее
Пакет: livecd-run-hooks
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
livecd-run-hooks/ 0000755 0000000 0000000 00000000000 11527020516 0014244 5 ustar 00root root 0000000 0000000 livecd-run-hooks/livecd-run-hooks 0000755 0000000 0000000 00000001451 11527020516 0017364 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
#
# chkconfig: 2345 05 99
# description: This startup script runs user scripts from livecd
#
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
RETVAL=0
HOOKSDIR=live.hooks
start() {
IN_HOOKS=$(grep -o 'hooks=[^ ]*' /proc/cmdline)
if [ $IN_HOOKS ] ; then
HOOKSDIR=`echo $IN_HOOKS | cut -d = -f 2`
fi
if [ -d /image/$HOOKSDIR ] ; then
for i in /image/$HOOKSDIR/*; do
[ "${i%\~}" = "$i" ] && [ -f $i ] && [ -x $i ] && $i
done
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop|condstop|status)
;;
restart|reload|condrestart|condreload)
;;
*)
msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}"
RETVAL=1
esac
exit $RETVAL