retitle 493407 lsb-base: bashism in init-functions + kills networking on reboot 
on systems where /bin/sh = /bin/bash
thanks

Aha, just found this bug.  This is actually bad for people using bash as
/bin/sh too with -e set.

Your innocent looking changes to the logging system include:
 log_warning_msg () {
-    if log_use_fancy_output; then
-        YELLOW=`$TPUT setaf 3`
-        NORMAL=`$TPUT op`
-        /bin/echo -e "${YELLOW}*${NORMAL} $@"
-    else
-        echo "$@"
+    if [ -n "${1:-}" ]; then
+        log_begin_msg $@
     fi
+    log_end_msg -1
 }

/etc/init.d/netbase is run with:
#!/bin/sh -e

and then does:
process_options() {
    [ -e /etc/network/options ] || return 0
    log_warning_msg "/etc/network/options still exists and it will be IGNORED! R
ead README.Debian of netbase."
}

This finds the file on my system (yes I should have removed it ages ago)
and then that function returns with -1 here and the script exits without
bringing up interfaces breaking unrelated software.

Adding
         || /bin/true
to the end of log_warning_msg line works around this in netbase but what
else has this broken? :(

Simon.

-- 
Just another wannabie |   "To infinity and beyond!"    |  Just another fool
----------------------+                                +-------------------
This message was brought to you by the letter R and the number 10.
htag.pl 0.0.24 -- http://www.earth.li/projectpurple/progs/htag.html



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to