]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/99base/loginit.sh
TEST-30-ISCSI/test.sh: factor out client runs
[thirdparty/dracut.git] / modules.d / 99base / loginit.sh
1 #!/bin/sh
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4
5 # turn off debugging
6 set +x
7
8 QUIET=$1
9
10 printf -- "$$" > /run/initramfs/loginit.pid
11
12 [ -e /dev/kmsg ] && exec 5>/dev/kmsg || exec 5>/dev/null
13 exec 6>/run/initramfs/init.log
14
15 while read line; do
16 if [ "$line" = "DRACUT_LOG_END" ]; then
17 rm -f /run/initramfs/loginit.pipe
18 exit 0
19 fi
20 echo "<31>dracut: $line" >&5
21 # if "quiet" is specified we output to /dev/console
22 [ -n "$QUIET" ] && echo "dracut: $line"
23 echo "$line" >&6
24 done