All pastes #589748 Raw Edit

Anonymous

public text v1 · immutable
#589748 ·published 2007-06-26 05:02 UTC
rendered paste body
============================================================
--- packages/slugos-init/files/reflash  f886fec2fbc2077f367a336963204a0a813979ea
+++ packages/slugos-init/files/reflash  4d22deb46075a5a8645b5f82d5c3a011a211d0d4
@@ -146,7 +146,7 @@ then
                        then
                                imgksize="$size"
                                imgkoffset="$base"
-                       elif test "$name" = "$ffspart"
+                       elif test "$name" = "$ffspart" -o "$name" = "rootfs"
                        then
                                imgffssize="$size"
                                imgffsoffset="$base"
@@ -320,6 +320,8 @@ then
 if test -n "$ffsfile"
 then
        ffsdev="$(mtblockdev $ffspart)"
+       [ -n "$ffsdev" ] || \
+       ffsdev="$(mtblockdev rootfs)"
        test -n "$ffsdev" -a -b "$ffsdev" || {
                echo "reflash: $ffspart($ffsdev): cannot find $ffspart mtd partition." >&2
                echo "  check /proc/mtd, either the partition does not exist or there is no" >&2
============================================================
--- packages/slugos-init/files/sysconf  65dc9f74ca809af17100c94bdd851fd3a6d4dcbd
+++ packages/slugos-init/files/sysconf  4742342792c7cda553ad6d667b8380ec8bca1121
@@ -8,7 +8,6 @@ test "$1" != sysconf && . /etc/default/f
 # to load these functions!)
 test "$1" != sysconf && . /etc/default/functions

-# NSLU2 flash layout is non-standard.
 case "$(machine)" in
 nslu2)
        kpart="Kernel"
@@ -493,6 +492,8 @@ sysconf_save(){
 sysconf_save(){
        local sysdev ffsdev ffsdir saved list size status
        ffsdev="$(mtblockdev $ffspart)"
+       [ -n "$ffsdev" ] || \
+       ffsdev="$(mtblockdev rootfs)"
        sysdev="$(mtblockdev $syspart)"
        status=1
        if test -n "$sysdev" -a -b "$sysdev" -a -n "$ffsdev" -a -b "$ffsdev"
@@ -622,6 +623,8 @@ sysconf_restore(){
        test "$1" = auto && sysconf_noninteractive=1

        ffsdev="$(mtblockdev $ffspart)"
+       [ -n "$ffsdev" ] || \
+       ffsdev="$(mtblockdev rootfs)"
        sysdev="$(mtblockdev $syspart)"
        status=1
        if test -n "$sysdev" -a -b "$sysdev" -a -n "$ffsdev" -a -b "$ffsdev" &&
============================================================
--- packages/slugos-init/files/turnup   2e05239eaf5a32bbf9737fb1febffb5bde474362
+++ packages/slugos-init/files/turnup   0c939e1149cd95e3b6553c5766ba09a3a3984ada
@@ -159,7 +159,7 @@ get_flash() {
 # get_flash <directory> {mount options}
 #  mount the flash device, writeable, on the given directory
 get_flash() {
-       local ffsdir ffsdev
+       local ffsdir ffspart ffsdev

        ffsdir="$1"
        shift
@@ -169,9 +169,12 @@ get_flash() {
        }

        case "$(machine)" in
-       nslu2)  ffsdev="$(mtblockdev Flashdisk)";;
-       *)      ffsdev="$(mtblockdev filesystem)";;
+       nslu2)  ffspart="Flashdisk";;
+       *)      ffspart="filesystem";;
        esac
+       ffsdev="$(mtblockdev $ffspart)"
+       [ -n "$ffsdev" ] || \
+       ffsdev="$(mtblockdev rootfs)"
        umountflash "$ffsdev" &&
        mountflash "$ffsdev" "$ffsdir" "$@"
 }