Add warn() function to log warnings but not die()

master
Philippe Seewer 2009-06-16 18:05:45 +02:00
parent 0fd1ab9d87
commit 9f10836d63
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,10 @@ die() {
exit 1
}

warn() {
printf "<1>Warning: $1\n" > /dev/kmsg
}

check_occurances() {
# Count the number of times the character $ch occurs in $str
# Return 0 if the count matches the expected number, 1 otherwise