summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-02-14 16:45:14 +0100
committerDaniel Baumann <daniel@debian.org>2012-04-05 07:44:54 +0200
commit56000a6516968b10e0d2e1937f4084938babf39f (patch)
tree1c9a0e0aa4cba2563232651bd820ff06741de65e /scripts
parent4b2c4a70cdca5a9c192401e654743665a56e501c (diff)
downloadlive-boot-56000a6516968b10e0d2e1937f4084938babf39f.tar.gz
live-boot-56000a6516968b10e0d2e1937f4084938babf39f.zip
Some minor cleanups.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/live-helpers13
1 files changed, 4 insertions, 9 deletions
diff --git a/scripts/live-helpers b/scripts/live-helpers
index cbc2c44..f8f635c 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -1068,8 +1068,8 @@ link_files ()
then
mkdir -p "${dest}"
prev="$(dirname "${dest}")"
- chown $(stat -c %u:%g "${prev}") "${dest}"
- chmod $(stat -c %a "${prev}") "${dest}"
+ chown --reference "${prev}" "${dest}"
+ chmod --reference "${prev}" "${dest}"
fi
link_files "${src}" "${dest}" "${src_mask}"
else
@@ -1252,16 +1252,11 @@ get_custom_mounts () {
# We sort the list according to destination so we're sure that
# we won't hide a previous mount. We also ignore duplicate
# destinations in a more or less arbitrary way.
- [ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts}
- rm ${bindings}
+ [ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts} && rm ${bindings}
# After all mounts are considered we add symlinks so they
# won't be hidden by some mount.
- [ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts}
- rm ${links}
-
- rm -f ${bindings} ${links} 2> /dev/null
- echo ${custom_mounts}
+ [ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts} && rm ${links}
}
do_custom_mounts () {