Skip to content

Commit

Permalink
compat: fixed scripts/ifup -o debug handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mtomaschewski committed Feb 19, 2014
1 parent 69d6892 commit 97fe1bf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions client/suse/scripts/ifup.in
Expand Up @@ -141,6 +141,7 @@ case $1 in
-o) shift ;;
esac
OPTIONS=$@
opt_debug=""
opt_quiet=""
opt_force=""
while [ $# -gt 0 ]; do
Expand All @@ -154,6 +155,13 @@ while [ $# -gt 0 ]; do
shift
done

# apply debug from config or argument
case $DEBUG in
no|"") DEBUG="no" ;;
yes) opt_debug="--debug most" ;;
*) opt_debug="--debug ${DEBUG}" ;;
esac

# Map wicked return codes to compatibility codes
rc_map_return()
{
Expand Down Expand Up @@ -230,25 +238,29 @@ wicked_client="@wicked_sbindir@/wicked"
case $SCRIPTNAME in
ifup)
$wicked_client \
${opt_debug} \
ifup "$INTERFACE"
rc=$(rc_map_return "$?")
;;
ifdown)
$wicked_client \
${opt_debug} \
ifdown \
${opt_force} \
"$INTERFACE"
rc=$(rc_map_return "$?")
;;
ifstatus)
$wicked_client \
${opt_debug} \
ifstatus \
${opt_quiet} \
"$INTERFACE"
rc=$(rc_map_status "$?")
;;
ifprobe)
$wicked_client \
${opt_debug} \
ifcheck \
--changed \
${opt_quiet} \
Expand Down

0 comments on commit 97fe1bf

Please sign in to comment.