Mar 042014
 

In case I run into this again… fired up a VM with ubuntu 13.10, 64 bit… and after installing sshd (apt-get install openssh-server) it wouldn’t start; instead I’d get:

# services ssh start
start: Unknown job: ssh

I didn’t see any answers out there, so I waded into the /etc/init.d/ssh script… it calls the “init_is_upstart” function here:

check_for_upstart() {
if init_is_upstart; then
    exit $1
fi
}

The ssh script sources /lib/lsb/init-functions, which has the offending function down here:

# If the currently running init daemon is upstart, return zero; if the
# calling init script belongs to a package which also provides a native
# upstart job, it should generally exit non-zero in this case.
init_is_upstart()
{
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | /bin/grep -q upstart; then
    return 0
fi
return 1
}

I’ve no idea what upstart is, presumably some way of “improving” things… but changing the retcodes had no effect; commenting out the check altogether made sshd run again, thank goodness; just end the misery by changing the ssh script to ignore this check:

check_for_upstart() {
return   # don't do anything else, just return
if init_is_upstart; then
    exit $1
fi
}

Now at least ssh will stop and start, and I can forget about the madness for a bit longer.

Sorry, the comment form is closed at this time.

   
© 2012 trouble Suffusion theme by Sayontan Sinha