projects
/
grml-shlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2e3d65
)
Make sure to accept only integers in _setDebugLevel()
v1.03.1
author
Michael Prokop
<mika@grml.org>
Fri, 7 Aug 2009 11:35:47 +0000
(13:35 +0200)
committer
Michael Prokop
<mika@grml.org>
Fri, 7 Aug 2009 11:43:51 +0000
(13:43 +0200)
debian/changelog
patch
|
blob
|
history
sh-lib
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
d4ca9de
..
ab5822b
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-1,15
+1,17
@@
grml-shlib (1.03.1) unstable; urgency=low
* Fix bashisms.
grml-shlib (1.03.1) unstable; urgency=low
* Fix bashisms.
+ * Make sure to accept only integers in _setDebugLevel().
* Debian packaging updates:
- Update build-depend to dh >=5
- Bump Standard-Version to 3.8.2 (no further changes)
- Switch binary-indep/binary-arch
- Adjust long description
- Bump compat version to 5
* Debian packaging updates:
- Update build-depend to dh >=5
- Bump Standard-Version to 3.8.2 (no further changes)
- Switch binary-indep/binary-arch
- Adjust long description
- Bump compat version to 5
+ - Adjust VCS headers
- Adjust copyright file (reference specific GPL version)
- Adjust copyright file (reference specific GPL version)
- -- Michael Prokop <mika@grml.org> Fri, 07 Aug 2009 1
2:49:0
9 +0200
+ -- Michael Prokop <mika@grml.org> Fri, 07 Aug 2009 1
3:35:1
9 +0200
grml-shlib (1.02.13) unstable; urgency=low
grml-shlib (1.02.13) unstable; urgency=low
diff --git
a/sh-lib
b/sh-lib
index
15f15ff
..
1975585
100644
(file)
--- a/
sh-lib
+++ b/
sh-lib
@@
-69,7
+69,7
@@
vprint()
local type_="$2"
local message_="$3"
local type_="$2"
local message_="$3"
- if [
$VERBOSE__ -ge $level_
-a -n "$message_" ]; then
+ if [
"$VERBOSE__" -ge "$level_"
-a -n "$message_" ]; then
echo -n "$type_" >&2
echo "$message_" >&2
fi
echo -n "$type_" >&2
echo "$message_" >&2
fi
@@
-285,8
+285,8
@@
checkId()
local user_id_=''
local user_id_=''
- user_id_=
`id -u`
- if [
$user_id_
!= "$to_check_" ]; then
+ user_id_=
$(id -u)
+ if [
"$user_id_"
!= "$to_check_" ]; then
if [ -z "$message_" ]; then
$error_function_ "UID \"$user_id_\" is not \"$to_check_\"" 77
else
if [ -z "$message_" ]; then
$error_function_ "UID \"$user_id_\" is not \"$to_check_\"" 77
else
@@
-727,10
+727,14
@@
_checkBootParam()
}
_checkBootParam
}
_checkBootParam
-
_setDebugLevel()
{
_setDebugLevel()
{
- local debug_="${DEBUG:-0}"
+ # accept only integer as arguments
+ if echo "$DEBUG" | grep -E -q '^[0-9]+$' ; then
+ local debug_="${DEBUG:-0}"
+ else
+ local debug_="0"
+ fi
VERBOSE__="$debug_"
}
_setDebugLevel
VERBOSE__="$debug_"
}
_setDebugLevel