ÿØÿà JFIF    ÿÛ „ !.%+&8&+/1555$;@;4?.451 4,$,44444444444414444444444444444444444444444444444444ÿÀ  á á" ÿÄ     ÿÄ ?    !1AQaq"2‘¡±ÁðBRbrÑá#‚’¢²3S CñÿÄ   ÿÄ !    !1QAa‘2ÿÚ   ? 5˜Z¯V¦cø)›t/? z¨±>Õ5€¶‹Á¤·¼z¼Ü¬+ñ®v¤¨_ˆR­BFn©—˜ý®ç̝P8gýt·ÉSTŦˆìät?þé¼íìN/Þa)ì–í6ô… Ï¿øÃj´¿KÇü]ÿ ªô¹-eKànëÕHTx}ýSÜ›ÿ ”7Ø×&µ<¦  ¥ÑO¶[Ù¯ä¨ÞÃÿ PZ-¬;#õ|•oaÿ ©CìÞz3˜öː/¤­ñTûIØ}š^ mÓ%ªxˆ¥ÉŸu=Z+ISe¿45™¼u;ú&WØ÷€æßQ™®{|íx*TC“#ZŠìZ§²‹ 6pv…³¿¡äª*áZÐ%ÒOáˆo"x«OHk w±æ+¬V(kMúŸ5Vö«$ ÁrÏbàb57/luR ¸ÑÛj Òµì`Мq­û žICÀÊ•©4€Âcà¨Ï€O´<èÐ:›ù(Ë^L8þ‘ÍÌ#¸Ð_Ì©ÙK(Öz 4¬û+¸;ü’V’84‘¬ÃŽ:[â‡ÔÌáõp¢~§ªlæ£ö{®G>J¼"°‡7¯ÆÉèßû ‹É‹§ÁòÃýâßî ^ƾÙõ‹×óH#«LP½ïX=xÑÍ$|W?•~• îëÔ©ª‹ {ÝT…Kÿ ”hûâá)J*ö˜–ÔU;iÇ€/ ÆþjóZ\ýwØ=Ìm ºèËL9 ýèÆð/¨’¥öo=nË.%Îì ŽÕ¯È|{Oj²ƒE6e/ßdÄõ²Ìâ1O®ò×TsəԸhOMýíMˆ¿¼H˜l²,7Â¥#MF/Úf°Ö½± ¸–dr‹NýÊ íjqx{œÉ ä-È ¦ øÄër¨q°ð †nцýÑÄÆ’mä…n<0È™;ÁÝá¯ÁZƒ7FÀmì­ É&9ˆîéi¶ùN§Y• ÃZãAâ?•‡©‰ , ó¾IŸŠc1 4â&y­&pŠ­6;M À 0¹qç»p.á …ŸÅáK@%6·y6ƒ‰3?”úºŽ‰éX5ªPT §µ!=Mž«Ú½‹ÅgÂSâÉaþÓoö–¯ÁÔìR>5éÿ üs¶ÆUcÌ kÇR ]ÿ ù¬¼«VŽ;Â|‡~¢¦”ÏŰæ {L™Õ°Óv¹ò¸írޡעCÃ!íVÕ {¶»sŒNPg/ "uÕbkm²“$ďå¿é¹§°½æz¯6 †s¿!s–wÚÝ“™Œ °.ûj>·+™Òa…©Œ&rÝÎtÛë긪Ît’LAVp%c Úý[ÄzJ¾ÇàXXç@˜ó<êL]·T˜¾¥1Ó©V‡g´æ½¦Ý@¹óø!_@´ÞâSÁ —S3™•& ]@JHÚý©ZŽ €×æÔr»Áf!‡yÞ4Mv*èÓã_{‘åóUuљØ«Oïé*®EvÑ Œ÷‡U \"㪒ÍK+À 4“M¡ï:0¥5í!'<@î´”>Ç»&Z–ïCCV˜Ì5Šo&îhè.žû |ÓK©h$s6KìŒëã)¹hI¦GïOåóI;ììü#É$Š0…Ææ¥TØ.5­¾gn´ “ÂÖ\:hœ89G)J@„}œ:’Ò{/Š"¦_Æ×7Æ3VÇŠÊa]ÚŒÙ€Ä–=®uÁßâACZƒ§§£ Qnâ:«,×{tyø¬iÛcœÜÄ€H½ÄÍCk´÷šß .W'b¤Íåh]÷€=,Žv×cÚEÚHXJX¶îo¨FÒtèöŸ>ªª6[J®Fµ£sGÁeqõfe\íjÒÐïÄÐGˆe1Ø‹.Ø”‘Ëuø Y­ˆÜ ŽG|zùªüMpDnQWÄ”%JŠ™)â*p@Örš«ÕT2Ð%ˆG#ª„ ·¤!°ŸOTÂT¸aÚ%4&h™LµšØüÐ.F¿²ÐÞ_Ç‚¾ÅÃaÜ÷09Æ q€öy˜v‡85õN÷]¬äѼóS{°_MެúÔ#°Ç¸0åÞè2ëôPcvÆw9®ií1Ä8F™˜à‰´+‰Ik1òÝ7“Ñ×ÒsÝ\x‚h`ÞÑ`ó"|µEcý£n˜h`}GÞ !±ù²Ápü²ß6 0ïi󜵩SÈÇ7˜-ÕURO˜¦´f$ªž-Í6(œ}<„ éc øs]ŽŽ„*—¾ ìdŽ„)méª\¿êÎIg¾ØÞ~I#C/¼¼´EÁÈŽi8“©õådô·>euä ƒ'Ê×लR1ÉJE1ÐAát`t;ÇР%Ý<‡¥„ÍÆ`×Oyó)õiI€ñQaŸ4Ûù\áàaÃÔ¹HÃu¹*k€¦<„e S‡&õÏ B!ŽhüÞ`yj}mªf×\¿ Ç~æ­9‡û\՞Ǖg²1Žû5V7 !àöšm° c`ܬøÇìµÒ'P"?…´Ö,"§^•õލsÔ)6˜sæéÍR¼ ò|Sl”‹7 nPW Gòú÷½§O¯‡„l¡kSÞŒr½PÊ@æ¢pŽ-mÿ #Ÿ˜Àº¶Áä¦;ïÔæ$1££`“Õ>„—·ž)ßð³ñ#Ï Ô$¶œ‰ÊE‹À;÷º ¯«P:Ñ”8–IÊtpÞ3ª“>ê“þës4ò2OÏÕ­±zô†Õ§‰.÷ä¸;¿˜“'œ›žª}«Œ{ª±Ì 9ÔóÞÕ‡0 $íWV3Üì¬ —@kÝ4@¿r¼±½¬™›?øØæ´'Áé®CË3-g$˜ö‡×auÚi´Žp/êÛ æF›Ú2v‹ã¿¿,nB1̨ƃqÞa5͝@&Æû“él÷ \C²½UÍc ¯k×¢U ÖéQå™—-r wô ÞÏ<Ò=&=ÿ Ôê Òêˈt,i—;LîÜ á¸*ÚÃ1$êL•LÍ <É)ýÐà’ ;F™{ƒ™˜€&'}‚ãÄK`¡ÞT@I;®žZóè‚s’7®°›+§O­Åq©é»²9<Ô J ¼9O’HL»Ùïì¸rk¼Ž_ý‘TŸu[²ßÚŒ·ü÷B%¯E ŸÔX5êO´ Ç•€’I0 ÉJX` ñ¹õ%;µŸD‘«´€àwÒ™U ûئžÖö\×®×´8 ½‡ºÐÆÓ§?Àkmœ=;d5*@-ì0F Rªýš[Ü6âö̃ڸr*KA9· u*µæ£?U¸Âêí†8@¦X4 e-ò„0s{ HâUpU?¼mñRa°®a%Ð'tÉ×’\¾ÊÉ]t›h>·(Ë@R¼¡Ãt h}’O÷au<+nT…Ö…MӐ??Óe95 q>í/;&JSû °¯ÊéÞ øƒ*Ã2½Ài&:nôUl=¾¿5eˆ3”ñc|Ú2V”>„»&eE;«ÚäC p¢Û úy 9š[ŒÌx¼擼A&DåÒ¯ˆ¤ÀÌ;"˜ ÏQä¸åhÊ}Ûq«Û0WžÒ|»€ø®öCm5•\ÇÀ§Pe3£]0ÃàLDÉ‰1øªxjgwT‚÷¿LΨK‹›ùs—xˆÜ±µ kæ¸f‰‰ÜGk/LÛØ6d9ò¶ùA{ƒA3š/¬D¬khÓk‰`˜"㯒r¿±Óã jx‡°e}<Ñø\3y:'À•/h½Í€Ç4~g ?Û(¼]v‘ªlKÎâ~?O‚W%{Ì:“'©úNq¾›úo(X’¥¯ˆ nFê{Ç€ü?º'ë ø‹ì Þ09ŒÌç9Æ —ËC`j@ÓÄ(+a‹un¸#ÂꟋ{K`‘ÑÍÍ'à´»/Û,KW;Þ4²þð ï Nm|~fGÏ(…³Ã)«1ö­Õ ¥‡¨©ƒÃ™ü-s=à=U66Ï«Ýc蓦W¹íž®›nÔ%êÇìŒ<#Ü×84ån®Ð ÒåOC` ñânÑs‡¢ç 1õ%Îhì½Ã½® e:ݼUZo™`  ÅZŸŒÊ«ê1ÏÄo$q¹Þ€©ˆhÐÉä¯ñ[!…Ú˜àJ:x2$Íß&PåT£6ç— ‡Í*4Ýšçjÿ ‰É nófÐ ó(L5C•åÆ\rMÒ@ò }y-W}™üýVù—ú¢=Ù”c®‘< M ž ´Phr ¦©TD ‘ù.$´÷O‡‘V2Æò.=IUŒ=ž‡â¬i™aþÓåÙ?òUø'ØÖ•.~* šTŒ!•-×áºTâ®ä#õü'´ eýlYÅÓeÕKÂrT"CÚ@u!Óxƒ{š3€}1¿(r}%«nËamjÑ%ÑNEò v ˜à  σöK³,*º.àzù¨™Ó ÚçâU¦*¿ 9{%Ö¹ njûdaXöb) kÛÆ±ûÓ\°M7ˆÂ=û›ç¿Ã‚­V»Cg–8ÙêE- j)k$º`Ã-ùEýeBÆÇ]c¡°ñty&Òd0nõ'¡W+ƒ*|–øµFa\GQªEAÔp5\Ǽ·¼Ç8·õ -â§Ú[ ‡ uZeÖ 3}×d'+¹:ð+K†Û®s!Ï$úe€<Û”x)1»a­¡LC]¸µík…ÚàA»AYº{†ªS[¦5HÒ7ù --,ísòDØ€èk ÞÀîÜ ò@â( ËNˆë›4ô½•/¦o‡€Û7 ê•ÆêòðÜy'Án½µ á˜ݦ ndeo…[ì¶Ê,¥R³Ä=À±—–ß;£™´ñSâ*g§”ïaið‘Jå~™ÓÞ ß³Õ¢»8x埒²52>AÊb&-÷\7´éÄù€T˜,w;3{ï˜k…à¹ÄqÀ«œ{€\ ˆ¾[´¨јr &Úé„Ívˆ±8†¿]|¬ņ4I×pÞS1ÈÖz‰#Ìv‡G!YNògñ:màTz¢Ý1ô©^O=~ë|5Bã™ç•¼µõ•bÆ@úÕS¬ÈŒ#¬zünrŸ û” Z²•èðV"ÁHÚý©wÝ €7¼Ìu1hÑa3Éä û f$o¿É ™Ú›ÝçnpÒ3äÌ3†Í§,Äï]$‰/pê †«À¼¸e9­Æê_C]žƒ·ý·frÁN«, E=›Çq -‰öŒ:aÏ¿±í&£Í:-} 84‘ÿ eƒQÑeëSsuiA ³g㟥ú£?ÿ ʼn*”“÷aühe:ÊWa@ÒÞk±eØ] F Ô—r.åä˜ @ö¥ªZoÐýYL·¥S²G/‡ñ <~*ZÆ´è>JlòàÛÆ½ÿ 窘ìGN¢:I®KšJp/`íIÁÀõ#Ä-€ö­šµŒoF4|ÆQØÆ@Ì|£Ô…¢À{9˜è½Üó›€ôYÒÎYsið;ís¤€à²ˆ‚4qÉVŒI$ ‰"° æµ8cXGjœˏ¡Aâý•ËÜ¢ûï e·çLx']á"oÅÎê3¯Ç—¹”ó0nå‚âg{Œñ> S´˜îè°g238‚ãköÝfÚd´6Ò€;ò÷±¢™¼›º ¢Æ'¥Ðx'e¬ç ]bÈÆV¢ó‹kýBO ðÊâ$Ÿ!×T 3Mýמ žìٍàÌü‘8÷€àæØ8æ©6‰©L´«…oãpð„~Çk‰!ñ;‹”ÛžÍ àž±z Ÿôû øŸÝužÏ;ÿ #|u6™Þ¬ÚˆÐõA4¶â|ôl|Ê2ŽÇ¤ÝÅÇY.<#Aí.k§hóF‚”Y; M½Ö4hŸ4&›­¿tès´%FìL¥£Ãk‰ÇT¤haÁ¤ÚxfÉ`ÑìË›>i 3t‚:,–+^÷´–{Û–Nxi"x‘Ûg î¨>¥Õ܁ùZH,2Û“:8xÊ¢Çí9.É-Ìâã-=çjwµS˜dütžçwýGòú®®ûº_ˆýx$–¡ãøO EÚÛÏ÷R„×w+3£Á£öUMyR²¹âŒ°š›¸Ñãò9§Ó_Dl+Ùßc›úšGÅÌc†Ž!Ko=¶.‘Îÿ c²(2®V mª.ÿ ¹B›¹å ù„öŸSV>™ü¯$y:G¢Z×àøúdî¹û­·ýÇ´:•c LÍõi_‹ö+ÎæGÊè>OŠ•äž´§Þ{X}¨1ÚTc›»Qþ•êô°t¿OP?eæ~É{5]•ÙR£r5†nZ\ã@ &îJõ ¾àC°þV>fé¥/ü5ñÊIº_é5 ;e­h<@ Ä&æÃëE%;X,ÒãÆÞ`Oò¦kŸm#˜!ÀyÄ¢| óLšò¥Ä` ¶R=|ÈCâh5ò3DˆïF†ðÒ#ÅìÛœ?¸yhBãœí ZxßÎÄhºRK„`Þödvײ™ÀÈÑÒgŒuY w³%†ƒÓzõ ÖÏp‚dH®¦A´ù§»ÓÇMæ~)ˆð‡û:ù&Ä •vGD´À n ݇¼Ö8Fö óáà£~Ë¥x`oK|Ä?fxiØü%pìR>éò+Û±éÎ>núlFŤ'tq8LZÏvÃ?„¡ß±È⽆¯³íü@x|PöUäèØã¡ð‚ŒAìÏ"vÍwóŸÍ{ ý0.z È•Ö{,N¡£¡ŸKÕÙž>Ýœþ ÍÀ°<×EA!Å‚D™IúOÍ¡>ôG}Â` ÍßkÜL™Ž Þð™ {IøF²¹òQ3&!ÃÂÞz.d&Ï-sH¸,Ôõ˜ŽP€ 77ˆÝ¼ÊëÜw =cÕ Ú,ØÐ5ÎYÐ)ì´öœgŒ[¤ßv㙑8心>h]§µháYš£²ºÑ.{Ï7Sð•?´~×SÃKýJÛ˜ ™Íäiúu<µX¶1õ^kâçIÑ£sZ4h>j*ÔšD:4­¿_ ÷¸ Õxæÿ ¸?Mù _•­ÊÐ ä ÷ý ÑwL œ­ïnTkÛUÍN©ë:¦fV ¶ÜÔÜMªÅâA½–¿R×TXš-%iTÊT•‡Ù‚JôϐZxWÑè‰f‰òG º ×Õû2aZ7OU3[“×AT–ÞŒ…-‘¤”Ì ì&(ˆ¿­•ƒkï’:ðY¦W‘ Å)“†‘˜³Åtcø˜ñTÂwÚÇ4|üLÇªí–v- qˆèU qPE.†â‘˜µ Æ,ÐÅs]8¾„oúÑ i>ÜxxÈó)ƒ ´æÁâØ$À‰vžŸf$Ž |ãw;ÀÁIJ»b` {¦Ó¤Ú$©YÀ‘n@Óïž«9J¼êG m¤ ܯ¹ÌW4€ÐÒÅÛ‡#褕Ÿn-?í|с¥÷Ú¹¬'´ÞÜ9ÓK `hê£SÄSà?7—Wí_´…óB›»:=Ãïq`<8ñÓŒÑlú2d¬ê³£hÖ[l|$vÝro~'R®‰§°ñmY ͧäP |PUª¹·:3Œ[Û{Xÿ ºâ@‚W–Äé u‚ ¯´*=íή.pûÒdt @G‰¬ s¸ ëÉücr ÞæÑ¨Ê@>¤¢Ö±. Þ'¯°ÌME[YéïĵÂCå½ Ué©Áû'Ê9%eÔðNU”ë‘ÌsD3/®+UI˜9h.WC”빓$#:pz:YÓ ¿xž* ³$Í +$kñAŠ‹†¢ Uê>¸)_š¬÷©ßAÂÔb9ÇU ¯¾á•9¯ÏÏ÷O÷¼¼Fähal1‰3Ì[Ïr•´UCksNÐ] R‘¸¥H+§Šé†c©vÖÞ0iÓ76s†î!§=ß ¼~Ô'°Ãmäoäš³ªøi1úÉ)³yV8 CLÄØÁ‘WYïi€H6ÖÑiámø^ÈY´°Ñ7¥Û*—Ñ©L«Qƒï—Ùrÿ ›£Ð*š¸ˆL©ˆ$ˆ ÷¾D§9È®«qbqC)–ˆïv´çñsÑVT­Ø, <àïºÀO«Jý·õ àfPìð .wFšir´þ’2_Y *Æ€x\« ì€9š@ Ž|F⇥ˆkZ@hÖÄ0t¿-<“‹qµ¾*ZL¤Ú)&BJpÓF5=$„at*Zš$’ÑtdûÝRI1 2މ$€$I$#‰SÞ’Hë¬ï;Á$¡t$’`<(ñÇt)$‡Ð.Êf¢X’Kt=Éé$‚ˆªè¢oÝëòI%Rgcª÷ŠyI%¡‰ÿ !ñ)´õ $¤ Ô’IIGÿÙ# -*- shell-script -*- _log_msg() { if [ "${quiet?}" = "y" ]; then return; fi # shellcheck disable=SC2059 printf "$@" return 0 # Prevents error carry over in case of unavailable console } log_success_msg() { _log_msg "Success: %s\\n" "$*" } log_failure_msg() { _log_msg "Failure: %s\\n" "$*" } log_warning_msg() { _log_msg "Warning: %s\\n" "$*" } log_begin_msg() { _log_msg "Begin: %s ... " "$*" } log_end_msg() { _log_msg "done.\\n" } panic() { local console rest IFS if command -v chvt >/dev/null 2>&1; then chvt 1 fi echo "$@" # The panic= parameter implies we should disallow console access if [ -n "${panic?}" ]; then delay= case "${panic?}" in -*[![:digit:].]*) # invalid: wait forever ;; -*) # timeout < 0: reboot immediately delay=0 ;; 0 | *[![:digit:].]*) # timeout = 0 or invalid: wait forever ;; *) # timeout > 0: seconds before rebooting delay="${panic}" ;; esac if [ -n "${delay}" ]; then echo "Rebooting automatically due to panic= boot argument" sleep "${delay}" reboot -f else echo "Halting automatically due to panic= boot argument" halt -f fi exit # in case reboot fails, force kernel panic fi run_scripts /scripts/panic # Try to use setsid, which will enable job control in the shell # and paging in more if command -v setsid >/dev/null 2>&1; then unset IFS read -r console rest /dev/${console} 1>&0 2>&1" else REASON="$*" PS1='(initramfs) ' sh -i /dev/console 2>&1 fi } maybe_break() { case ",${break?}," in *,$1,*) if [ "$1" = "top" ]; then # udev is not yet running, so load keyboard drivers if [ "${quiet}" = "y" ]; then opts="-q" else opts="-v" fi /sbin/modprobe ${opts} -a i8042 atkbd ehci-pci ehci-orion \ ehci-hcd ohci-hcd ohci-pci uhci-hcd usbhid xhci \ xhci-pci xhci-hcd sleep 2 for modalias in /sys/bus/hid/devices/*/modalias; do if [ -f "${modalias}" ]; then /sbin/modprobe ${opts} -b "$(cat "${modalias}")" fi done fi panic "Spawning shell within the initramfs" ;; esac } # For boot time only; this is overridden at build time in hook-functions run_scripts() { initdir=${1} [ ! -d "${initdir}" ] && return shift . "${initdir}/ORDER" } # Load custom modules first load_modules() { if [ -e /conf/modules ]; then while read -r m; do # Skip empty lines if [ -z "$m" ]; then continue fi # Skip comments - d?ash removes whitespace prefix com=$(printf "%.1s" "${m}") if [ "$com" = "#" ]; then continue fi # shellcheck disable=SC2086 /sbin/modprobe $m done < /conf/modules fi } _uptime() { local uptime uptime="$(cat /proc/uptime)" uptime="${uptime%%[. ]*}" echo "$uptime" } time_elapsed() { # shellcheck disable=SC2154 if [ -z "$starttime" ]; then log_failure_msg "time_elapsed() called before \$starttime initialized" echo 0 fi local delta delta="$(_uptime)" delta=$((delta - starttime)) echo "$delta" } # lilo compatibility parse_numeric() { case $1 in *:*) # Does it match /[0-9]*:[0-9]*/? minor=${1#*:} major=${1%:*} case $major$minor in *[!0-9]*) # No. return ;; esac ;; "" | *[!A-Fa-f0-9]*) # "", "/*", etc. return ;; *) # [A-Fa-f0-9]* value=$(( 0x${1} )) minor=$(( (value & 0xff) | (value >> 12) & 0xfff00 )) major=$(( (value >> 8) & 0xfff )) ;; esac # shellcheck disable=SC2034 ROOT="/dev/block/${major}:${minor}" } # Parameter: device node to check # Echos fstype to stdout # Return value: indicates if an fs could be recognized get_fstype () { local FS FSTYPE FS="${1}" # blkid has a more complete list of file systems, # but fstype is more robust FSTYPE="unknown" eval "$(fstype "${FS}" 2> /dev/null)" if [ "$FSTYPE" = "unknown" ]; then FSTYPE=$(blkid -o value -s TYPE "${FS}") || return fi echo "${FSTYPE}" return 0 } _set_netdev_from_ip_param() { # If the ip= parameter is present and specifies a device, use # that in preference to any device name we already have local IFS=: set -f # shellcheck disable=SC2086 set -- ${IP} set +f if [ -n "$6" ]; then DEVICE="$6" return 0 fi return 1 } _set_netdev_from_hw_address() { local want_address="$1" local device for device in /sys/class/net/*; do if [ -f "$device/address" ] && [ "$(cat "$device/address")" = "$want_address" ]; then DEVICE="${device##*/}" return 0 fi done return 1 } _usable_netdev_exists() { # Look for a device with IFF_LOOPBACK clear and (IFF_BROADCAST # or IFF_POINTTOPOINT) set. This is the same test the kernel # and ipconfig apply to find a device. local device local flags for device in /sys/class/net/*; do if [ -f "${device}/flags" ]; then flags="$(cat "${device}/flags")" if [ "$((flags & 8))" -eq 0 ] && [ "$((flags & 0x12))" -ne 0 ]; then return 0 fi fi done return 1 } _update_ip_param() { # If the ip= parameter is present, and is a colon-separated list, # but does not specify a device, substitute in the device name # we have local IFS=: set -f # shellcheck disable=SC2086 set -- ${IP} set +f if [ -z "$6" ] && [ $# -ge 2 ] && [ -n "${DEVICE}" ]; then IP="$1:$2:$3:$4:$5:${DEVICE}" shift 6 || shift $# IP="${IP}:$*" fi } configure_networking() { local netdev_desc # The order of precedence here is: # 1. Device specified by ip= kernel parameter # 2. Device matching MAC specified by BOOTIF= kernel parameter # 3. Build-time DEVICE variable # In case 2 we only discover the device name while waiting # for a device. if _set_netdev_from_ip_param; then netdev_desc="${DEVICE}" elif [ -n "${BOOTIF}" ]; then # pxelinux sets BOOTIF to a value based on the mac address of the # network card used to PXE boot # pxelinux sets BOOTIF to 01-$mac_address # strip off the leading "01-", which isn't part of the mac # address temp_mac=${BOOTIF#*-} # convert to typical mac address format by replacing "-" with ":" bootif_mac="" IFS='-' for x in $temp_mac ; do if [ -z "$bootif_mac" ]; then bootif_mac="$x" else bootif_mac="$bootif_mac:$x" fi done unset IFS _set_netdev_from_hw_address "${bootif_mac}" netdev_desc="device with address ${bootif_mac}" elif [ -n "${DEVICE}" ]; then netdev_desc="${DEVICE}" else netdev_desc="any network device" fi # networking already configured thus bail out [ -n "${DEVICE}" ] && [ -e /run/net-"${DEVICE}".conf ] && return 0 local netdevwait=180 log_begin_msg "Waiting up to ${netdevwait} secs for ${netdev_desc} to become available" while true; do if [ "$(time_elapsed)" -ge "$netdevwait" ]; then log_failure_msg "Network device did not appear in time" break fi if [ -n "${DEVICE}" ]; then [ -e "/sys/class/net/${DEVICE}" ] && break elif [ -n "${bootif_mac}" ]; then _set_netdev_from_hw_address "${bootif_mac}" && break else _usable_netdev_exists && break fi sleep 1 done log_end_msg _update_ip_param wait_for_udev 10 # support ip options see linux sources # Documentation/filesystems/nfs/nfsroot.txt # Documentation/frv/booting.txt for ROUNDTTT in 2 3 4 6 9 16 25 36 64 100; do # The NIC is to be configured if this file does not exist. # Ip-Config tries to create this file and when it succeds # creating the file, ipconfig is not run again. for x in /run/net-"${DEVICE}".conf /run/net-*.conf ; do [ -e "$x" ] && break 2 done case ${IP} in none|off) # Do nothing ;; ""|on|any) # Bring up device ipconfig -t ${ROUNDTTT} "${DEVICE}" ;; dhcp|bootp|rarp|both) ipconfig -t ${ROUNDTTT} -c "${IP}" -d "${DEVICE}" ;; *) ipconfig -t ${ROUNDTTT} -d "$IP" ;; esac done # source ipconfig output if [ -n "${DEVICE}" ]; then # source specific bootdevice . "/run/net-${DEVICE}.conf" else # source any interface... # ipconfig should have quit after first response . /run/net-*.conf fi } # Wait for queued kernel/udev events wait_for_udev() { command -v udevadm >/dev/null 2>&1 || return 0 udevadm settle ${1:+--timeout=$1} } # Find a specific fstab entry # $1=mountpoint # $2=fstype (optional) # returns 0 on success, 1 on failure (not found or no fstab) read_fstab_entry() { # Not found by default. found=1 for file in ${rootmnt?}/etc/fstab; do if [ -f "$file" ]; then # shellcheck disable=SC2034 while read -r MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK; do case "$MNT_FSNAME" in ""|\#*) continue; ;; esac if [ "$MNT_DIR" = "$1" ]; then if [ -n "$2" ]; then [ "$MNT_TYPE" = "$2" ] || continue; fi found=0 break 2 fi done < "$file" fi done return $found } # Resolve device node from a name. This expands any LABEL or UUID. # $1=name # Resolved name is echoed. resolve_device() { DEV="$1" case "$DEV" in LABEL=* | UUID=* | PARTLABEL=* | PARTUUID=*) DEV="$(blkid -l -t "$DEV" -o device)" || return 1 ;; esac [ -e "$DEV" ] && echo "$DEV" } # Check a file system. # $1=device # $2=mountpoint (for diagnostics only) # $3=type (may be "auto") _checkfs_once() { DEV="$1" NAME="$2" TYPE="$3" if [ "$NAME" = "/" ] ; then NAME="root" fi FSCK_LOGFILE=/run/initramfs/fsck.log FSCK_STAMPFILE=/run/initramfs/fsck-${NAME#/} if [ "${TYPE}" = "auto" ]; then TYPE="$(get_fstype "${DEV}")" fi FSCKCODE=0 if [ -z "${TYPE}" ]; then log_warning_msg "Type of $NAME file system is unknown, so skipping check." return fi if ! command -v fsck >/dev/null 2>&1; then log_warning_msg "fsck not present, so skipping $NAME file system" return fi if [ "${fastboot?}" = "y" ] ; then log_warning_msg "Fast boot enabled, so skipping $NAME file system check." return fi if [ "${forcefsck?}" = "y" ] then force="-f" else force="" fi if [ "${fsckfix?}" = "y" ] then fix="-y" elif [ "${fsckfix?}" = "n" ] then fix="-n" else fix="-a" fi spinner="" if [ -z "${debug?}" ]; then spinner="-C" fi if [ "${quiet}" = n ] then log_begin_msg "Will now check $NAME file system" # shellcheck disable=SC2086 logsave -a -s $FSCK_LOGFILE fsck $spinner $force $fix -V -t "$TYPE" "$DEV" FSCKCODE=$? log_end_msg else log_begin_msg "Checking $NAME file system" # shellcheck disable=SC2086 logsave -a -s $FSCK_LOGFILE fsck $spinner $force $fix -T -t "$TYPE" "$DEV" FSCKCODE=$? log_end_msg fi # NOTE: "failure" is defined as exiting with a return code of # 4, possibly or-ed with other flags. A return code of 1 # indicates that file system errors were corrected but that # the boot may proceed. # if [ "$FSCKCODE" -eq 32 ] then log_warning_msg "File system check was interrupted by user" elif [ $((FSCKCODE & 4)) -eq 4 ] then log_failure_msg "File system check of the $NAME filesystem failed" return 1 elif [ "$FSCKCODE" -gt 1 ] then log_warning_msg "File system check failed but did not detect errors" sleep 5 else true >"$FSCK_STAMPFILE" fi return 0 } checkfs() { while ! _checkfs_once "$@"; do panic "The $2 filesystem on $1 requires a manual fsck" done } # Mount a file system. We parse the information from the fstab. This # should be overridden by any boot script which can mount arbitrary # filesystems such as /usr. This default implementation delegates to # local or nfs based upon the filesystem type. # $1=mountpoint mount location mountfs() { type=local read_fstab_entry "$1" if [ "${MNT_TYPE}" = "nfs" ] || [ "${MNT_TYPE}" = "nfs4" ]; then type=nfs fi ${type}_mount_fs "$1" } # Mount the root file system. It should be overridden by all # boot scripts. mountroot() { : } # Run /scripts/${boot}-top. This should be overridden by all boot # scripts. mount_top() { : } # Run /scripts/${boot}-premount. This should be overridden by all boot # scripts. mount_premount() { : } # Run /scripts/${boot}-bottom. This should be overridden by all boot # scripts. mount_bottom() { : }