{"id":904,"date":"2010-04-22T22:07:06","date_gmt":"2010-04-22T21:07:06","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=904"},"modified":"2010-04-22T22:07:06","modified_gmt":"2010-04-22T21:07:06","slug":"upstart-emit-start-on-network","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2010\/04\/22\/upstart-emit-start-on-network\/","title":{"rendered":"upstart &#8211; emit &#8211; start on network"},"content":{"rendered":"<p>I have been reading some of the funky things in <a href=\"http:\/\/www.ubuntu.com\/\">ubuntu<\/a> implementations that has been happening in the distribution.  One of the things that I like is the <a href=\"http:\/\/upstart.ubuntu.com\">upstart<\/a>, this changes the way that init (the process of the computer system from boot to console\/GUI for creating the different <a href=\"http:\/\/en.wikipedia.org\/wiki\/Runlevel\">runlevels<\/a> ).<\/p>\n<p>In essence, it replaces the \/sys\/init daemon which handles the start up and shutting down, looking after tasks\/services during boot\/running and shutdown.<\/p>\n<p>One of the things that is great is that the upstart will &#8220;emit&#8221; and signal to other services to &#8220;start on&#8221; when that signal has been emitted, to demonstrate this when a network card is activated for the Ethernet (for example) in the &#8220;\/etc\/network\/if-up.d\/upstart&#8221;<\/p>\n<pre lang=\"bash\">\r\ninitctl emit -n net-device-up \\\r\n<\/pre>\n<p>which basically says when a network device because in a state of up emit a signal, the state of being up is when the device is active.  Then in the \/etc\/init\/mountall-net.conf file<\/p>\n<pre lang=\"bash\">\r\ndescription     \"Mount network filesystems\"\r\n\r\nstart on net-device-up\r\n<\/pre>\n<p>is listening for the emitted signal of net-device-up and thus the upstart will start the networking filesystems.<\/p>\n<p>Another example is within the \/etc\/init\/mountall.conf there is the emitting of a signal<\/p>\n<pre lang=\"bash\">\r\nmountall.conf:emits virtual-filesystems\r\n<\/pre>\n<p>the signal is virtual-filesystems which is then picked up with the udev.conf with the <\/p>\n<pre lang=\"bash\">\r\nstart on virtual-filesystems\r\n<\/pre>\n<p>since udev is a virtual filesystem in the \/dev and \/sys directories.<\/p>\n<p>I find the stuff that <a href=\"http:\/\/www.canonical.com\/\">Canonical<\/a> is doing with the ubuntu linux distribution is just great.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have been reading some of the funky things in ubuntu implementations that has been happening in the distribution. One of the things that I like is the upstart, this changes the way that init (the process of the computer system from boot to console\/GUI for creating the different runlevels ). In essence, it replaces &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2010\/04\/22\/upstart-emit-start-on-network\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">upstart &#8211; emit &#8211; start on network<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[188],"class_list":["post-904","post","type-post","status-publish","format-standard","hentry","category-linux_install_configure","tag-upstart"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=904"}],"version-history":[{"count":1,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/904\/revisions"}],"predecessor-version":[{"id":905,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/904\/revisions\/905"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}