åœç€Ÿãèšèšããã³è£œé ããããã€ã¹ã¯ãã³ãŒã«ãã¹ã¿ãŒãåŸã«ã¯ã€ãã¯ã¹ã¿ãŒããå¿ èŠã§ãã æ¬æ Œçãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãæèŒããŠããªãããã€ã¹ïŒNutOSã䜿çšããŠããŸããEtherNutïŒã§ã¯ããã®ãããªåé¡ã¯ãããŸãããé»æºãå ¥ããŠããæ°ç§ã§åäœããããã«ãªããŸãã ããããLinuxãå éšã«ãããç¹ã«ããŒã¿ãã«ãªæž¬å®ã·ã¹ãã ã§ã¯ãããè€éã§é«åºŠãªãã®ã§ã¯ãåæåã¢ã«ãŽãªãºã ãé«éåãããšããåé¡ã¯éèŠã§ãã
10Gã€ãŒãµãããã¹ã€ããã®ãã€ãããããŒãžã§ã³ã§ã¯ãããç¥ãããŠããBeagleboneããŒãã䜿çšããqemuãšãã¥ã¬ãŒã¿ãŒãé€ãããŒãããã»ã¹ãåãã§ãããã°ããŸããã ã¡ãªã¿ã«ãããŒã°ã«ããŒã³å¶åŸ¡ããŒããåãã10ã®ã¬ãããã¹ã€ããã®ãã®ãã€ãããããŒãžã§ã³ïŒèšäºã®åçïŒã¯ãµãŒããŒã«ãŒã ã«ã€ã³ã¹ããŒã«ãããŠãããæ°å¹Žéæ£åžžã«æ©èœããŠããŸãã
runitãžã®ç§»è¡ã«ããã500MHzã¢ãŒã ããã»ããµã§ã®ã·ã¹ãã ã®èµ·åã1ååã§6ç§ã«å éããããšããã«èšããªããã°ãªããŸãã ã
å 責äºé ïŒãã®ã¡ã¢ã¯åœç€Ÿã®å éšãŠã£ãçšã«æžããããã®ã§ããããã¹ãŠã®ãœãããŠã§ã¢éçºè ãã·ã¹ãã 管çè ã§ã¯ãªããããããã€ãã®ç¹ãæãç°¡åã§æãç解ããããèšèªã§èª¬æããå¿ èŠããããšèããŸããã
ã¯ããã«ïŒçŸç¶ã®ãŸãŸã§äœãå€æŽã§ããã
ç§ã¯åé¡ãç°¡åã«èª¬æããããšããŸãã
éåžžãLinuxã·ã¹ãã ã¯æ¬¡ã®ããã«èµ·åããŸãã
- ããŒãããŒããŒïŒliloãgrubãu-bootã...ïŒ
- ã³ã¢
- åæåããã°ã©ã
- ä»ã®ãã¹ãŠïŒ/ etc / inittabã§èª¬æïŒã¯ããã®initããã°ã©ã ã«ãã£ãŠéå§ãããŸãã
ã©ã³ã¬ãã«ã«ã€ããŠã¯èª¬æããŸããã ããã«ã¯manããããŸãïŒman runlevelãman initãman inittabã
initã¯ã·ã¹ãã ã®ã¡ã€ã³ããã»ã¹ã§ãããäœããã®æ¹æ³ã§ä»ã®ãã¹ãŠã®ããã°ã©ã ã管çããŸããããã»ã¹çªå·ã1ã§ããéåžžã«åçŽåãããŠããå Žåãã¿ã¹ã¯ã¯/ etc / inittabãã¡ã€ã«ã«ãªã¹ããããŠããããã°ã©ã ãéå§ããã³åèµ·åããŸãã
ããããããŒãããã»ã¹ã«æ»ããŸãã
ããããSystem VïŒsysvïŒããŒãé åºã«æºæ ããŠãããã£ã¹ããªãã¥ãŒã·ã§ã³ã®äœæè ã¯ãäœããã®çç±ã§ãinitãã©ã³ã¬ãã«ã¬ãã«ã決å®ãããã©ã¡ãŒã¿ãŒã䜿çšããŠåãrcã¹ã¯ãªãããåŒã³åºãããšã決å®ããŸããã ããã¯ãããšãã°ããã¹ãŠã®åäŸã1ã€ã®æç§æžã§åŠæ ¡ã«è¡ããå匷ããŠããã¯ã©ã¹ã«å¿ããŠãç°ãªãããŒãžã§ã®ã¿éããå Žåãšåãããã«èããããšãã§ããŸãã ãã®ãããªæç§æžãã©ãã»ã©åãã¯ããæ³åã§ããŸãïŒ
Linuxã·ã¹ãã ã®èµ·åã·ãŒã±ã³ã¹ã¯ã»ãŒåãã§ãã
ããšãã°ã/ etc / inittabã®äžéšã§ãïŒ
idïŒ2ïŒinitdefaultïŒ ïŒèµ·åæã®ã·ã¹ãã æ§æ/åæåã¹ã¯ãªããã ïŒããã¯ãç·æ¥ïŒ-bïŒã¢ãŒãã§èµ·åããå Žåãé€ããæåã«å®è¡ãããŸãã si :: sysinitïŒ/etc/init.d/rcS ïŒã·ã³ã°ã«ãŠãŒã¶ãŒã¢ãŒãã§è¡ãããšã ~~ïŒSïŒåŸ æ©ïŒ/ sbin / sulogin ïŒã©ã³ã¬ãã«0ã¯åæ¢ããŠããŸãã ïŒã©ã³ã¬ãã«1ã¯ã·ã³ã°ã«ãŠãŒã¶ãŒã§ãã ïŒã©ã³ã¬ãã«2ã5ã¯ãã«ããŠãŒã¶ãŒã§ãã ïŒã©ã³ã¬ãã«6ã¯åèµ·åããŸãã l0ïŒ0ïŒåŸ æ©ïŒ/etc/init.d/rc 0 l1ïŒ1ïŒåŸ æ©ïŒ/etc/init.d/rc 1 l2ïŒ2ïŒåŸ æ©ïŒ/etc/init.d/rc 2 l3ïŒ3ïŒåŸ æ©ïŒ/etc/init.d/rc 3 l4ïŒ4ïŒåŸ æ©ïŒ/etc/init.d/rc 4 l5ïŒ5ïŒåŸ æ©ïŒ/etc/init.d/rc 5 l6ïŒ6ïŒåŸ æ©ïŒ/etc/init.d/rc 6
ã¹ã¯ãªãã/etc/init.d/rcã«ã¯ãã·ã§ã«ã®300è¡ïŒïŒïŒè¡ä»¥äžã®ã³ãŒããå«ãŸããŠããŸãã ããããäžè¬çã«ã¯äœãããŸãããå®è¡ã¹ããŒãžïŒã©ã³ã¬ãã«ïŒã«å¿ããŠ/etc/rc?.dããããã°ã©ã ãé çªã«èµ·åããŸãã
ããã«é²ãã§ããŸãã åæ段éïŒã©ã³ã¬ãã«SãäžèšãŸãã¯/ etc / inittabãåç §ïŒã§ã¯ã/ etc / rcS.d /ãã£ã¬ã¯ããªãŒã«ãããã¹ãŠã®ãã®ãå®è¡ãããŸãã ãã¹ãåããnfsã®ããŠã³ãããã³ã©ã³ãã ãžã§ãã¬ãŒã¿ãŒã®åæåãŸã§ã®20åã®ã¹ã¯ãªããã§ãã
ããŒãããã»ã¹ã®ãã®éšåãå®äºãããšãinitã¯ãã«ããŠãŒã¶ãŒã¢ãŒãã«å ¥ãã/ etc / rc2.d /ããã¹ã¯ãªãããå®è¡ããŸãã æãåçŽãªå ŽåãçŽ10åãããŸãã
æ°ããããã°ã©ã ïŒãµãŒãã¹ãããŒã¢ã³ãªã©ïŒãè¿œå ããå Žåãã€ã³ã¹ããŒã«ããã±ãŒãžã¯éåžž1ã€ãŸãã¯2ã€ã®ã¹ã¯ãªãããããŒãããã»ã¹ã«è¿œå ããã·ã¹ãã ã®èµ·åæéãåã³é·ããªããŸãã
ãã¹ã¯ãããã³ã³ãã¥ãŒã¿ãŒãã©ãããããããŸãã¯ãµãŒããŒã§ãããããŠã³ããŒããæ¥ã§ã¯ãªãå Žåãã§ããéãæ©ãé»æºãå ¥ããåŸãç§ãã¡ãçç£ããããã€ã¹ã¯åäœããæºåãã§ããŠããã¯ãã§ãã Bercut-ETãªã©ã®ããã€ã¹ã®å Žåãåé¡ã¯ãããŸãããããã§ããã»ã¹ãå®å šã«å¶åŸ¡ããŸããBercut-MMTã®å Žåãã¯ã€ãã¯ã¹ã¿ãŒãã®åé¡ã¯æè¿ãŸã§éããŠããŸããã
ãã®ãããäžé£ã®runitããã°ã©ã ã«ãããã·ã¹ãã ã®èµ·åæé ãæãç°¡åãã€å®å šã«å¶åŸ¡ã§ããŸãã
å®éãrunitã䜿çšããŠãããšãã«LinuxïŒLinuxã ãã§ãªããäžè¬ã«bsdã®ããã«èªã¿èŸŒãããšãã§ããŸãïŒãèµ·åãããšãã«ãŒãã«ãrunit-initããã°ã©ã ãå®è¡ãã3ã€ã®ã·ã§ã«ã¹ã¯ãªããã®åäœãå¶åŸ¡ããŸãã
- / etc / runit / 1-åæèµ·å
- / etc / runit / 2-ãã«ããŠãŒã¶ãŒã¢ãŒãïŒã©ã³ã¬ãã«2ãšåæ§ïŒ
- / etc / runit / 3-ã·ã£ããããŠã³/ãªããŒãïŒé»æºãªããã·ã£ããããŠã³ãåæ¢ïŒ
éåžžãåã¹ã¯ãªããã¯ã³ãã³ãã®1ã€ãŸãã¯2ã€ã®ç»é¢ãå æããå¿ èŠãªããšã ããè¡ããŸãã ãã®ã·ã³ãã«ããéææ§ããããŠæãéèŠãªããšãšããŠãå°éã®ã¹ã¯ãªããã«ãããã·ã¹ãã ã®ã€ã³ã¹ããŒã«ã€ã¡ãŒãžã®ç®¡çè ãŸãã¯éçºè ã¯ãããã»ã¹ãç°¡åãã€å®å šã«å¶åŸ¡ã§ããŸãã
ä»ã®ããã°ã©ã ããã³ãµãŒãã¹ã¯éåžžã runsvdirããã°ã©ã ã®äžã§å®è¡ãéå§ããäŸåé¢ä¿ãåªå é äœãããã³èµ·åé åºã¯ç®¡çè ã«ãã£ãŠæ±ºå®ãããŸãã Runsvdirã®äœ¿çšäŸã¯ãã§ã« Habréã«ãããããããã§ã¯è©³ãã説æããŸããã
Bercut.BeagleBoneããŠã³ããŒããã°ã§ã¯ãã·ã¹ãã ãåæã¹ã¯ãªããïŒ/ etc / runit / 1ïŒã®å®è¡ã«è²»ãããæéãšããloginïŒãããã³ããã衚瀺ããããŸã§ã®æéã«æ³šæãæãããšãã§ããŸãã
20ïŒ06ïŒ22.33157 Linuxã®å§çž®è§£é€...å®äºãã«ãŒãã«ã®èµ·åã 20ïŒ06ïŒ22.99351-runitïŒ$ïŒIdïŒ25da3b86f7bed4038b8a039d2f8e8c9bbcf0822b $ïŒèµ·åäžã 20ïŒ06ïŒ22.99351-runitïŒã¹ããŒãžã«å ¥ããŸãïŒ/ etc / runit / 1 20ïŒ06ïŒ24.07955-runitïŒã¹ããŒãžãé¢ããïŒ/ etc / runit / 1 20ïŒ06ïŒ24.07955-runitïŒã¹ããŒãžã«å ¥ããŸãïŒ/ etc / runit / 2 20ïŒ06ïŒ25.41956 20ïŒ06ïŒ25.41957 Debian GNU / Linux 7.0 x10-02 ttyO0 20ïŒ06ïŒ25.41957 20ïŒ06ïŒ25.41957 x10-02ãã°ã€ã³ïŒ
ã芧ã®ãšãããã·ã¹ãã ããŒãããã»ã¹ïŒã¢ãŒã ããã»ããµ500 MHzïŒã«ã¯çŽ3ç§ããããŸããã ãããŠãããã¯ã«ãŒãã«ã®éå§ãèæ ®ããŠããŸãïŒ
移è¡ããã»ã¹ïŒã¹ããããã€ã¹ããã
ãã®ããã»ã¹ã¯äžè¬çãªçšèªã§å ·äœçã«èª¬æãããŠããããããã©ã®ããã«æ©èœããããèããŠç解ãã
ã¹ããã1
ã·ã¹ãã ã«runitãã€ã³ã¹ããŒã«ããŸãã ã奜ããªããã«ã
ã¹ããã2
runvdirãå®è¡ããŠãããµãŒãã¹ãããããã®ãµãŒãã¹ã®éå§ãäœæ¥ãããã³ãã°ãç¶æããŠããããšã確èªããŠãã ããã daemontoolsãŸãã¯runitã·ãªãŒãºã®ããã°ã©ã ãïŒinitã眮ãæããããšãªãïŒäœ¿çšããããšããªãå Žåã¯ãããã«èªãããšãã¹ãããã§ããŸãã
ã¹ããã3
ã³ã³ãœãŒã«ãã°ã€ã³ã®ãµãŒãã¹ãèšå®ããŸãã daemontoolsãŸãã¯runitã·ãªãŒãºã®ããã°ã©ã ãïŒinitã眮ãæããããšãªãïŒäœ¿çšããããšããªãå Žåããã以äžæ³šæããã«èªã¿ç¶ããããšã¯å°é£ã§ãã ããããªãã
5çªç®ã®ã³ã³ãœãŒã«ïŒAlt-F5ïŒã®å®è¡ã¹ã¯ãªããã¯ãããšãã°æ¬¡ã®ããã«ãªããŸãã
#!/bin/sh exec 2>&1 exec setsid /sbin/agetty --nohostname tty5 38400 linux
ã¹ããã4
/ etc / runitãã£ã¬ã¯ããªã«ãèŠããããåå1ã2ã3ïŒ1ã2ã3ïŒã®ã·ã§ã«ã¹ã¯ãªãããã€ã³ã¹ããŒã«ããŸãã äŸã§ã¯ããããã¯bashã¹ã¯ãªããã§ãããååãšããŠãshã¹ã¯ãªãããperlããã°ã©ã ã§ããããšãæ°ã«ãã人ã¯ããŸããã ãããããªãã§ããïŒ
ã¹ã¯ãªãã1ã¯ããŒãã®æåã®æ®µéã§å®è¡ããïŒã¢ããã°rcSãã·ã³ã°ã«ãŠãŒã¶ãŒã¢ãŒãïŒãã¹ã¯ãªãã2-ã·ã¹ãã ã®ã¡ã€ã³ã¢ãŒãã 3-ã·ã£ããããŠã³ãåèµ·åãããã³é»æºãªãã
ã¹ããã5
ã«ãŒãã«ã«init = / sbin / runit-initãã©ã¡ãŒã¿ãŒãæž¡ããŠã·ã¹ãã ãåèµ·åããŸãã
ã¹ããã6
çµæãèŠãŠãäœãééã£ãŠããã®ããç解ããŠãã ãã;ïŒ
ã¹ããã7
äœãééã£ãŠããããææ¡ãã5çªç®ã®ã³ã³ãœãŒã«ã§ãã°ã€ã³ãå ¥åããããã«æåŸ ãããå Žåãããã§ãšãããããŸããã»ãšãã©ã®äœæ¥ãå®äºããŸããã ããã§ãæ®ãã®ãµãŒãã¹ïŒudevãªã©ïŒãå°ç¡ãã«ããããšãã§ããŸã
ã¹ã¯ãªãã1ã2ã3-ãã®ããŒãžã®äžéšã«ãããã¿ãã¬ïŒäžèšåç §ïŒã ã³ãŒãã®éã«æ³šæããŠãã ããã é©ãã¹ãããšã«ãããã¯ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå®å šã«ããŒãããã®ã«ååã§ãïŒ
Bercut.BeagleBoneããŒãã®ããŒããã°
ã³ãŒã«ãã¹ã¿ãŒãã®ç¬éããloginïŒããã³ããã衚瀺ããããŸã§ã6.11019ç§ããçµéããŸããã ç§ã®æèŠã§ã¯ãéåžžã«è¯ãã
20ïŒ06ïŒ19.31769 U-Boot SPL 2011.09-00000-gf63b270-dirtyïŒ2012幎4æ24æ¥-09:51:01ïŒ 20ïŒ06ïŒ19.52354 Texas Instrumentsãªããžã§ã³æ€åºæªå®è£ 20ïŒ06ïŒ19.94867 ACé»æºãªããåšæ³¢æ°ã¹ã€ãããç¡å¹ã«ãã 20ïŒ06ïŒ19.94868 OMAP SD / MMCïŒ0 20ïŒ06ïŒ19.94868èªã¿åãu-boot.img 20ïŒ06ïŒ19.94868èªã¿åãu-boot.img 20ïŒ06ïŒ19.94868 20ïŒ06ïŒ19.94868 20ïŒ06ïŒ19.94869 U-Boot 2011.09-00000-gf63b270-dirtyïŒ2012幎4æ24æ¥-09:51:01ïŒ 20ïŒ06ïŒ20.20756 20ïŒ06ïŒ20.20756 I2CïŒæºåå®äº 20ïŒ06ïŒ20.20756 DRAMïŒ256 MiB 20ïŒ06ïŒ20.39067ããŒã¿ãŒã«ãŒãããããŸãã 20ïŒ06ïŒ20.39067 NANDïŒHW ECCããã³ã°ã³ãŒããéžæãããŠããŸã 20ïŒ06ïŒ20.39067 nand_get_flash_typeïŒäžæãªNANDããã€ã¹ïŒã¡ãŒã«ãŒIDïŒ0x10ããããIDïŒ0x10 20ïŒ06ïŒ20.39970 NANDããã€ã¹ãèŠã€ãããŸãã!!! 20ïŒ06ïŒ20.39970 0 MiB 20ïŒ06ïŒ20.39970 MMCïŒOMAP SD / MMCïŒ0 20ïŒ06ïŒ20.39970 ***èŠå-readenvïŒïŒã倱æããŸãããããã©ã«ãã®ç°å¢ã䜿çšããŠããŸã 20ïŒ06ïŒ20.65954 20ïŒ06ïŒ20.65954ãããïŒcpsw 20ïŒ06ïŒ20.65955ä»»æã®ããŒãæŒããŠèªåããŒããåæ¢ããŸãïŒ0 20ïŒ06ïŒ21.54266 SD / MMCãããã€ã¹0ã§èŠã€ãããŸãã 20ïŒ06ïŒ21.54266èªã¿åãuEnv.txt 20ïŒ06ïŒ21.54266 20ïŒ06ïŒ21.54266 202ãã€ãèªã¿åã 20ïŒ06ïŒ21.54266 uEnv.txtããããŒããããç°å¢ 20ïŒ06ïŒ21.54266 MMCããã®ç°å¢ã®ã€ã³ããŒã... 20ïŒ06ïŒ21.74756 uimageã®èªã¿åã 20ïŒ06ïŒ21.87867 20ïŒ06ïŒ21.87868 3083432ãã€ãã®èªã¿åã 20ïŒ06ïŒ21.87869 ## 80007fc0ã§ã®ã¬ã¬ã·ãŒã€ã¡ãŒãžããã®ã«ãŒãã«ã®ããŒã... 20ïŒ06ïŒ21.87870ç»ååïŒãªã³ã°ã¹ãããŒã / 3.2.18 /ããŒã°ã«ããŒã³ 20ïŒ06ïŒ21.88761ã€ã¡ãŒãžã¿ã€ãïŒARM Linux Kernel ImageïŒuncompressedïŒ 20ïŒ06ïŒ21.88761ããŒã¿ãµã€ãºïŒ3083368ãã€ã= 2.9 MiB 20ïŒ06ïŒ21.94465ããŒãã¢ãã¬ã¹ïŒ80008000 20ïŒ06ïŒ21.94465ãšã³ããªãã€ã³ãïŒ80008000 20ïŒ06ïŒ21.94465ãã§ãã¯ãµã ã®æ€èšŒ... OK 20ïŒ06ïŒ21.94465 XIPã«ãŒãã«ã€ã¡ãŒãž... OK 20ïŒ06ïŒ22.33156 OK 20ïŒ06ïŒ22.33156 20ïŒ06ïŒ22.33156ã«ãŒãã«ã®èµ·å... 20ïŒ06ïŒ22.33156 20ïŒ06ïŒ22.33157 Linuxã®å§çž®è§£é€...å®äºãã«ãŒãã«ã®èµ·åã 20ïŒ06ïŒ22.99351-runitïŒ$ïŒIdïŒ25da3b86f7bed4038b8a039d2f8e8c9bbcf0822b $ïŒèµ·åäžã 20ïŒ06ïŒ22.99351-runitïŒã¹ããŒãžã«å ¥ããŸãïŒ/ etc / runit / 1 20ïŒ06ïŒ24.07955-runitïŒã¹ããŒãžãé¢ããïŒ/ etc / runit / 1 20ïŒ06ïŒ24.07955-runitïŒã¹ããŒãžã«å ¥ããŸãïŒ/ etc / runit / 2 20ïŒ06ïŒ25.41956 20ïŒ06ïŒ25.41957 Debian GNU / Linux 7.0 x10-02 ttyO0 20ïŒ06ïŒ25.41957 20ïŒ06ïŒ25.41957 x10-02ãã°ã€ã³ïŒ
RUnitã¹ã¯ãªããã®äŸ
/ etc / runit / 1
#!/bin/bash # system one time tasks PATH=/sbin:/bin:/usr/sbin:/usr/bin # re-exec this script with a controlling tty if [ "$(tty)" = "/dev/console" ]; then mountpoint -q /sys || \ mount -t sysfs sys /sys -o nosuid,noexec,nodev mountpoint -q /proc || \ mount -t proc proc /proc -o nosuid,noexec,nodev tty=$(</sys/class/tty/console/active) tty=/dev/${tty##* } exec setsid sh -c "exec bash /etc/runit/1 <$tty >$tty 2>&1" fi trap : INT TSTP QUIT trap 'sulogin -p <>$(tty) 2>&1' ERR mountpoint -q /proc || \ mount -t proc proc /proc -o nosuid,noexec,nodev mountpoint -q /sys || \ mount -t sysfs sys /sys -o nosuid,noexec,nodev mountpoint -q /dev || \ mount -t devtmpfs dev /dev -o mode=0755,nosuid test -e /dev/fd || ln -s /proc/self/fd /dev/fd exec 2> >(sed 's/^/:: /') # set -v . /etc/rc.conf mountpoint -q /run || \ mount -t tmpfs run /run -o mode=0755,nosuid,nodev mountpoint -q /dev || \ mount -t devtmpfs dev /dev -o mode=0755,nosuid mkdir -p -m0755 /run/runit /run/lock /run/user /dev/pts /dev/shm \ /run/network /run/runit mountpoint -q /dev/pts || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec mountpoint -q /dev/shm || \ mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev mkdir -p -m 0755 /var/lib/supervise mountpoint -q /var/lib/supervise || \ mount -n -t tmpfs tmpfs /var/lib/supervise -o mode=1777,nosuid,nodev #mkdir -p -m 0755 /var/log #mountpoint -q /var/log || \ # mount -n -t tmpfs tmpfs /var/log -o mode=1777,nosuid,nodev mount -o remount,ro / ip link set up dev lo echo $HOSTNAME > /proc/sys/kernel/hostname mount -o remount,rw / mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev #cp /var/lib/random-seed /dev/urandom &>/dev/null || true #( umask 077; dd if=/dev/urandom of=/var/lib/random-seed count=1 #bs=512 &>/dev/n ull ) install -m0664 -o root -g utmp /dev/null /var/run/utmp install -m0 /dev/null /run/runit/stopit install -m0 /dev/null /run/runit/reboot install -m0644 -o root -g utmp /dev/null /var/log/lastlog dmesg > /var/log/dmesg
/ etc / runit / 2
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin exec 2> >(sed 's/^/:: /') # set -v . /etc/rc.conf # sysctl --system for i in ${DAEMONS[@]}; do d=/var/lib/supervise/${i} mkdir -p $d ${d}.log l=/var/log/${i} mkdir -p $l done exec env - PATH=$PATH \ runsvdir -P /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
/ etc / runit / 3
#!/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin exec 2> >(sed 's/^/:: /') # set -v LAST=0 test -x /etc/runit/reboot && LAST=6 echo 'Waiting for services to stop...' sv -w196 force-stop /etc/service/* sv exit /etc/service/* stty onlcr echo Shutdown... udevadm control --exit killall5 -15 i=10; while killall5 -18 && (( i-- )) ; do echo -n .; sleep 0.5; done; echo killall5 -9 umount /tmp mount -o remount,ro / sleep 1 sync
åç §è³æ
cr.yp.to/daemontools.html-runitã®ç¥å ïŒDJ BernsteinããïŒ
smarden.org/runit-runit in person
smarden.org/socklog-syslogã®ä»£æ¿
github.com/chneukirchen/ignite-runitã®äžé£ã®initã¹ã¯ãªãã
lwn.net/Articles/331818-udevdãªãã§ç掻ããæ¹æ³ã«ã€ããŠ
metrotek.spb.ru/x10-24.html-説æããã¡ã«ããºã ã䜿çšãã10Gã¹ã€ãã
habrahabr.ru/post/21205-Linuxã®èµ·åæ¹æ³