summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-18 14:53:58 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-18 14:53:58 +0000
commit8fdcf93149e5a3f262209cef4fc1d2b9fe287a51 (patch)
treefb16a207204eaa990053b279d94a00645d71e6ce
parent5f782a70ce5cacc4d646d0ac882828606a7db9de (diff)
downloadabuild-8fdcf93149e5a3f262209cef4fc1d2b9fe287a51.tar.gz
abuild-8fdcf93149e5a3f262209cef4fc1d2b9fe287a51.tar.bz2
abuild-8fdcf93149e5a3f262209cef4fc1d2b9fe287a51.tar.xz
abuild-8fdcf93149e5a3f262209cef4fc1d2b9fe287a51.zip
initram: allow user o specify filesystem in alpine_dev boot param
-rwxr-xr-xinitramfs-init10
1 files changed, 9 insertions, 1 deletions
diff --git a/initramfs-init b/initramfs-init
index b2375fe..79016ee 100755
--- a/initramfs-init
+++ b/initramfs-init
@@ -74,6 +74,10 @@ for i in `cat /proc/cmdline` ; do
done
ALPINE_DEV=${KOPT_alpine_dev%%:*}
+ALPINE_DEV_FS=${KOPT_alpine_dev##*:}
+if [ "$ALPINE_DEV_FS" = "$ALPINE_DEV" ]; then
+ unset ALPINE_DEV_FS
+fi
ALPINE_MNT=/media/$ALPINE_DEV
# hide kernel messages
@@ -109,7 +113,11 @@ eend 0
# locate boot media and mount it
ebegin "Mounting boot media"
-mount $ALPINE_MNT >/dev/null 2>&1
+mkdir -p $ALPINE_MNT
+if [ -n "$ALPINE_DEV_FS" ]; then
+ mount_opts="-t $ALPINE_DEV_FS"
+fi
+mount $mount_opts /dev/$ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1
eend $?
ebegin "Mounting loopback device for kernel modules"
modprobe loop