From 3541f12849b277a2405a4d3bf692cf62f2045126 Mon Sep 17 00:00:00 2001 From: torben Date: Thu, 9 Apr 2015 03:27:39 +0200 Subject: Adding functions library. --- testModule/library.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 testModule/library.sh (limited to 'testModule/library.sh') diff --git a/testModule/library.sh b/testModule/library.sh new file mode 100644 index 00000000..d3f97aff --- /dev/null +++ b/testModule/library.sh @@ -0,0 +1,38 @@ +cat /proc/cmdline >/tmp/cmdline + +replace_cmd() { + sed --regexp-extended "s/$1=[^ ]*/$1=$2/g" /tmp/cmdline -i +} + +getcmdline() { + local _line + local _i + local CMDLINE_ETC_D + local CMDLINE_ETC + unset _line + + if [ -e /etc/cmdline ]; then + while read -r _line; do + CMDLINE_ETC="$CMDLINE_ETC $_line"; + done