summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorApachez <apachez@gmail.com>2023-08-10 12:35:40 +0200
committerApachez <apachez@gmail.com>2023-08-10 12:35:40 +0200
commitfd1325f23036595a1c6ed8df6f0d0c3d8b5b0916 (patch)
treec5cc94631760c1185bd665cbcf05941205dc4326
parent1cd8a8e302c411d993e4ccd8c3b8de865f6b80ba (diff)
downloadvyatta-op-fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916.tar.gz
vyatta-op-fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916.zip
T5457: Add environmental variable pointing to current rootfs directory
-rw-r--r--etc/default/vyatta.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/default/vyatta.in b/etc/default/vyatta.in
index 06ce797..1c7759e 100644
--- a/etc/default/vyatta.in
+++ b/etc/default/vyatta.in
@@ -168,7 +168,7 @@ unset _vyatta_extglob
declare -x -r vyos_op_scripts_dir=$vyos_libexec_dir/op_mode
fi
- if test -z "$vyos_completion__dir" ; then
+ if test -z "$vyos_completion_dir" ; then
declare -x -r vyos_completion_dir=$vyos_libexec_dir/completion
fi
@@ -176,6 +176,11 @@ unset _vyatta_extglob
declare -x -r vyos_validators_dir=$vyos_libexec_dir/validators
fi
+ if test -z "$vyos_rootfs_dir" ; then
+ ROOTFS=$(mount -t squashfs | cut -d' ' -f3)
+ declare -x -r vyos_rootfs_dir="${ROOTFS}"
+ fi
+
if test -z "$VRF" ; then
VRF=$(ip vrf identify)
[ -n "$VRF" ] && declare -x -r VRF="${VRF}"