[projects/geninitrd] don't try to mount /usr if it's not on separate fs
atler
atler at pld-linux.org
Wed Sep 28 22:11:10 CEST 2022
commit 0efb042f4d4d381eeb37fa06c1201de659528ef5
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Sep 28 22:04:22 2022 +0200
don't try to mount /usr if it's not on separate fs
geninitrd | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 2cb8d34..0a422ee 100755
--- a/geninitrd
+++ b/geninitrd
@@ -1085,8 +1085,10 @@ initrd_gen_initramfs_switchroot() {
# probably break (sometimes even silently) in mysterious ways. Consult
# http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
# for more information.
- echo trying to mount /usr
- chroot /newroot mount -n /usr
+ if chroot /newroot findmnt -s -n /usr > /dev/null 2> /dev/null; then
+ echo trying to mount /usr
+ chroot /newroot mount -n /usr
+ fi
exec switch_root /newroot $init ${1:+"$@"}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/geninitrd.git/commitdiff/9552a28d03e1b9bf8c5fdb933d5fa8464022a219
More information about the pld-cvs-commit
mailing list