Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 216837

Summary: net-misc/nxserver-freenx init.d script can't start after a hard reboot/shutdown
Product: Gentoo Linux Reporter: Le retraité <le.retired>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Le retraité 2008-04-08 08:40:07 UTC
Because of a power failure today, I noticed that if '/etc/init.d/nxserver stop' isn't properly called before a reboot or a shutdown, when the computer will boot again, '/etc/init.d/nxserver start' will fail. Then '/etc/init.d/nxserver stop' won't work because the service isn't started and you will have to manually run '/usr/bin/nxserver --stop' before being able to start the service again.

That's why I modified /etc/init.d/nxserver from this:
start() {
        ebegin "Starting FreeNX server"
        /usr/bin/nxserver --cleanup >/dev/null 2>&1
        /usr/bin/nxserver --start >/dev/null 2>&1
        eend $?
}

stop() {
        ebegin "Stopping FreeNX server"
        /usr/bin/nxserver --stop >/dev/null 2>&1
        eend 0
}

To this:
start() {
        ebegin "Starting FreeNX server"
        /usr/bin/nxserver --stop >/dev/null 2>&1
        /usr/bin/nxserver --cleanup >/dev/null 2>&1
        /usr/bin/nxserver --start >/dev/null 2>&1
        eend $?
}

stop() {
        ebegin "Stopping FreeNX server"
        /usr/bin/nxserver --stop >/dev/null 2>&1
        eend 0
}

If you have a better idea...
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2008-04-09 17:14:59 UTC

*** This bug has been marked as a duplicate of bug 216155 ***