From fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916 Mon Sep 17 00:00:00 2001 From: Apachez Date: Thu, 10 Aug 2023 12:35:40 +0200 Subject: T5457: Add environmental variable pointing to current rootfs directory --- etc/default/vyatta.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}" -- cgit v1.2.3