[Initng-svn] r1994 - in initng/initfiles: debug system
svn at initng.thinktux.net
svn at initng.thinktux.net
Tue Nov 8 01:32:21 CET 2005
Author: jimmy
Date: Tue Nov 8 01:32:19 2005
New Revision: 1994
Modified:
initng/initfiles/debug/cat-daemon.ii
initng/initfiles/debug/critical-test.ii
initng/initfiles/debug/failing-daemon.ii
initng/initfiles/debug/pidfile-daemon.ii
initng/initfiles/debug/pidfile-daemon.sh
initng/initfiles/debug/syntax-failing-daemon.ii
initng/initfiles/debug/test-execve.ii
initng/initfiles/debug/virtual.ii
initng/initfiles/debug/wont-stop-daemon.ii
initng/initfiles/system/pcmcia.ii
initng/initfiles/system/readahead.ii
initng/initfiles/system/rmnologin.ii
initng/initfiles/system/serial.ii
initng/initfiles/system/speedstep.ii
initng/initfiles/system/splashy.ii
initng/initfiles/system/sraid.ii
initng/initfiles/system/static-modules.ii
initng/initfiles/system/swap.ii
initng/initfiles/system/sysctl.ii
initng/initfiles/system/urandom.ii
initng/initfiles/system/usb.ii
initng/initfiles/system/wifi-radar.ii
Log:
Converted the rest of the services, no shud all services be converted.
Modified: initng/initfiles/debug/cat-daemon.ii
==============================================================================
--- initng/initfiles/debug/cat-daemon.ii (original)
+++ initng/initfiles/debug/cat-daemon.ii Tue Nov 8 01:32:19 2005
@@ -1,5 +1,5 @@
daemon debug/cat-daemon {
respawn = no
- daemon = /bin/sleep
+ daemon = @/bin/sleep@
daemon_args = 10
}
Modified: initng/initfiles/debug/critical-test.ii
==============================================================================
--- initng/initfiles/debug/critical-test.ii (original)
+++ initng/initfiles/debug/critical-test.ii Tue Nov 8 01:32:19 2005
@@ -1,6 +1,6 @@
service debug/critical-test {
respawn = no
chdir = /this/will/not/work
- start = /wont/work
+ start = @/wont/work@
critical
}
Modified: initng/initfiles/debug/failing-daemon.ii
==============================================================================
--- initng/initfiles/debug/failing-daemon.ii (original)
+++ initng/initfiles/debug/failing-daemon.ii Tue Nov 8 01:32:19 2005
@@ -1,5 +1,5 @@
daemon debug/failing-daemon {
respawn = no
chdir = /this/will/not/work
- daemon = /bin/cat
+ daemon = @/bin/cat@
}
Modified: initng/initfiles/debug/pidfile-daemon.ii
==============================================================================
--- initng/initfiles/debug/pidfile-daemon.ii (original)
+++ initng/initfiles/debug/pidfile-daemon.ii Tue Nov 8 01:32:19 2005
@@ -1,6 +1,6 @@
daemon debug/pidfile-daemon {
respawn = no
- daemon = /bin/sh
+ daemon = @/bin/sh@
daemon_args = /etc/initng/debug/pidfile-daemon.sh
pid_file = /tmp/initng-pidfile-debug.pid
}
Modified: initng/initfiles/debug/pidfile-daemon.sh
==============================================================================
--- initng/initfiles/debug/pidfile-daemon.sh (original)
+++ initng/initfiles/debug/pidfile-daemon.sh Tue Nov 8 01:32:19 2005
@@ -1,3 +1,3 @@
#!/bin/bash
echo $$ &>/tmp/initng-pidfile-debug.pid
-exec /bin/cat
+exec @/bin/cat@
Modified: initng/initfiles/debug/syntax-failing-daemon.ii
==============================================================================
--- initng/initfiles/debug/syntax-failing-daemon.ii (original)
+++ initng/initfiles/debug/syntax-failing-daemon.ii Tue Nov 8 01:32:19 2005
@@ -1,5 +1,5 @@
daemon debug/syntax-failing-daemon {
respawn = no
chdir = /this/will/not/work
- <daemon> = /bin/cat
+ <daemon> = @/bin/cat@
}
Modified: initng/initfiles/debug/test-execve.ii
==============================================================================
--- initng/initfiles/debug/test-execve.ii (original)
+++ initng/initfiles/debug/test-execve.ii Tue Nov 8 01:32:19 2005
@@ -1,6 +1,6 @@
service debug/test-execve {
- execve = /bin/ls
+ execve = @/bin/ls@
execve_args = -l
}
Modified: initng/initfiles/debug/virtual.ii
==============================================================================
--- initng/initfiles/debug/virtual.ii (original)
+++ initng/initfiles/debug/virtual.ii Tue Nov 8 01:32:19 2005
@@ -1,4 +1,4 @@
service debug/virtual {
- daemon = /bin/cat
+ daemon = @/bin/cat@
provide = virtual/cat-alike
}
Modified: initng/initfiles/debug/wont-stop-daemon.ii
==============================================================================
--- initng/initfiles/debug/wont-stop-daemon.ii (original)
+++ initng/initfiles/debug/wont-stop-daemon.ii Tue Nov 8 01:32:19 2005
@@ -1,6 +1,6 @@
daemon debug/wont-stop-daemon {
daemon {
- trap 'echo "got sigterm"' SIGTERM
- cat
+ trap '@echo@ "got sigterm"' SIGTERM
+ @cat@
}
}
Modified: initng/initfiles/system/pcmcia.ii
==============================================================================
--- initng/initfiles/system/pcmcia.ii (original)
+++ initng/initfiles/system/pcmcia.ii Tue Nov 8 01:32:19 2005
@@ -5,8 +5,6 @@
start {
#!/bin/bash
-RUN=/var/run
-SC=${RUN}/pcmcia-scheme
if [ -e /etc/conf.d/pcmcia ]; then
source /etc/conf.d/pcmcia
fi
@@ -21,35 +19,35 @@
}
# Scheme is set for the /etc/pcmcia/shared script
-if [ -n "${SCHEME}" ] ; then umask 022 ; echo $SCHEME > ${SC}
-else umask 022 ; touch ${SC}
+if [ -n "${SCHEME}" ] ; then @umask@ 022 ; @echo@ $SCHEME > /var/run/pcmcia-scheme
+else @umask@ 022 ; touch /var/run/pcmcia-scheme
fi
# clean up any old interfaces
-if [ -r ${RUN}/stab ] ; then
- cat ${RUN}/stab | cleanup
+if [ -r /var/run/stab ] ; then
+ @cat@ /var/run/stab | cleanup
fi
# if /var/lib/pcmcia exists (and sometimes it gets created accidentally
# if you run pcmcia-cs apps w/out the proper flags), then it will really
# confuse the process
if [ -d /var/lib/pcmcia ] ; then
- rm -rf /var/lib/pcmcia
+ @rm@ -rf /var/lib/pcmcia
fi
if [ -e /proc/bus/pccard ]; then
- echo "PCMCIA support detected ..."
+ @echo@ "PCMCIA support detected ..."
else
- echo "Trying to load pcmcia modules, should have been loaded with coldplug/pci or static-modules ..."
- /sbin/modprobe pcmcia_core $CORE_OPTS
+ @echo@ "Trying to load pcmcia modules, should have been loaded with coldplug/pci or static-modules ..."
+ @/sbin/modprobe@ pcmcia_core $CORE_OPTS
if [ -n "${PCIC}" ]; then
- /sbin/modprobe $PCIC $PCIC_OPTS || {
- echo "'modprobe ${PCIC}' failed"
- echo "Trying alternative PCIC driver: ${PCIC_ALT}"
- /sbin/modprobe $PCIC_ALT $PCIC_ALT_OPTS
+ @/sbin/modprobe@ $PCIC $PCIC_OPTS || {
+ @echo@ "'modprobe ${PCIC}' failed"
+ @echo@ "Trying alternative PCIC driver: ${PCIC_ALT}"
+ @/sbin/modprobe@ $PCIC_ALT $PCIC_ALT_OPTS
}
fi
- /sbin/modprobe ds
+ @/sbin/modprobe@ ds
fi
}
Modified: initng/initfiles/system/readahead.ii
==============================================================================
--- initng/initfiles/system/readahead.ii (original)
+++ initng/initfiles/system/readahead.ii Tue Nov 8 01:32:19 2005
@@ -12,27 +12,19 @@
#elsed
start {
- READAHEAD="/usr/sbin/readahead"
- if [ ! -x "$READAHEAD" ]; then
- READAHEAD="/sbin/readahead"
- if [ ! -x "$READAHEAD" ]; then
- echo "WARNING, skipping readahead!"
- exit 0
- fi
- fi
if [ -e /etc/readahead/readahead.new ]; then
- exec $READAHEAD < /etc/readahead/readahead.new
+ exec @readahead@ < /etc/readahead/readahead.new
fi
if [ -e /etc/readahead/readahead ]; then
- exec $READAHEAD < /etc/readahead/readahead
+ exec @readahead@ < /etc/readahead/readahead
fi
if [ -e /etc/readahead ]; then
- exec $READAHEAD < /etc/readahead
+ exec @readahead@ < /etc/readahead
fi
- echo " List of files to be read ahead can not be found "
+ @echo@ " List of files to be read ahead can not be found "
exit 1
}
#endd
Modified: initng/initfiles/system/rmnologin.ii
==============================================================================
--- initng/initfiles/system/rmnologin.ii (original)
+++ initng/initfiles/system/rmnologin.ii Tue Nov 8 01:32:19 2005
@@ -4,7 +4,7 @@
start {
if [ -f /etc/nologin.boot ] ; then
- rm -f /etc/nologin /etc/nologin.boot >/dev/null 2>&1
+ @rm@ -f /etc/nologin /etc/nologin.boot >/dev/null 2>&1
fi
}
}
Modified: initng/initfiles/system/serial.ii
==============================================================================
--- initng/initfiles/system/serial.ii (original)
+++ initng/initfiles/system/serial.ii Tue Nov 8 01:32:19 2005
@@ -4,28 +4,26 @@
start {
#!/bin/bash
-SETSERIAL="/bin/setserial"
-
moduleinserted() {
- local res=$(grep 'serial' /proc/modules | awk '{ print $1;}')
+ local res=$(@grep@ 'serial' /proc/modules | @awk@ '{ print $1;}')
[ "${res}" = "serial" ] && return 1
}
#if serial module exists, and it's not inserted, insert it permanently
-if [ -f "/lib/modules/$(uname -r)/misc/serial.o" ] ; then
+if [ -f "/lib/modules/$(@uname@ -r)/misc/serial.o" ] ; then
moduleinserted
if [ "$?" -eq 0 ] ; then
- /sbin/insmod serial 1>&2
+ @/sbin/modprobe@ serial 1>&2
fi
fi
if [ -e /etc/serial.conf ] ; then
- grep -v "^#\|^ \|^$" /etc/serial.conf | while read device args
+ @grep@ -v "^#\|^ \|^$" /etc/serial.conf | while read device args
do
- echo "Setting $device to $args ..."
- ${SETSERIAL} -b $device $args 1>&2
+ @echo@ "Setting $device to $args ..."
+ @/bin/setserial@ -b $device $args 1>&2
if [ "$?" -gt 0 ] ; then
- echo "Error setting serial port $device $args"
+ @echo@ "Error setting serial port $device $args"
no_errs=0
else
done="${done} /dev/$1"
Modified: initng/initfiles/system/speedstep.ii
==============================================================================
--- initng/initfiles/system/speedstep.ii (original)
+++ initng/initfiles/system/speedstep.ii Tue Nov 8 01:32:19 2005
@@ -2,14 +2,14 @@
need = system/initial system/modules system/mountroot
use = system/static-modules system/coldplug
start {
- modprobe cpufreq-ondemand &> /dev/null
- cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /tmp/origgovanor
- echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ @modprobe@ cpufreq-ondemand &> /dev/null
+ @cat@ /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor > /tmp/origgovanor
+ @echo@ ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
exit 0
}
stop {
- echo `cat /tmp/origgovanor` > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ @echo@ `@cat@ /tmp/origgovanor` > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
exit 0
}
}
\ No newline at end of file
Modified: initng/initfiles/system/splashy.ii
==============================================================================
--- initng/initfiles/system/splashy.ii (original)
+++ initng/initfiles/system/splashy.ii Tue Nov 8 01:32:19 2005
@@ -2,62 +2,58 @@
service system/splashy {
need = system/initial
start {
- DAEMON=/sbin/splashy
-
- test -x $DAEMON || exit 0
+ test -x @/sbin/splashy@ || exit 0
spl_pidfile="/etc/splashy/splashy.pid"
spl_fifo="/etc/splashy/splashy.fifo"
if [ -r "/etc/default/splashy" ]; then
. /etc/default/splashy
else
- $ECHO "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
+ @echo@ "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
fi
if [ -r "/etc/init.d/splashy-functions.sh" ]; then
. /etc/init.d/splashy-functions.sh
else
- $ECHO "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly"
+ @echo@ "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly"
fi
SPL_MSG="Starting $NAME boot sequence"
- start-stop-daemon --start --quiet --pidfile $spl_pidfile \
- --exec $DAEMON -- boot 2> /dev/null
+ @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \
+ --exec @/sbin/splashy@ -- boot 2> /dev/null
- ngc -S "splashy,boot"
+ @ngc@ -S "splashy,boot"
}
#the stop script is called on shutdown
#it will start splashy again to show the "shutdown complete" progress bar
stop {
- DAEMON=/sbin/splashy
-
- test -x $DAEMON || exit 0
+ test -x @/sbin/splashy@ || exit 0
spl_pidfile="/etc/splashy/splashy.pid"
spl_fifo="/etc/splashy/splashy.fifo"
if [ -r "/etc/default/splashy" ]; then
. /etc/default/splashy
else
- $ECHO "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
+ @echo@ "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
fi
if [ -r "/etc/init.d/splashy-functions.sh" ]; then
. /etc/init.d/splashy-functions.sh
else
- $ECHO "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly"
+ @echo@ "WARN: Missing /etc/init.d/splashy-functions.sh. Progressbar will not function correctly"
fi
SPL_MSG="Starting $NAME shutdown sequence"
- start-stop-daemon --start --quiet --pidfile $spl_pidfile \
+ @start-stop-daemon@ --start --quiet --pidfile $spl_pidfile \
--exec $DAEMON -- boot 2> /dev/null
- ngc -S "splashy,shutdown"
+ @ngc@ -S "splashy,shutdown"
}
}
@@ -73,7 +69,7 @@
done
[ "${x_vt}" -gt 0 ] 2> /dev/null
[ "$?" -gt 0 ] && exit 0
- /usr/bin/chvt ${x_vt}
+ @/usr/bin/chvt@ ${x_vt}
}
}
@@ -82,11 +78,11 @@
# if [ -r "/etc/default/splashy" ]; then
# . /etc/default/splashy
# else
-# $ECHO "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
+# @echo@ "WARN: Missing /etc/default/splashy. Falling back to defaults $spl_fifo $spl_pidfile"
# fi
#
# splashy_cmd_send "exit"
-# ngc -S "splashy,shutdown"
+# @ngc@ -S "splashy,shutdown"
#}
Modified: initng/initfiles/system/sraid.ii
==============================================================================
--- initng/initfiles/system/sraid.ii (original)
+++ initng/initfiles/system/sraid.ii Tue Nov 8 01:32:19 2005
@@ -2,7 +2,6 @@
need = system/initial system/mountroot
critical
start {
- export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
retval=0
# You need a properly configured /etc/raidtab for raidtools usage or a
# properly configured /etc/mdadm.conf for mdadm usage. Devices in
@@ -11,18 +10,18 @@
if [[ -f /proc/mdstat ]] ; then
# If /etc/mdadm.conf exists, grab all the RAID devices from it
if [[ -f /etc/mdadm.conf ]] ; then
- mdadm_devices=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf)
+ mdadm_devices=$(@awk@ '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf)
fi
# If /etc/raidtab exists, grab all the RAID devices from it
if [[ -f /etc/raidtab ]] ; then
- raidtools_devices=$(awk '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab)
+ raidtools_devices=$(@awk@ '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab)
fi
- echo "Starting up RAID devices ... "
+ @echo@ "Starting up RAID devices ... "
rc=0
retval=0
for i in ${mdadm_devices} ; do
raiddev=${i##*/}
- raidstat=$(egrep "^${raiddev} : active" /proc/mdstat)
+ raidstat=$(@egrep@ "^${raiddev} : active" /proc/mdstat)
if [[ -z ${raidstat} ]] ; then
# First scan the /etc/fstab for the "noauto"-flag
# for this device. If found, skip the initialization
@@ -31,31 +30,31 @@
# fall back to raidadd, raidrun. If that
# also fails, then we drop to a shell
retval=1
- noauto=$(egrep "^${i}" /etc/fstab | grep -c 'noauto')
- echo " Trying ${raiddev}..."
+ noauto=$(@egrep@ "^${i}" /etc/fstab | @grep@ -c 'noauto')
+ @echo@ " Trying ${raiddev}..."
raiddev=""
if [[ ${noauto} -gt 0 ]] ; then
retval=0
raiddev=" (skipped)"
fi
- if [[ ${retval} -gt 0 ]] && [[ -x /sbin/mdadm ]] ; then
- /sbin/mdadm -As "${i}" >/dev/null 2>&1
+ if [[ ${retval} -gt 0 ]] && [[ -x @/sbin/mdadm@ ]] ; then
+ @/sbin/mdadm@ -As "${i}" >/dev/null 2>&1
retval=$?
fi
- echo "${raiddev}"
+ @echo@ "${raiddev}"
if [[ ${retval} -gt 0 ]] ; then
rc=1
- echo "Raid is up..."
+ @echo@ "Raid is up..."
else
- echo "Problems initiating raid..."
+ @echo@ "Problems initiating raid..."
fi
fi
done
for i in ${raidtools_devices} ; do
raiddev=${i##*/}
- raidstat=$(egrep "^${raiddev} : active" /proc/mdstat)
+ raidstat=$(@egrep@ "^${raiddev} : active" /proc/mdstat)
if [[ -z ${raidstat} ]] ; then
# First scan the /etc/fstab for the "noauto"-flag
# for this device. If found, skip the initialization
@@ -64,44 +63,44 @@
# fall back to raidadd, raidrun. If that
# also fails, then we drop to a shell
retval=1
- noauto=$(egrep "^${i}" /etc/fstab | grep -c 'noauto')
- echo " Trying ${raiddev}..."
+ noauto=$(@egrep@ "^${i}" /etc/fstab | @grep@ -c 'noauto')
+ @echo@ " Trying ${raiddev}..."
raiddev=""
if [[ ${noauto} -gt 0 ]] ; then
retval=0
raiddev=" (skipped)"
fi
- if [[ ${retval} -gt 0 ]] && [[ -x /sbin/raidstart ]] ; then
- /sbin/raidstart "${i}"
+ if [[ ${retval} -gt 0 ]] && [[ -x @/sbin/raidstart@ ]] ; then
+ @/sbin/raidstart@ "${i}"
retval=$?
fi
- if [[ ${retval} -gt 0 ]] && [[ -x /sbin/raid0run ]] ; then
- /sbin/raid0run "${i}"
+ if [[ ${retval} -gt 0 ]] && [[ -x @/sbin/raid0run@ ]] ; then
+ @/sbin/raid0run@ "${i}"
retval=$?
fi
- if [[ ${retval} -gt 0 ]] && [[ -x /sbin/raidadd ]] && [[ -x /sbin/raidrun ]] ; then
- /sbin/raidadd "${i}"
- /sbin/raidrun "${i}"
+ if [[ ${retval} -gt 0 ]] && [[ -x @/sbin/raidadd@ ]] && [[ -x @/sbin/raidrun@ ]] ; then
+ @/sbin/raidadd@ "${i}"
+ @/sbin/raidrun@ "${i}"
retval=$?
fi
- echo "${raiddev}"
+ @echo@ "${raiddev}"
if [[ ${retval} -gt 0 ]] ; then
rc=1
- echo "Raid is up ..."
- #echo ${retval}
+ @echo@ "Raid is up ..."
+ #@echo@ ${retval}
else
- echo "Problems with raid ..."
- #echo ${retval}
+ @echo@ "Problems with raid ..."
+ #@echo@ ${retval}
fi
fi
done
# A non-zero return means there were problems.
if [[ ${rc} -gt 0 ]] ; then
- echo
- echo "An error occurred during the RAID startup"
- echo "Dropping you to a shell; the system will reboot"
- echo "when you leave the shell."
- echo; echo
+ @echo@
+ @echo@ "An error occurred during the RAID startup"
+ @echo@ "Dropping you to a shell; the system will reboot"
+ @echo@ "when you leave the shell."
+ @echo@; @echo@
exit 1
fi
fi
Modified: initng/initfiles/system/static-modules.ii
==============================================================================
--- initng/initfiles/system/static-modules.ii (original)
+++ initng/initfiles/system/static-modules.ii Tue Nov 8 01:32:19 2005
@@ -3,14 +3,14 @@
start {
load_modules() {
- cat ${1} | while read MODULE MODARGS
+ @cat@ ${1} | while read MODULE MODARGS
do
case "$MODULE" in
\#*|"") continue ;;
esac
- echo " Loading module \"${MODULE}\" ..."
- /sbin/modprobe -q ${MODULE} ${MODARGS} >/dev/null 2>&1
+ @echo@ " Loading module \"${MODULE}\" ..."
+ @/sbin/modprobe@ -q ${MODULE} ${MODARGS} >/dev/null 2>&1
done
return 0
@@ -26,9 +26,9 @@
load_modules /etc/modules
fi
-if [ -n "$(/sbin/modprobe -l -t boot)" ]
+if [ -n "$(@/sbin/modprobe@ -l -t boot)" ]
then
- /sbin/modprobe -a -t boot \* >/dev/null 2>&1
+ @/sbin/modprobe@ -a -t boot \* >/dev/null 2>&1
fi
exit 0
Modified: initng/initfiles/system/swap.ii
==============================================================================
--- initng/initfiles/system/swap.ii (original)
+++ initng/initfiles/system/swap.ii Tue Nov 8 01:32:19 2005
@@ -1,11 +1,11 @@
service system/swap {
need = system/initial system/mountroot
- start = /sbin/swapon
+ start = @/sbin/swapon@
start_args = -a
# start {
-# #!/bin/bash
-# /sbin/swapon -a
+# #!@/bin/bash@
+# @/sbin/swapon@ -a
# exit $?
# }
}
Modified: initng/initfiles/system/sysctl.ii
==============================================================================
--- initng/initfiles/system/sysctl.ii (original)
+++ initng/initfiles/system/sysctl.ii Tue Nov 8 01:32:19 2005
@@ -1,6 +1,6 @@
servce system/sysctl {
need = system/initial
- start = /sbin/sysctl
+ start = @/sbin/sysctl@
start_args = -n -q -p
}
\ No newline at end of file
Modified: initng/initfiles/system/urandom.ii
==============================================================================
--- initng/initfiles/system/urandom.ii (original)
+++ initng/initfiles/system/urandom.ii Tue Nov 8 01:32:19 2005
@@ -11,7 +11,7 @@
POOLSIZE=512
if [ -f /proc/sys/kernel/random/poolsize ]
then
- POOLSIZE="`cat /proc/sys/kernel/random/poolsize`"
+ POOLSIZE="`@cat@ /proc/sys/kernel/random/poolsize`"
fi
SAVEDFILE=/var/lib/urandom/random-seed
log_begin_msg "Initializing random number generator..."
@@ -23,47 +23,47 @@
SAVEDSIZE=`find $SAVEDFILE -printf "%s"`
if [ $SAVEDSIZE -gt $POOLSIZE ]
then
- [ -w /proc/sys/kernel/random/poolsize ] && echo $POOLSIZE > /proc/sys/kernel/random/poolsize
+ [ -w /proc/sys/kernel/random/poolsize ] && @echo@ $POOLSIZE > /proc/sys/kernel/random/poolsize
POOLSIZE=$SAVEDSIZE
fi
- cat $SAVEDFILE >/dev/urandom
+ @cat@ $SAVEDFILE >/dev/urandom
fi
- rm -f $SAVEDFILE
- umask 077
- dd if=/dev/urandom of=$SAVEDFILE \
+ @rm@ -f $SAVEDFILE
+ @umask@ 077
+ @dd@ if=/dev/urandom of=$SAVEDFILE \
bs=$POOLSIZE count=1 >/dev/null 2>&1
ES=$?
- umask 022
+ @umask@ 022
#elsed
#if it can be loaded do this in the quite
- modprobe -q nvram 2>&1 >/dev/null
+ @modprobe@ -q nvram 2>&1 >/dev/null
[ -c /dev/urandom ] || exit 1
if [ -f /var/run/random-seed ] ; then
- cat /var/run/random-seed >/dev/urandom
+ @cat@ /var/run/random-seed >/dev/urandom
fi
- if ! rm -f /var/run/random-seed 2>&1 >/dev/null ; then
- echo "Skipping /var/run/random-seed initialization (ro root?)"
+ if ! @rm@ -f /var/run/random-seed 2>&1 >/dev/null ; then
+ @echo@ "Skipping /var/run/random-seed initialization (ro root?)"
exit 1
fi
- #echo "Initializing random number generator ..."
- umask 077
- dd if=/dev/urandom of=/var/run/random-seed count=1 >/dev/null 2>&1
- umask 022
+ #@echo@ "Initializing random number generator ..."
+ @umask@ 077
+ @dd@ if=/dev/urandom of=/var/run/random-seed count=1 >/dev/null 2>&1
+ @umask@ 022
#endd
exit 0
}
stop {
- echo "Saving random seed ..."
+ @echo@ "Saving random seed ..."
# Carry a random seed from shut-down to start-up;
# see documentation in linux/drivers/char/random.c
- umask 077
+ @umask@ 077
#ifd debian
- dd if=/dev/urandom of=/var/lib/urandom/random-seed \
+ @dd@ if=/dev/urandom of=/var/lib/urandom/random-seed \
bs=$POOLSIZE count=1 >/dev/null 2>&1 \
- || echo "urandom stop: failed."
+ || @echo@ "urandom stop: failed."
#elsed
- dd if=/dev/urandom of=/var/run/random-seed count=1 &>/dev/null
+ @dd@ if=/dev/urandom of=/var/run/random-seed count=1 &>/dev/null
#endd
exit $?
}
Modified: initng/initfiles/system/usb.ii
==============================================================================
--- initng/initfiles/system/usb.ii (original)
+++ initng/initfiles/system/usb.ii Tue Nov 8 01:32:19 2005
@@ -8,23 +8,23 @@
# Make sure we insert usbcore if its a module
if [ -f /proc/modules ] ; then
# >/dev/null to hide errors from non-USB users
- modprobe usbcore >/dev/null 2>&1
+ @modprobe@ usbcore >/dev/null 2>&1
fi
# Check what USB fs the kernel support. Currently
# 2.5+ kernels, and later 2.4 kernels have 'usbfs',
# while older kernels have 'usbdevfs'.
-usbfs=$(grep -Fow usbfs /proc/filesystems || grep -Fow usbdevfs /proc/filesystems)
+usbfs=$(@grep@ -Fow usbfs /proc/filesystems || @grep@ -Fow usbdevfs /proc/filesystems)
if [ -n "${usbfs}" ] && [ -e /proc/bus/usb ] && [ ! -e /proc/bus/usb/devices ]
then
echo "Mounting USB device filesystem (${usbfs}) ..."
- usbgid=$(awk -F: '/^usb:/{print $3; exit}' /etc/group)
+ usbgid=$(@awk@ -F: '/^usb:/{print $3; exit}' /etc/group)
if [ -n "${usbgid}" ]
then
- mount -t ${usbfs} usbfs /proc/bus/usb ${usbgid:+-o devmode=0664,devgid=${usbgid}} >/dev/null 2>&1 &
+ @mount@ -t ${usbfs} usbfs /proc/bus/usb ${usbgid:+-o devmode=0664,devgid=${usbgid}} >/dev/null 2>&1 &
else
- mount -t ${usbfs} usbfs /proc/bus/usb >/dev/null 2>&1 &
+ @mount@ -t ${usbfs} usbfs /proc/bus/usb >/dev/null 2>&1 &
fi
fi
Modified: initng/initfiles/system/wifi-radar.ii
==============================================================================
--- initng/initfiles/system/wifi-radar.ii (original)
+++ initng/initfiles/system/wifi-radar.ii Tue Nov 8 01:32:19 2005
@@ -1,7 +1,7 @@
service system/wifi-radar {
need = system/mountroot system/modules
use = system/static-modules system/coldplug
- start = /usr/sbin/wifi-radar
+ start = @/usr/sbin/wifi-radar@
start_args = -d
stdout = /var/log/wifi-radar.log
stderr = /var/log/wifi-radar.log
More information about the Initng-svn
mailing list