From: David Dillow Date: Sat, 23 May 2009 02:29:22 +0000 (-0400) Subject: lib: create a library for useful shell functions X-Git-Tag: 0.1~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df44688f3e7ec09449369270ddead3be86f54506;p=thirdparty%2Fdracut.git lib: create a library for useful shell functions There are several snippits of shell code that are useful to multiple scripts. Start by moving getarg() into the library. Signed-off-by: David Dillow --- diff --git a/modules.d/99base/dracut-lib b/modules.d/99base/dracut-lib new file mode 100644 index 000000000..1f31933ff --- /dev/null +++ b/modules.d/99base/dracut-lib @@ -0,0 +1,16 @@ +#!/bin/sh +# +# Licensed under the GPLv2 +# +# Copyright 2008, Red Hat, Inc. +# Jeremy Katz + +getarg() { + local o line + [ "$CMDLINE" ] || read CMDLINE /dev/null 2>&1 mount -t sysfs /sys /sys >/dev/null 2>&1 mount -t tmpfs -omode=0755 udev /dev >/dev/null 2>&1 -read CMDLINE