X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Flsb-functions;h=a2690076afc0df796b52d3668cd7af26b23ad83f;hb=3145c8f9f62d9a2d122c4c4489dbccb0f2251f7b;hp=b9be50791c2954c7e7677a92a8e7a0d74000aa3e;hpb=cd1c920eff9eef7e56ea4928cc69195e01fc53b3;p=grml-etc-core.git diff --git a/etc/grml/lsb-functions b/etc/grml/lsb-functions index b9be507..a269007 100644 --- a/etc/grml/lsb-functions +++ b/etc/grml/lsb-functions @@ -368,43 +368,6 @@ ewend() { return $retval } -# bool get_bootparam(param) -# -# return 0 if gentoo=param was passed to the kernel -# -# EXAMPLE: if get_bootparam "nodevfs" ; then .... -# -get_bootparam() { - local x copt params retval=1 - - [ ! -r "/proc/cmdline" ] && return 1 - - for copt in $(< /proc/cmdline) - do - if [ "${copt%=*}" = "gentoo" ] - then - params="$(gawk -v PARAMS="${copt##*=}" ' - BEGIN { - split(PARAMS, nodes, ",") - for (x in nodes) - print nodes[x] - }')" - - # Parse gentoo option - for x in ${params} - do - if [ "${x}" = "$1" ] - then -# printf "YES\n" - retval=0 - fi - done - fi - done - - return ${retval} -} - # char *add_suffix(char * configfile) # # Returns a config file name with the softlevel suffix @@ -420,21 +383,6 @@ add_suffix() { return 0 } -# bool get_mount_fstab(path) -# -# return the parameters to pass to the mount command generated from fstab -# -# EXAMPLE: cmd=$( get_mount_fstab /proc ) -# cmd=${cmd:--t proc none /proc} -# mount -n ${cmd} -# -get_mount_fstab() { - awk '$1 ~ "^#" { next } - $2 == "'$*'" { if (found++ == 0) { print "-t "$3,"-o "$4,$1,$2 } } - END { if (found > 1) { print "More than one entry for '$*' found in /etc/fstab!" > "/dev/stderr" } } - ' /etc/fstab -} - # char *reverse_list(list) # # Returns the reversed order of list