diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2009-01-30 12:01:06 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2009-01-30 12:01:06 -0800 |
commit | 77ca3aa66ab1ab0ab21e8a0f6c35de40ca8e8acf (patch) | |
tree | 96e4a43a8e70af49cf6bfb57d846acd5ab9ac031 | |
parent | 1afc4818f1f7572c1309298a8f2136232d11b605 (diff) | |
download | vyatta-cfg-77ca3aa66ab1ab0ab21e8a0f6c35de40ca8e8acf.tar.gz vyatta-cfg-77ca3aa66ab1ab0ab21e8a0f6c35de40ca8e8acf.zip |
work around unionfs bug
-rwxr-xr-x | etc/bash_completion.d/20vyatta-cfg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index 369ef7a..d03737d 100755 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -201,7 +201,12 @@ mvcp () fi /opt/vyatta/sbin/my_delete $_ntag "$_nvalu" >&/dev/null 3>&1 - $cmd "$_mpath/$_otag/$_oval" "$_mpath/$_ntag/$_nval" + # workaround for unionfs bug (unionfs chokes on "mv" here but not "cp"). + # always do "cp -a" instead of "$cmd". remove old if we are renaming. + cp -a "$_mpath/$_otag/$_oval" "$_mpath/$_ntag/$_nval" + if [ "$str" == "rename" ]; then + /opt/vyatta/sbin/my_delete $_otag "$_ovalu" >&/dev/null 3>&1 + fi return 0 } |