Skip to content

Commit

Permalink
Workaround busybox's inability to detect symlinks with [ -e ].
Browse files Browse the repository at this point in the history
link_files() won't remove symlinks at the destination, which could
cause trouble.
  • Loading branch information
Tails developers authored and daniel-baumann committed Apr 1, 2012
1 parent 13bb565 commit c86b5d4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/live-helpers
Expand Up @@ -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
Expand Down

0 comments on commit c86b5d4

Please sign in to comment.