Skip to content
Snippets Groups Projects
Commit 838929d2 authored by Christopher's avatar Christopher
Browse files

lipnsa hook: better parameter handling

still not optimal, e.g. the help message cannot be printed without
preceded warnings.
parent 3d244b68
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,25 @@
# Lars Beckers, larsb@fsmpi.rwth-aachen.de, September 2014
LIPSTICK="/root/cdrom"
if [ -n "$1" ] && [ ! "$1" == "--help" ]; then
LOGFUNCTIONSSOURCE="/scripts/casper-functions"
TARGET="/root"
if [ -e "${LOGFUNCTIONSSOURCE}" ]; then
source ${LOGFUNCTIONSSOURCE}
else
echo "Warning: ${LOGFUNCTIONSSOURCE} does not exist. Cannot source casper functions!"
fi
if [ -n "$1" ] && [ -d "$1" ]; then
LIPSTICK="$1"
shift
else
log_warning_msg "LIPSTICK mount point not specified. Falling back to ${LIPSTICK}."
fi
LIPSTATS="${LIPSTICK}/lipstats"
TARGET="/root"
LOGFUNCTIONSSOURCE="/scripts/casper-functions"
if [ "$1" == "--help" ]; then
if [ $# -gt 0 ]; then
echo "collects system information, i.e. hardware and what the kernel thinks about it"
echo "called as liphook before leaving initramfs"
echo "usage: lipnsa.sh"
......@@ -41,8 +51,6 @@ if [ "$1" == "--help" ]; then
exit
fi
source ${LOGFUNCTIONSSOURCE}
if [ -f /proc/cmdline ]; then
grep fnord /proc/cmdline
if [ $? == 0 ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment