diff options
author | Apachez <apachez@gmail.com> | 2023-08-10 12:35:40 +0200 |
---|---|---|
committer | Apachez <apachez@gmail.com> | 2023-08-10 12:35:40 +0200 |
commit | fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916 (patch) | |
tree | c5cc94631760c1185bd665cbcf05941205dc4326 | |
parent | 1cd8a8e302c411d993e4ccd8c3b8de865f6b80ba (diff) | |
download | vyatta-op-fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916.tar.gz vyatta-op-fd1325f23036595a1c6ed8df6f0d0c3d8b5b0916.zip |
T5457: Add environmental variable pointing to current rootfs directory
-rw-r--r-- | etc/default/vyatta.in | 7 |
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}" |