From: Tails developers Date: Thu, 9 Feb 2012 11:08:58 +0000 (+0100) Subject: Workaround busybox's inability to detect symlinks with [ -e ]. X-Git-Tag: debian/3.0_a26-1~52 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=c86b5d49885f2e52e06f27569b666e68a81d860c;p=live-boot-grml.git Workaround busybox's inability to detect symlinks with [ -e ]. link_files() won't remove symlinks at the destination, which could cause trouble. --- diff --git a/scripts/live-helpers b/scripts/live-helpers index 3ec1e7b..3de16e5 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -596,14 +596,11 @@ link_files () fi link_files "${src}" "${dest}" "${src_mask}" else - if [ -e "${dest}" ]; - then - rm -rf "${dest}" - fi if [ -n "${src}" ]; then src="$(echo ${src} | sed "s|^${src_mask}||")" fi + rm -rf "${dest}" 2> /dev/null ln -s "${src}" "${dest}" fi done