projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zshrc: Fix `salias' wrt parameter scope
[grml-etc-core.git]
/
etc
/
grml
/
script-functions
diff --git
a/etc/grml/script-functions
b/etc/grml/script-functions
index
3ecd65b
..
a39e3d8
100644
(file)
--- a/
etc/grml/script-functions
+++ b/
etc/grml/script-functions
@@
-51,7
+51,7
@@
setdialog(){
check4progs(){
local RC=''
for arg in $* ; do
check4progs(){
local RC=''
for arg in $* ; do
-
type -p
$arg >/dev/null 2>&1 || RC="$arg"
+
which
$arg >/dev/null 2>&1 || RC="$arg"
done
if [ -n "$RC" ] ; then
echo "$RC not installed"
done
if [ -n "$RC" ] ; then
echo "$RC not installed"
@@
-76,8
+76,9
@@
stringinstring(){
# {{{ reread boot command line; echo last parameter's argument or return false.
getbootparam(){
# {{{ reread boot command line; echo last parameter's argument or return false.
getbootparam(){
- stringinstring " $1=" /proc/cmdline || return 1
- result="${/proc/cmdline##*$1=}"
+ CMDLINE=$(cat /proc/cmdline)
+ stringinstring " $1=" "$CMDLINE" || return 1
+ result="${CMDLINE##*$1=}"
result="${result%%[ ]*}"
echo "$result"
return 0
result="${result%%[ ]*}"
echo "$result"
return 0
@@
-86,7
+87,7
@@
getbootparam(){
# {{{ check boot commandline for specified option
checkbootparam(){
# {{{ check boot commandline for specified option
checkbootparam(){
- stringin
string
" $1" /proc/cmdline
+ stringin
file
" $1" /proc/cmdline
return "$?"
}
# }}}
return "$?"
}
# }}}