From f184cef63f63fb003ef94e4808365c379da12c8352a21c0d0435dfc20f981a65 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 6 Jun 2012 12:17:39 +0000 Subject: [PATCH] - Add the proper exit codes to setup-pulseaudio script (for avoiding the errors during installation, too) OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=92 --- pulseaudio.changes | 6 ++++++ setup-pulseaudio | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pulseaudio.changes b/pulseaudio.changes index 2e9d3a2..f35ac22 100644 --- a/pulseaudio.changes +++ b/pulseaudio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 6 14:16:34 CEST 2012 - tiwai@suse.de + +- Add the proper exit codes to setup-pulseaudio script + (for avoiding the errors during installation, too) + ------------------------------------------------------------------- Mon Jun 4 08:37:07 UTC 2012 - idonmez@suse.com diff --git a/setup-pulseaudio b/setup-pulseaudio index b0ecd7f..f960631 100644 --- a/setup-pulseaudio +++ b/setup-pulseaudio @@ -13,7 +13,7 @@ show_help() { echo "" echo "You need to be root for this command to succeed" echo "You may need to re-login for changes to take effect" - exit + exit 1 } check_root() { @@ -326,17 +326,17 @@ disable_all() { case $1 in --enable) - check_root || exit + check_root || exit 1 ENABLE=1 enable_all ;; --disable) - check_root || exit + check_root || exit 1 ENABLE=0 disable_all ;; --auto) - check_root || exit + check_root || exit 1 if [ -f /etc/sysconfig/sound ]; then . /etc/sysconfig/sound fi @@ -347,7 +347,7 @@ case $1 in else disable_all fi - exit + exit 0 ;; --status) if [ -f /etc/sysconfig/sound ]; then @@ -360,7 +360,7 @@ case $1 in else echo "disabled" fi - exit + exit 0 ;; *) show_help @@ -381,3 +381,4 @@ else echo "PULSEAUDIO_ENABLE=\"no\"" >> /etc/sysconfig/sound fi fi +exit 0