summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:21:38 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:21:38 -0800
commitc6a0c8078b8be141618fed1011229582f13ec30f (patch)
treec3c926daeac802eb834e2d7b05eea1ee42fd2b09 /etc
parent832dbf144bc019ec524e4163b716dd823ee26900 (diff)
downloadvyatta-cfg-c6a0c8078b8be141618fed1011229582f13ec30f.tar.gz
vyatta-cfg-c6a0c8078b8be141618fed1011229582f13ec30f.zip
support aufs and unionfs
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/20vyatta-cfg12
1 files changed, 11 insertions, 1 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg
index dc05cf1..ecf414d 100644
--- a/etc/bash_completion.d/20vyatta-cfg
+++ b/etc/bash_completion.d/20vyatta-cfg
@@ -935,12 +935,18 @@ make_vyatta_config_dir ()
sudo chgrp ${DEF_GROUP} $1
}
+if grep -q union=aufs /proc/cmdline || grep -q aufs /proc/filesystems ; then
+ export UNIONFS=aufs
+else
+ export UNIONFS=unionfs
+fi
+
make_vyatta_config_dir $VYATTA_ACTIVE_CONFIGURATION_DIR
make_vyatta_config_dir $VYATTA_CHANGES_ONLY_DIR
make_vyatta_config_dir $VYATTA_CONFIG_TMP
if [ ! -d $VYATTA_TEMP_CONFIG_DIR ]; then
make_vyatta_config_dir $VYATTA_TEMP_CONFIG_DIR
- sudo mount -t unionfs -o dirs=${VYATTA_CHANGES_ONLY_DIR}=rw:/opt/vyatta/config/active=ro unionfs ${VYATTA_TEMP_CONFIG_DIR}
+ sudo mount -t $UNIONFS -o dirs=${VYATTA_CHANGES_ONLY_DIR}=rw:/opt/vyatta/config/active=ro $UNIONFS ${VYATTA_TEMP_CONFIG_DIR}
fi
# disallow 'Ctrl-D' exit, since we need special actions on 'exit'
@@ -970,3 +976,7 @@ complete -F vyatta_config_complete edit
complete -F vyatta_config_complete exit
complete -F vyatta_run_complete run
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 4
+# End: