{"id":1977,"date":"2008-02-20T11:57:00","date_gmt":"2008-02-20T02:57:00","guid":{"rendered":"http:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/02\/20\/nfs_mounted_usrlocal\/"},"modified":"2008-02-20T11:57:00","modified_gmt":"2008-02-20T02:57:00","slug":"nfs_mounted_usrlocal","status":"publish","type":"post","link":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/02\/20\/1977\/","title":{"rendered":"NFS mounted \/usr\/local"},"content":{"rendered":"<p>Another quick hack for FreeBSD.<\/p>\n<p>\nI have NFS mounted \/usr\/local on my lab&#8217;s FreeBSD boxes, built by FreeBSD ports. It has its own local startup directory, \/usr\/local\/etc\/rc.d . However, they aren&#8217;t launched at startup because \/usr\/local isn&#8217;t mounted when \/etc\/rc determines the order to kick (rc.subr based) scripts in \/etc\/rc.d and \/usr\/local\/etc\/rc.d.<\/p>\n<p>\nFortunately, we have an exception in this case. Legacy *.sh scripts are kicked by \/etc\/rc.d\/locakpkg, as the final process of startup. So, I wrote \/usr\/local\/etc\/rc.d\/local_startup.sh to kick rc.subr based scripts. It works pretty good!<\/p>\n<pre>\n#!\/bin\/sh\n. \/etc\/rc.subr\nload_rc_config 'XXX'\ncase ${local_startup} in\n[Nn][Oo] | '') ;;\n*)      find_local_scripts_new ;;\nesac\nfiles=`rcorder ${skip} ${local_rc} 2>\/dev\/null`\n_boot=\"start\"\nfor _rc_elem in ${files}; do\nrun_rc_script ${_rc_elem} ${_boot}\ndone\necho ''\n<\/pre>\n<p>Hmm, I think this script must support &#8220;stop&#8221;, not only &#8220;start&#8221;&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another quick hack for FreeBSD. I have NFS mounted \/usr\/local on my lab&#8217;s FreeBSD boxes, built by FreeBS &hellip; <a href=\"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2008\/02\/20\/1977\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;NFS mounted \/usr\/local&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-1977","post","type-post","status-publish","format-standard","hentry","category-unix-"],"_links":{"self":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1977"}],"version-history":[{"count":0,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1977\/revisions"}],"wp:attachment":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}