SlugOS: /sbin/sysconf - accomodate bugs in recent busybox ash, fix a few typos
authorMike Westerhof <mwester@dls.net>
Sun, 8 Feb 2009 23:48:18 +0000 (17:48 -0600)
committerMike Westerhof <mwester@dls.net>
Sun, 8 Feb 2009 23:48:18 +0000 (17:48 -0600)
(ash can no longer handle:  command <>/dev/tty >&0 -- fails with
"Bad file descriptor" error.)

packages/slugos-init/files/sysconf
packages/slugos-init/slugos-init_5.0.bb

index 3059a46..8d59d5d 100644 (file)
@@ -381,7 +381,7 @@ sysconf_restore_conffiles(){
                        else
                                echo "sysconf_restore_conffiles: $file: timestamp copy failed (ignored)" >&2
                        fi
-               elif test -h "$saved/file" -o -h "$ffsdir/$file"
+               elif test -h "$saved/$file" -o -h "$ffsdir/$file"
                then
                        # new or old symbolic link
                        if test -h "$saved/$file" -a -h "$ffsdir/$file" &&
@@ -396,7 +396,7 @@ sysconf_restore_conffiles(){
                                        echo "$file"
                                        echo "$file" >&3;;
                                diff)   # need user input
-                                       if sysconf_verify_link "$file" <>/dev/tty >&0 2>&0
+                                       if sysconf_verify_link "$file" </dev/tty >/dev/tty 2>&1
                                        then
                                                echo "$file"
                                                echo "$file" >&3
@@ -420,7 +420,7 @@ sysconf_restore_conffiles(){
                                        echo "$file"
                                        echo "$file" >&3;;
                                diff)   # the files are different, get user input
-                                       if sysconf_verify "$file" <>/dev/tty >&0 2>&0
+                                       if sysconf_verify "$file" </dev/tty >/dev/tty 2>&1
                                        then
                                                echo "$file"
                                                echo "$file" >&3
@@ -456,7 +456,7 @@ sysconf_test_restore(){
                elif test "$file" = "etc/.configured"
                then
                        : # special handling
-               elif test -h "$saved/file" -o -h "$ffsdir/$file"
+               elif test -h "$saved/$file" -o -h "$ffsdir/$file"
                then
                        # new or old symbolic link
                        if test -h "$saved/$file" -a -h "$ffsdir/$file" &&
index e7a45a9..7d4769d 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "required"
 LICENSE = "GPL"
 DEPENDS = "base-files devio"
 RDEPENDS = "busybox devio"
-PR = "r8"
+PR = "r9"
 
 SRC_URI = "file://boot/flash \
           file://boot/disk \