From 49f8a6745f17002322a2cd853ffacf57ee15be10 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 2 May 2013 11:49:49 +0000 Subject: init: factorize out ALPINE_DEV_IS_NETWORK Use ALPINE_DEV_FS to detect nfs instead of adding an additional variable --- initramfs-init.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/initramfs-init.in b/initramfs-init.in index aeecc26..4e47626 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -435,7 +435,6 @@ case "$ALPINE_DEV" in # nfs:IP:EXPORT ALPINE_DEV_FS="$ALPINE_DEV" ALPINE_DEV="${KOPT_alpine_dev:4}" - ALPINE_DEV_IS_NETWORK=y ;; *) ALPINE_DEV=/dev/$ALPINE_DEV ;; esac @@ -457,7 +456,7 @@ ALPINE_REPO=${KOPT_alpine_repo} # look for standard mountpoint locations ALPINE_MNT=$(find_mnt $ALPINE_DEV /etc/fstab) -[ -z "$ALPINE_MNT" -a -n "$ALPINE_DEV_IS_NETWORK" ] && ALPINE_MNT=/media/alpine_dev +[ -z "$ALPINE_MNT" ] && [ "$ALPINE_DEV_FS" = nfs ] && ALPINE_MNT=/media/alpine [ -z "$ALPINE_MNT" ] && ALPINE_MNT=/media/${ALPINE_DEV##*/} # hide kernel messages @@ -550,7 +549,7 @@ fi if [ -n "$ALPINE_DEV_FS" ]; then mount_opts="-t $ALPINE_DEV_FS" - [ "$ALPINE_DEV_FS" == "nfs" ] && mount_opts="$mount_opts -o nolock" + [ "$ALPINE_DEV_FS" = "nfs" ] && mount_opts="$mount_opts -o nolock" fi retry_mount -o ro $mount_opts $ALPINE_DEV $ALPINE_MNT >/dev/null 2>&1 -- cgit v1.2.3