Commit Graph

33 Commits (c8ebb80590be2dbe0cb63c9696903889b51efc75)

Author SHA1 Message Date
dyoung@redhat.com 6870007674 Revert "Let user specify the action after fail"
This reverts commit 9d787df196

action_on_fail is useless thus remove the commits for it one by one.

Signed-off-by: Dave Young <dyoung@redhat.com>
2015-11-13 13:22:34 +01:00
Mike Gilbert 5899f2f516 Replace echo -n with printf in code with a /bin/sh shebang
POSIX does not mandate that echo support the -n parameter.
printf has more well-defined behavior.
2015-07-14 22:22:14 -04:00
Harald Hoyer 6d58fa27a4 change "while read x" to cope with EOF without newline
while read x || [ -n "$x" ]

should do the trick
2015-04-28 11:39:15 +02:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Alexander Tsoy ded4c82ace usrmount: always install
/usr should be mounted by initramfs even if /sbin/init lives in /
2013-12-11 14:38:28 +01:00
Alexander Tsoy 0106da599a usrmount/module-setup.sh: fixed typo 2013-10-25 17:06:44 +02:00
Harald Hoyer 8bcfd683bd */module-setup.sh: add comments for dracut called functions 2013-10-08 10:37:56 +02:00
Harald Hoyer 1a1c80febe usrmount: do not install, if /sbin/init does not live in /usr 2013-07-24 13:41:57 +02:00
Colin Guthrie d57b8833c4 usrmount: Fix miss-detection of btrfs subvolumes.
This causes the root FS options to be incorrectly applied to to /usr
In some cases this can cause boot failure e.g. due to and XFS /usr
not supporting the 'acl' option from the ext4 root FS.

https://bugs.mageia.org/show_bug.cgi?id=9884
2013-05-06 14:06:07 +02:00
Baoquan He 9d787df196 Let user specify the action after fail
Currently the default action is emergency_shell when failure happened
during system boot. In kdump, this default may not be expected. E.g,
if dump target is not rootfs, it does not matter if mount root failed.
Adding an action which allow dracut always go ahead though failure
happens is needed by kdump.

So here add a function action_on_fail() and cmdline parameter
action_on_fail=<shell | continue>. Use action_to_fail() to replace
emergency_shell which was called after failure. By $(getarg action_on_fail=),
decide to drop into shell, or to leave away the failure and go ahead.

v3->v4:
add handling of selinux policy loaded failure, and change code format to
be consitent

Signed-off-by: Baoquan He <bhe@redhat.com>

[Edited by harald@redhat.com]
2013-04-09 11:14:08 +02:00
Harald Hoyer fe654ff0aa usrmount: in systemd mode, functionality is in systemd 2013-03-06 17:29:12 +01:00
Harald Hoyer e6fcec9173 usrmount/mount-usr.sh: filter "subvol=" from root rflags
https://bugzilla.redhat.com/show_bug.cgi?id=890577
2013-01-02 14:06:44 +01:00
Amadeusz Żołnowski 221c342d50 98usrmount: [ "x$_usr_found" != "x" ] - removed redundant 'x' 2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski b56e174322 98usrmount: print mount options 2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski 5afa957915 98usrmount: use rw and ro options instead of rd.usrmount.ro
In result /usr is forced to be mounted ro or rw along with /.
2012-07-26 16:35:13 +02:00
Harald Hoyer f0e10d9351 usrmount/mount-usr.sh: check the right path with ismounted 2012-07-03 18:20:46 +02:00
Harald Hoyer f225f180e3 usrmount/mount-usr.sh: give emergency_shell if /usr mount failed 2012-07-02 18:54:07 +02:00
Harald Hoyer 7209df9e91 do not umount root, remount it. do not mount ro if not specified
also mount /usr readonly if "ro" is specified on the command line
if /usr is a btrfs subvolume of root, use the same mount options
2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 9fb01d49d6 new option: rd.skipfsck to skip fsck for rootfs and /usr 2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 2ee48b4b4b 98usrmount: force mounting /usr read-only option (rd.usrmount.ro) 2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 4ea629b9e1 98usrmount: depend on fs-lib 2012-06-29 12:41:27 +02:00
Harald Hoyer 840d8e4733 add filesystem options to fsck_single()
if we have e.g. special btrfs options for "/" and "/usr", we want to use
those for the test mount to determine if the filesystem is corrupted.
2012-05-31 12:57:23 +02:00
Harald Hoyer 9eded206c9 98usrmount/mount-usr.sh: check, if we have $NEWROOT/etc/fstab 2012-02-28 16:35:08 +01:00
Harald Hoyer b642ce5340 98usrmount/mount-usr.sh: ignore comments in fstab 2012-02-28 12:54:01 +01:00
Colin Guthrie e0a38de881 mount-usr: Calculate and pass full fsck options when mounting /usr.
Edited-By: Harald Hoyer <harald@redhat.com>
2012-02-22 18:11:27 +01:00
Harald Hoyer cd9592385d 98usrmount/mount-usr.sh: honor fs_passno in /etc/fstab
If the sixth field in /etc/fstab is "0" or not present for /usr, do not
run fsck.

This prevents fsck for nfs /usr also.
2012-02-20 17:28:58 +01:00
Harald Hoyer fb67e4aa36 shutdown on demand
Do not save and restore the initramfs, but instead, just unpack the
default initramfs for shutdown on shutdown.
2012-02-13 07:08:08 +01:00
Harald Hoyer 075de7be45 98usrmount/mount-usr.sh: remove extra slash
otherwise we have /sysroot//usr in fstab
2012-02-09 13:58:49 +01:00
Harald Hoyer 1b91369455 98usrmount/mount-usr.sh: do not mount /usr read-only
https://bugzilla.redhat.com/show_bug.cgi?id=782897
2012-01-23 11:32:29 +01:00
Cong Wang 1b7fd0fa3e Check module dependencies of mount points
Like -H, we need to poll every module to check if it is needed
to mount a specific device in '--mount'.

Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-01-13 11:35:49 +01:00
Duane Griffin 345f9fa77e 98usrmount/mount-usr.sh: Don't pass mount options to fsck 2012-01-13 10:23:45 +01:00
Colin Guthrie 7eb8797b81 Fix /usr mounting due to variable name typo 2011-12-02 13:03:01 +01:00
Harald Hoyer 470ee2d214 99base/init, 98usrmount: mount /usr if found in /sysroot/etc/fstab
We cannot boot correctly without /usr, because of
http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
so, we mount /usr readonly.
2011-11-15 09:47:17 +01:00