diff options
author | rbalocca <rbalocca@fugazi.vyatta.com> | 2007-12-18 14:18:24 -0800 |
---|---|---|
committer | rbalocca <rbalocca@fugazi.vyatta.com> | 2007-12-18 14:18:24 -0800 |
commit | 64a8cfa9effac219e51498c3b8ef43437ad0396a (patch) | |
tree | fb11fa4d01b3dbe1f0f60e838b4ec450cbf31a64 /scripts/xorp_tmpl_tool | |
parent | 65db98116efa3c311c798f05f4f6ec97e9b6d643 (diff) | |
parent | 7966b8cf00e08548447e551a3fcfde40aa06cc59 (diff) | |
download | vyatta-cfg-64a8cfa9effac219e51498c3b8ef43437ad0396a.tar.gz vyatta-cfg-64a8cfa9effac219e51498c3b8ef43437ad0396a.zip |
Merge branch 'master' into glendale
Diffstat (limited to 'scripts/xorp_tmpl_tool')
-rwxr-xr-x | scripts/xorp_tmpl_tool | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/xorp_tmpl_tool b/scripts/xorp_tmpl_tool index 54c87bb..014a53b 100755 --- a/scripts/xorp_tmpl_tool +++ b/scripts/xorp_tmpl_tool @@ -1,5 +1,11 @@ #!/bin/bash +if grep -q union=aufs /proc/cmdline || grep -q aufs /proc/filesystems ; then + export UNIONFS=aufs +else + export UNIONFS=unionfs +fi + UMASK_SAVE_G=`umask` umask 0111 XORPLOGFILE=/tmp/xorp_tmpl_tool.log @@ -36,7 +42,7 @@ export VYATTA_TEMP_CONFIG_DIR=/opt/vyatta/config/tmp/new_config_$VTID; if [ ! -d $VYATTA_TEMP_CONFIG_DIR ] then mkdir -p $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 ## cli ENV_TMP_DIR @@ -110,7 +116,7 @@ case "$1" in sudo umount ${VYATTA_TEMP_CONFIG_DIR} sudo rm -rf $VYATTA_CHANGES_ONLY_DIR/* $VYATTA_CHANGES_ONLY_DIR/.modified - 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} RET_STATUS=0 ;; end_loading) @@ -150,3 +156,7 @@ echo "ret=${RET_STATUS}" >> ${XORPLOGFILE} umask ${UMASK_SAVE_G} exit $RET_STATUS +# Local Variables: +# mode: shell-script +# sh-indentation: 4 +# End: |