{"id":957,"date":"2014-03-04T21:05:15","date_gmt":"2014-03-04T21:05:15","guid":{"rendered":"https:\/\/trouble.org\/?p=957"},"modified":"2014-03-04T21:05:15","modified_gmt":"2014-03-04T21:05:15","slug":"progress","status":"publish","type":"post","link":"https:\/\/trouble.org\/?p=957","title":{"rendered":"progress&#8230;"},"content":{"rendered":"<p>In case I run into this again&#8230; fired up a VM with ubuntu 13.10, 64 bit&#8230; and after installing sshd (apt-get install openssh-server) it wouldn&#8217;t start; instead I&#8217;d get:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\"><span class=\"co0\"># services ssh start<\/span><br \/>\nstart: Unknown job: <span class=\"kw2\">ssh<\/span><\/div><\/div>\n<p>I didn&#8217;t see any answers out there, so I waded into the \/etc\/init.d\/ssh script&#8230; it calls the &#8220;init_is_upstart&#8221; function here:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\">check_for_upstart<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">if<\/span> init_is_upstart; <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">exit<\/span> <span class=\"re4\">$1<\/span><br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>The ssh script sources \/lib\/lsb\/init-functions, which has the offending function down here:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\"><span class=\"co0\"># If the currently running init daemon is upstart, return zero; if the<\/span><br \/>\n<span class=\"co0\"># calling init script belongs to a package which also provides a native<\/span><br \/>\n<span class=\"co0\"># upstart job, it should generally exit non-zero in this case.<\/span><br \/>\ninit_is_upstart<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n<span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> <span class=\"re5\">-x<\/span> <span class=\"sy0\">\/<\/span>sbin<span class=\"sy0\">\/<\/span>initctl <span class=\"br0\">&#93;<\/span> <span class=\"sy0\">&amp;&amp;<\/span> <span class=\"sy0\">\/<\/span>sbin<span class=\"sy0\">\/<\/span>initctl version <span class=\"nu0\">2<\/span><span class=\"sy0\">&gt;\/<\/span>dev<span class=\"sy0\">\/<\/span>null <span class=\"sy0\">|<\/span> <span class=\"sy0\">\/<\/span>bin<span class=\"sy0\">\/<\/span><span class=\"kw2\">grep<\/span> <span class=\"re5\">-q<\/span> upstart; <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">return<\/span> <span class=\"nu0\">0<\/span><br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"kw3\">return<\/span> <span class=\"nu0\">1<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>I&#8217;ve no idea what upstart is, presumably some way of &#8220;improving&#8221; things&#8230; 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:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\">check_for_upstart<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n<span class=\"kw3\">return<\/span> &nbsp; <span class=\"co0\"># don't do anything else, just return<\/span><br \/>\n<span class=\"kw1\">if<\/span> init_is_upstart; <span class=\"kw1\">then<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw3\">exit<\/span> <span class=\"re4\">$1<\/span><br \/>\n<span class=\"kw1\">fi<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><\/div><\/div>\n<p>Now at least ssh will stop and start, and I can forget about the madness for a bit longer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case I run into this again&#8230; fired up a VM with ubuntu 13.10, 64 bit&#8230; and after installing sshd (apt-get install openssh-server) it wouldn&#8217;t start; instead I&#8217;d get: # services ssh start start: Unknown job: ssh I didn&#8217;t see any answers out there, so I waded into the \/etc\/init.d\/ssh script&#8230; it calls the &#8220;init_is_upstart&#8221; [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,33],"tags":[257,258,259],"class_list":["post-957","post","type-post","status-publish","format-standard","hentry","category-code","category-dinosaur","tag-bah","tag-kids","tag-stupid-linux-startup"],"_links":{"self":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=957"}],"version-history":[{"count":3,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/957\/revisions"}],"predecessor-version":[{"id":960,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/957\/revisions\/960"}],"wp:attachment":[{"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}