From 8a1841c2387ea70c85957d186ea25b71ca4a383b Mon Sep 17 00:00:00 2001 From: immarvin Date: Wed, 6 Mar 2013 08:50:45 +0000 Subject: [PATCH] prevent remount root filesystem in rw mode during reboot git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15397 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/genimage | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 539f27c8c..a1cb29cf6 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -671,12 +671,13 @@ unless ($dracutmode) { #in dracut mode, we delegate all this activity } } -if ($dracutmode) { +#if ($dracutmode) { # modify etc/rc.sysinit, prevent remounting # TODO: need to find one way to prevent remounting - my $SYSINITFILE; - my $TMPSYSINITFILE; + if (-f "$rootimg_dir/etc/rc.sysinit") { + my $SYSINITFILE; + my $TMPSYSINITFILE; # backup etc/rc.sysinit file before modifing it system("cp -a $rootimg_dir/etc/rc.sysinit $rootimg_dir/etc/rc.sysinit.backup"); open($SYSINITFILE, "$rootimg_dir/etc/rc.sysinit"); @@ -696,7 +697,7 @@ if ($dracutmode) { close($TMPSYSINITFILE); cp("/tmp/rc.sysinit.tmp", "$rootimg_dir/etc/rc.sysinit"); } -} +#} # before mkinitrd, run depmod to generate modules.dep system("chroot $rootimg_dir depmod $kernelver");