From: Seewer Philippe <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
To: "<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>"
<initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [RFC PATCH 1/5] Add "die" and some minor changes in base
Date: Fri, 12 Jun 2009 17:11:49 +0200 [thread overview]
Message-ID: <4A327035.6060100@bfh.ch> (raw)
---
modules.d/99base/dracut-lib | 6 ++++++
modules.d/99base/init | 14 +++-----------
modules.d/99base/parse-root-opts.sh | 1 -
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/modules.d/99base/dracut-lib b/modules.d/99base/dracut-lib
index df9cb52..336b235 100644
--- a/modules.d/99base/dracut-lib
+++ b/modules.d/99base/dracut-lib
@@ -21,6 +21,12 @@ source_all() {
for f in "/$1"/*.sh; do [ -f "$f" ] && . "$f"; done
}
+die() {
+ printf "FATAL: $1\n"
+ printf "Refusing to continue\n"
+ exit 1
+}
+
check_occurances() {
# Count the number of times the character $ch occurs in $str
# Return 0 if the count matches the expected number, 1 otherwise
diff --git a/modules.d/99base/init b/modules.d/99base/init
index 998f5e6..ec9c785 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -41,17 +41,8 @@ mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts >/dev/null 2>&1
getarg 'rdbreak=cmdline' && emergency_shell
source_all cmdline
-if [ -z "$rootok" -a -n "${root%%error:*}" ]; then
- root="error: No handler for root=${root}"
-fi
-
-if [ -n "$root" -a -z "${root%%error:*}" ]; then
- case "${root%%:*}" in
- '') echo "FATAL: no root= option specified, and no network support" ;;
- error) echo "FATAL: ${root#error:}" ;;
- esac
- emergency_shell
-fi
+[ -z "$root" ] && die "No or empty root= argument"
+[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
# Network root scripts may need updated root= options,
# so deposit them where they can see them (udev purges the env)
@@ -59,6 +50,7 @@ fi
echo "root='$root'"
echo "rflags='$rflags'"
echo "fstype='$fstype'"
+ echo "netroot='$netroot'"
echo "NEWROOT='$NEWROOT'"
} > /tmp/root.info
diff --git a/modules.d/99base/parse-root-opts.sh b/modules.d/99base/parse-root-opts.sh
index 7fc4f47..e253110 100755
--- a/modules.d/99base/parse-root-opts.sh
+++ b/modules.d/99base/parse-root-opts.sh
@@ -11,4 +11,3 @@ if [ -z "$fstype" ]; then
fstype="auto"
fi
-export fstype rflags root
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2009-06-12 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-12 15:11 Seewer Philippe [this message]
[not found] ` <4A327035.6060100-omB+W0Dpw2o@public.gmane.org>
2009-06-12 15:41 ` [RFC PATCH 1/5] Add "die" and some minor changes in base David Dillow
[not found] ` <1244821283.15165.2.camel-FqX9LgGZnHWDB2HL1qBt2PIbXMQ5te18@public.gmane.org>
2009-06-12 18:40 ` Warren Togami
[not found] ` <4A32A106.1050806-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-12 19:27 ` Warren Togami
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A327035.6060100@bfh.ch \
--to=philippe.seewer-omb+w0dpw2o@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.