diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-04 13:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 13:40:18 +0200 |
commit | ec889a74217d8132874e571934866e08aaf11ba4 (patch) | |
tree | 4cb93a0bfdb2f5a810b2018e69fb73182e8ba251 /src/opt/vyatta/sbin/vyos-persistpath | |
parent | 18f6159536d67c8fdabf02fe1aa8b4e0e94986d8 (diff) | |
parent | 7aa420e5a5509793030350acb9c108eaef6c79ea (diff) | |
download | vyos-1x-ec889a74217d8132874e571934866e08aaf11ba4.tar.gz vyos-1x-ec889a74217d8132874e571934866e08aaf11ba4.zip |
Merge pull request #3766 from vyos/mergify/bp/circinus/pr-3745
T6527: add legacy Vyatta interpreter files still in use (backport #3745)
Diffstat (limited to 'src/opt/vyatta/sbin/vyos-persistpath')
-rwxr-xr-x | src/opt/vyatta/sbin/vyos-persistpath | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/opt/vyatta/sbin/vyos-persistpath b/src/opt/vyatta/sbin/vyos-persistpath new file mode 100755 index 000000000..d7199b09a --- /dev/null +++ b/src/opt/vyatta/sbin/vyos-persistpath @@ -0,0 +1,19 @@ +#!/bin/bash + +if grep -q -e '^overlay.*/filesystem.squashfs' /proc/mounts; then + # Live CD boot + exit 2 + +elif grep -q 'upperdir=/live/persistence/' /proc/mounts && egrep -q 'overlay / overlay ' /proc/mounts; then + # union boot + + boot_device=`grep -o 'upperdir=/live/persistence/[^/]*/boot' /proc/mounts | cut -d / -f 4` + persist_path="/lib/live/mount/persistence/$boot_device" + + echo $persist_path + exit 0 +else + # old style boot + + exit 1 +fi
\ No newline at end of file |