]>
git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/98systemd/dracut-mount.sh
ae01512ce2e65faf47ffccf1a694b7f5a5df20d3
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4 export DRACUT_SYSTEMD
=1
5 if [ -f /dracut-state.sh
]; then
6 .
/dracut-state.sh
2>/dev
/null
8 type getarg
>/dev
/null
2>&1 || .
/lib
/dracut-lib.sh
10 source_conf
/etc
/conf.d
12 make_trace_mem
"hook mount" '1:shortmem' '2+:mem' '3+:slab'
14 getarg
'rd.break=mount' -d 'rdbreak=mount' && emergency_shell
-n mount
"Break mount"
15 # mount scripts actually try to mount the root filesystem, and may
16 # be sourced any number of times. As soon as one suceeds, no more are sourced.
19 if ismounted
"$NEWROOT"; then
20 usable_root
"$NEWROOT" && break;
23 for f
in $hookdir/mount
/*.sh
; do
25 if ismounted
"$NEWROOT"; then
26 usable_root
"$NEWROOT" && break;
27 warn
"$NEWROOT has no proper rootfs layout, ignoring and removing offending mount hook"
34 [ $i -gt 20 ] && action_on_fail
"Can't mount root filesystem" && break
37 export -p > /dracut-state.sh