summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@poessinger.com>2023-08-10 15:52:39 +0200
committerGitHub <noreply@github.com>2023-08-10 15:52:39 +0200
commit262cc82221acc6528150064319af34ea69a23b71 (patch)
treec5cc94631760c1185bd665cbcf05941205dc4326
parent1cd8a8e302c411d993e4ccd8c3b8de865f6b80ba (diff)
parentfd1325f23036595a1c6ed8df6f0d0c3d8b5b0916 (diff)
downloadvyatta-op-262cc82221acc6528150064319af34ea69a23b71.tar.gz
vyatta-op-262cc82221acc6528150064319af34ea69a23b71.zip
Merge pull request #65 from Apachez-/T5457
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}"