summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@poessinger.com>2023-08-11 20:25:52 +0200
committerGitHub <noreply@github.com>2023-08-11 20:25:52 +0200
commit0aa99fb9ae126f9a0d9bb3e68eab387adc587286 (patch)
treedf6f1c5086f1afcda75af04cc40125a486e8aefd
parent262cc82221acc6528150064319af34ea69a23b71 (diff)
parent6b03f6864063bc0ab95191b8c5e418d482baf076 (diff)
downloadvyatta-op-0aa99fb9ae126f9a0d9bb3e68eab387adc587286.tar.gz
vyatta-op-0aa99fb9ae126f9a0d9bb3e68eab387adc587286.zip
Merge pull request #66 from Apachez-/T5461
T5461: Improve rootfs directory variable
-rw-r--r--etc/default/vyatta.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/default/vyatta.in b/etc/default/vyatta.in
index 1c7759e..f496dba 100644
--- a/etc/default/vyatta.in
+++ b/etc/default/vyatta.in
@@ -177,8 +177,8 @@ unset _vyatta_extglob
fi
if test -z "$vyos_rootfs_dir" ; then
- ROOTFS=$(mount -t squashfs | cut -d' ' -f3)
- declare -x -r vyos_rootfs_dir="${ROOTFS}"
+ IMAGE_NAME=$(cat /proc/cmdline | sed -e s+^.*vyos-union=/boot/++ | sed -e 's/ .*$//')
+ declare -x -r vyos_rootfs_dir="/usr/lib/live/mount/rootfs/${IMAGE_NAME}.squashfs"
fi
if test -z "$VRF" ; then