Comment # 66 on bug 968405 from
Created attachment 667474 [details]
Using lua interpreter to avoid define or global command

This one does produce bash code for the default (no option):

        /usr/bin/systemctl --no-reload disable display-manager.service || :     
        (
                test "$YAST_IS_RUNNING" = instsys  && exit 0
                test -f /etc/sysconfig/services -a -z
"$DISABLE_STOP_ON_REMOVAL" && . /etc/sysconfig/services
                test "$DISABLE_STOP_ON_REMOVAL" = yes -o
"$DISABLE_STOP_ON_REMOVAL" = 1 && exit 0
                /usr/bin/systemctl try-restart display-manager.service || :
        )

for the force option -f:


                (
                        test "$YAST_IS_RUNNING" = instsys  && exit 0
                        /usr/bin/systemctl try-restart display-manager.service
|| :
                )

and for the never option -n simply nothing.

Note that I've used a check if the variable DISABLE_STOP_ON_REMOVAL (or
DISABLE_RESTART_ON_UPDATE) is already set that is that the file
/etc/sysconfig/services is only sourced if the variable is not set.


You are receiving this mail because: