diff options
author | Kim <UnicronNL@users.noreply.github.com> | 2017-03-30 12:05:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 12:05:04 +0200 |
commit | 4eec4c493f6eae0394c8c27cf69122c18a9e7a32 (patch) | |
tree | 9a0f07db6c8a5b7adb407875ad5ef82cbfb9323b | |
parent | 1bbe5d67eea37a46463e55011cf7efb9b96dac2e (diff) | |
download | vyatta-cfg-4eec4c493f6eae0394c8c27cf69122c18a9e7a32.tar.gz vyatta-cfg-4eec4c493f6eae0394c8c27cf69122c18a9e7a32.zip |
mounting different persistence
if persistence is set for /config on an other device then also create and mount /config
-rwxr-xr-x | etc/init.d/vyatta-router | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/etc/init.d/vyatta-router b/etc/init.d/vyatta-router index 5d24f5f..89b721a 100755 --- a/etc/init.d/vyatta-router +++ b/etc/init.d/vyatta-router @@ -154,11 +154,16 @@ mount_slash_config () { mounted=`mount | grep /opt/vyatta/etc/config` - if [ -z "$mounted" ]; then - if [ ! -d /config ]; then - mkdir /config - fi - mount --bind /opt/vyatta/etc/config /config +if [ -z "$mounted" ]; then + if [ ! -d /config ]; then + mkdir /config + fi + mount --bind /opt/vyatta/etc/config /config +else + if [ ! -d /config ]; then + mkdir /config + mount --bind /opt/vyatta/etc/config /config + fi fi chgrp -R ${GROUP} /config } |