aboutsummaryrefslogtreecommitdiffstats
path: root/dfly-update
diff options
context:
space:
mode:
Diffstat (limited to 'dfly-update')
-rwxr-xr-xdfly-update4
1 files changed, 2 insertions, 2 deletions
diff --git a/dfly-update b/dfly-update
index 07fa1c2..68d74c6 100755
--- a/dfly-update
+++ b/dfly-update
@@ -335,10 +335,10 @@ mount_image() {
local imgfile="$1"
local mntpnt="$2"
- local vn=$(vnconfig -l | fgrep "not in use" | head -n 1 | cut -d':' -f 1)
+ local vn
[ -d "${mntpnt}" ] || mkdir "${mntpnt}"
echo "Mounting image ${imgfile} to ${mntpnt} ..."
- vnconfig -v -c ${vn} ${imgfile} || exit ${EC_VN}
+ vn=$(vnconfig -v -c vn ${imgfile}) || exit ${EC_VN}
mount -r /dev/${vn}s2a ${mntpnt} &&
echo "DONE" ||
exit ${EC_MOUNT}