diff options
author | Will Woods <wwoods@redhat.com> | 2012-07-27 13:12:28 -0400 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2012-07-30 12:23:32 +0200 |
commit | 7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd (patch) | |
tree | 3dd8d02983472f89a1e1946ac1234b8a0001aca7 | |
parent | 3e964eeb9674119d7c08ae0b1aaee76391a2ba93 (diff) | |
download | dracut-7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd.tar.gz dracut-7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd.tar.bz2 dracut-7e2285a48ac3d86a06a2d94d6c46fcf7011c7dfd.zip |
add comment for getargbool()
I always forget how getargbool works. Add a comment documenting it.
-rwxr-xr-x | modules.d/99base/dracut-lib.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 2eb12249..3a7be9a8 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -145,6 +145,13 @@ getarg() { return 1 } +# getargbool <defaultval> <args...> +# False if "getarg <args...>" returns "0", "no", or "off". +# True if getarg returns any other non-empty string. +# If not found, assumes <defaultval> - usually 0 for false, 1 for true. +# example: getargbool 0 rd.info +# true: rd.info, rd.info=1, rd.info=xxx +# false: rd.info=0, rd.info=off, rd.info not present (default val is 0) getargbool() { local _b unset _b |