aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-02-21 01:07:46 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-02-21 01:07:46 +0100
commitf5f4d15d2f35837fd17dde8dc9afc744185f11aa (patch)
tree014a71175978473f9dacb40466de49ec0747c036
parentMerge remote-tracking branch 'zx2c4/master' into devel (diff)
downloadbetter-initramfs-f5f4d15d2f35837fd17dde8dc9afc744185f11aa.tar.xz
better-initramfs-f5f4d15d2f35837fd17dde8dc9afc744185f11aa.zip
Do not die with RAID
The UUIDs of disks in particular RAID setups are the same. So, we need this symlinking to carry the -f so that we don't get a fatal error. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rwxr-xr-xsourceroot/functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sourceroot/functions.sh b/sourceroot/functions.sh
index 3666883..a11b296 100755
--- a/sourceroot/functions.sh
+++ b/sourceroot/functions.sh
@@ -118,8 +118,8 @@ populate_dev_disk_by_label_and_uuid() {
vars="${blkid_output#*:}"
eval "${vars}"
- [ "${LABEL}" ] && run ln -s "../../${block_device}" "/dev/disk/by-label/${LABEL}"
- [ "${UUID}" ] && run ln -s "../../${block_device}" "/dev/disk/by-uuid/${UUID}"
+ [ "${LABEL}" ] && run ln -sf "../../${block_device}" "/dev/disk/by-label/${LABEL}"
+ [ "${UUID}" ] && run ln -sf "../../${block_device}" "/dev/disk/by-uuid/${UUID}"
done
}