Package: file-rc Version: 0.8.7 Severity: normal Tags: patch Hi,
posh is a very strictly POSIX implementation, which shows some errors in your rc and rcS script. stty: Standardeingabe: Das Argument ist ungültig rc: 2 -> 0 /etc/init.d/rc:96: [: -a: unexpected operator/operand Reading configuration file /etc/runlevel.conf. /etc/init.d/rc:219: [: -a: unexpected operator/operand /etc/init.d/rc:237: [: -a: unexpected operator/operand /etc/init.d/rc:237: [: -a: unexpected operator/operand /etc/init.d/rc:237: [: -a: unexpected operator/operand /etc/init.d/rc:243: [: -a: unexpected operator/operand set centerline=here The POSIX standard doesn't know the argument -a for test and the keyword local. A patch is appended. Jörg. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (990, 'unstable') Architecture: powerpc (ppc) Kernel: Linux 2.6.9 Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) -- no debconf information
--- /etc/init.d/rc 2004-08-14 18:47:29.000000000 +0200 +++ /tmp/rc 2005-01-28 12:49:35.687350368 +0100 @@ -60,7 +60,7 @@ [ $debug -eq 1 ] && echo "rc: $prevlevel -> $runlevel" # wait for any lock to vanish (but only when not booting) i=0 -while [ -f "$LOCKFILE" -a "$previous" != "N" ] +while [ -f "$LOCKFILE" ] && [ "$previous" != "N" ] do read pid < "$LOCKFILE" if ! kill -0 $pid &> /dev/null @@ -129,7 +129,7 @@ *) return $false ;; esac - if [ $1 -ge $valid_min_seq -a $1 -le $valid_max_seq ] + if [ $1 -ge $valid_min_seq ] && [ $1 -le $valid_max_seq ] then return $true fi @@ -137,8 +137,6 @@ } element() { - local element list IFS - element="$1" case "$element" in reboot | R) element=0 ;; @@ -160,8 +158,6 @@ } is_elem() { - local elem x - elem=$1; shift for x in $* @@ -175,7 +171,6 @@ # list of commands and levels is tested. # pushlevel() { - local newcmd newlevels i add outline newcmd=$1;shift newlevels=$1; shift add="$newcmd:$newlevels" @@ -213,7 +208,7 @@ # lock the configuration file -if [ "$prevlevel" != "N" -a "$runlevel" != "1" -a "$runlevel" != "6" ] +if [ "$prevlevel" != "N" ] && [ "$runlevel" != "1" ] && [ "$runlevel" != "6" ] then (echo "$$" > "$LOCKFILE") || true fi @@ -237,7 +232,7 @@ done < $CFGFILE # remove lock of configuration file -if [ "$prevlevel" != "N" -a "$runlevel" != "1" -a "$runlevel" != "6" ] +if [ "$prevlevel" != "N" ] && [ "$runlevel" != "1" ] && [ "$runlevel" != "6" ] then rm -f "$LOCKFILE" fi --- /etc/init.d/rcS 2004-08-14 18:47:29.000000000 +0200 +++ /tmp/rcS 2005-01-28 12:58:54.377718384 +0100 @@ -55,9 +55,6 @@ trap ":" INT QUIT TSTP element() { - local element list IFS - - element="$1" [ "$2" = "in" ] && shift
signature.asc
Description: Digital signature