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>
9 years ago
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.
10 years ago
Harald Hoyer
6d58fa27a4
change "while read x" to cope with EOF without newline
...
while read x || [ -n "$x" ]
should do the trick
10 years ago
Harald Hoyer
967cc19ab1
remove all vim and emacs code format comments
11 years ago
Alexander Tsoy
ded4c82ace
usrmount: always install
...
/usr should be mounted by initramfs even if /sbin/init lives in /
11 years ago
Alexander Tsoy
0106da599a
usrmount/module-setup.sh: fixed typo
12 years ago
Harald Hoyer
8bcfd683bd
*/module-setup.sh: add comments for dracut called functions
12 years ago
Harald Hoyer
1a1c80febe
usrmount: do not install, if /sbin/init does not live in /usr
12 years ago
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
12 years ago
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 ]
12 years ago
Harald Hoyer
fe654ff0aa
usrmount: in systemd mode, functionality is in systemd
12 years ago
Harald Hoyer
e6fcec9173
usrmount/mount-usr.sh: filter "subvol=" from root rflags
...
https://bugzilla.redhat.com/show_bug.cgi?id=890577
12 years ago
Amadeusz Żołnowski
221c342d50
98usrmount: [ "x$_usr_found" != "x" ] - removed redundant 'x'
13 years ago
Amadeusz Żołnowski
b56e174322
98usrmount: print mount options
13 years ago
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 /.
13 years ago
Harald Hoyer
f0e10d9351
usrmount/mount-usr.sh: check the right path with ismounted
13 years ago
Harald Hoyer
f225f180e3
usrmount/mount-usr.sh: give emergency_shell if /usr mount failed
13 years ago
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
13 years ago
Amadeusz Żołnowski
9fb01d49d6
new option: rd.skipfsck to skip fsck for rootfs and /usr
13 years ago
Amadeusz Żołnowski
2ee48b4b4b
98usrmount: force mounting /usr read-only option (rd.usrmount.ro)
13 years ago
Amadeusz Żołnowski
4ea629b9e1
98usrmount: depend on fs-lib
13 years ago
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.
13 years ago
Harald Hoyer
9eded206c9
98usrmount/mount-usr.sh: check, if we have $NEWROOT/etc/fstab
13 years ago
Harald Hoyer
b642ce5340
98usrmount/mount-usr.sh: ignore comments in fstab
13 years ago
Colin Guthrie
e0a38de881
mount-usr: Calculate and pass full fsck options when mounting /usr.
...
Edited-By: Harald Hoyer <harald@redhat.com>
13 years ago
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.
13 years ago
Harald Hoyer
fb67e4aa36
shutdown on demand
...
Do not save and restore the initramfs, but instead, just unpack the
default initramfs for shutdown on shutdown.
13 years ago
Harald Hoyer
075de7be45
98usrmount/mount-usr.sh: remove extra slash
...
otherwise we have /sysroot//usr in fstab
13 years ago
Harald Hoyer
1b91369455
98usrmount/mount-usr.sh: do not mount /usr read-only
...
https://bugzilla.redhat.com/show_bug.cgi?id=782897
13 years ago
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>
13 years ago
Duane Griffin
345f9fa77e
98usrmount/mount-usr.sh: Don't pass mount options to fsck
13 years ago
Colin Guthrie
7eb8797b81
Fix /usr mounting due to variable name typo
13 years ago
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.
13 years ago