Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37767792
en ru br
ALT Linux repos
S:1.2-alt1

Group :: System/Configuration/Other
RPM: livecd-run-hooks

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

livecd-run-hooks/000075500000000000000000000000001152702051600142445ustar00rootroot00000000000000livecd-run-hooks/livecd-run-hooks000075500000000000000000000014511152702051600173640ustar00rootroot00000000000000#!/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
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin