summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2008-04-09 21:14:21 +0000
committerBernard Cafarelli <voyageur@gentoo.org>2008-04-09 21:14:21 +0000
commit979b44e0083445df2f0bb00ac5bce400ca5d13da (patch)
tree54274b00cdfb3317be2935872550d6b7bc327521 /net-misc/nxserver-freenx/files
parentamd64/x86 stable, bug #216765 (diff)
downloadgentoo-2-979b44e0083445df2f0bb00ac5bce400ca5d13da.tar.gz
gentoo-2-979b44e0083445df2f0bb00ac5bce400ca5d13da.tar.bz2
gentoo-2-979b44e0083445df2f0bb00ac5bce400ca5d13da.zip
Fix start/stop return code, bug #216155
(Portage version: 2.1.5_rc2)
Diffstat (limited to 'net-misc/nxserver-freenx/files')
-rw-r--r--net-misc/nxserver-freenx/files/nxserver-freenx-0.7.2-exitstatus.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.2-exitstatus.patch b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.2-exitstatus.patch
new file mode 100644
index 000000000000..cbc768455692
--- /dev/null
+++ b/net-misc/nxserver-freenx/files/nxserver-freenx-0.7.2-exitstatus.patch
@@ -0,0 +1,33 @@
+--- nxserver.orig 2008-04-09 17:40:33.000000000 +0200
++++ nxserver 2008-04-09 17:43:10.000000000 +0200
+@@ -1594,6 +1594,13 @@
+ exit 1
+ }
+
++cmd_abort_success()
++{
++ echo "NX> 500" "$@" 1>&2
++ echo "NX> 999 Bye" 1>&2
++ exit 0
++}
++
+ cmd_user_passwd()
+ {
+ echo "NX> 100 NXSERVER - Version $NX_VERSION $NX_LICENSE"
+@@ -1653,14 +1660,14 @@
+ cmd_start()
+ {
+
+- [ -f $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS ] && cmd_abort "ERROR: Service already running"
++ [ -f $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS ] && cmd_abort_success "ERROR: Service already running"
+ mv $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS.disabled $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS
+ echo "NX> 122 Service started"
+ }
+
+ cmd_stop()
+ {
+- [ -f $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS ] || cmd_abort "Service was already stopped"
++ [ -f $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS ] || cmd_abort_success "Service was already stopped"
+ mv $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS.disabled
+ echo "NX> 123 Service stopped"
+ }