summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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"
+ }