2 # by http://en.opensuse.org/User:Mvidner
3 # https://bugzilla.novell.com/show_bug.cgi?id=222757
10 $0 [--install [ONE_FILE]]
16 if rpm -q zen-updater >/dev/null; then
20 if rpm -q yast2-packager >/dev/null; then
25 if $HAVE_OPENSUSE; then
26 if [ -f /etc/sysconfig/sw_management ]; then
27 . /etc/sysconfig/sw_management
28 PSMS="$PREFERRED_SW_MANAGER_STACK"
31 if [ "x$PSMS" = "xzlm" ]; then
33 elif [ "x$PSMS" = "xopensuse" ]; then
36 echo >&2 "/etc/sysconfig/sw_management:PREFERRED_SW_MANAGER_STACK should contain"
37 echo >&2 "'zlm' or 'opensuse'"
44 if $HAVE_OPENSUSE; then
47 echo >&2 "No package manager installed?"
54 package-manager-su -c "$*"
57 # do_* fall back to yast for STACK=ugh
60 if [ $STACK = zlm ]; then
61 zen-updater --no-tray "$@"
63 xsu yast2 --update "$@"
68 if [ $STACK = zlm ]; then
71 xsu yast2 --remove "$@"
76 if [ $STACK = zlm ]; then
79 xsu yast2 --install "$@"
83 if [ "x$1" = "x--update" -a $# = 2 ]; then
86 elif [ "x$1" = "x--remove" -a $# = 2 ]; then
89 elif [ "x$1" = "x--install" ]; then