diff options
author | Alexander Hall <halex@cvs.openbsd.org> | 2012-07-13 14:50:35 +0000 |
---|---|---|
committer | Alexander Hall <halex@cvs.openbsd.org> | 2012-07-13 14:50:35 +0000 |
commit | b2d43cca62e367cc7f747d8d43b4ba4e03bcd011 (patch) | |
tree | fc62936456be7173b1995e674a6b024dd9ab63c6 /distrib/landisk | |
parent | 5ce96273ef308ab90a54b14b134e2e4adf0d8f20 (diff) |
copy boot loaders using cat and shell redirection rather than cp,
since the latter may insert holes in the target files, which could
be bad for the boot process
ok deraadt@ guenther@
Diffstat (limited to 'distrib/landisk')
-rw-r--r-- | distrib/landisk/ramdisk/install.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/distrib/landisk/ramdisk/install.md b/distrib/landisk/ramdisk/install.md index 9cdbf875d18..d4c0fc13fd6 100644 --- a/distrib/landisk/ramdisk/install.md +++ b/distrib/landisk/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.27 2012/07/10 14:25:00 halex Exp $ +# $OpenBSD: install.md,v 1.28 2012/07/13 14:50:34 halex Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,9 +37,11 @@ md_installboot() { # use extracted mdec if it exists (may be newer) if [ -d /mnt/usr/mdec ]; then - cp /mnt/usr/mdec/boot /mnt/boot + # Use cat to avoid holes created by cp(1) + cat /mnt/usr/mdec/boot > /mnt/boot elif [ -d /usr/mdec ]; then - cp /usr/mdec/boot /mnt/boot + # Use cat to avoid holes created by cp(1) + cat /usr/mdec/boot > /mnt/boot fi } |