summaryrefslogtreecommitdiff
path: root/packages/slugos-init/files/turnup
diff options
context:
space:
mode:
Diffstat (limited to 'packages/slugos-init/files/turnup')
-rw-r--r--packages/slugos-init/files/turnup9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup
index 10bccb8279..761e07829d 100644
--- a/packages/slugos-init/files/turnup
+++ b/packages/slugos-init/files/turnup
@@ -159,7 +159,7 @@ fsoptions() {
# 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" "$@"
}