home *** CD-ROM | disk | FTP | other *** search
CPIO | 2009-11-02 | 33.8 MB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: CPIO
(archive/cpio).
You can browse this item here: initrd~
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| CPIO (archive/cpio)
| magic
| Supported |
1%
| dexvert
| Application Techniques Pizazz compressed (archive/PizazzCompressed)
| ext
| Unsupported |
100%
| file
| ASCII cpio archive (SVR4 with no CRC)
| default
| |
99%
| file
| data
| default
| |
54%
| TrID
| CPIO archive (portable new)
| default
| |
45%
| TrID
| CPIO archive (portable)
| default
| |
100%
| lsar
| Cpio
| default
| |
100%
| disktype
| cpio archive, ascii
| default
| |
100%
| binwalkID
| ASCII cpio archive (SVR4 with no CRC), file name: ".", file name length: "0x00000002", file size: "0x00000000"
| default
| |
100%
| xdgMime
| application/x-cpio
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 30 37 30 37 30 31 30 30 | 30 38 41 30 30 35 30 30 |07070100|08A00500|
|00000010| 30 30 34 31 45 44 30 30 | 30 30 30 30 30 30 30 30 |0041ED00|00000000|
|00000020| 30 30 30 30 30 30 30 30 | 30 30 30 30 31 30 34 41 |00000000|0000104A|
|00000030| 45 46 36 39 43 36 30 30 | 30 30 30 30 30 30 30 30 |EF69C600|00000000|
|00000040| 30 30 30 30 30 33 30 30 | 30 30 30 30 30 31 30 30 |00000300|00000100|
|00000050| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00000000|00000000|
|00000060| 30 30 30 30 30 32 30 30 | 30 30 30 30 30 30 2e 00 |00000200|000000..|
|00000070| 30 37 30 37 30 31 30 30 | 30 38 41 32 33 43 30 30 |07070100|08A23C00|
|00000080| 30 30 34 31 45 44 30 30 | 30 30 30 30 30 30 30 30 |0041ED00|00000000|
|00000090| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 32 34 41 |00000000|0000024A|
|000000a0| 45 32 34 45 38 36 30 30 | 30 30 30 30 30 30 30 30 |E24E8600|00000000|
|000000b0| 30 30 30 30 30 33 30 30 | 30 30 30 30 30 31 30 30 |00000300|00000100|
|000000c0| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00000000|00000000|
|000000d0| 30 30 30 30 30 34 30 30 | 30 30 30 30 30 30 6d 6e |00000400|000000mn|
|000000e0| 74 00 00 00 30 37 30 37 | 30 31 30 30 30 38 41 42 |t...0707|010008AB|
|000000f0| 41 30 30 30 30 30 38 31 | 41 34 30 30 30 30 30 30 |A0000081|A4000000|
|00000100| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00000000|00000000|
|00000110| 30 31 34 41 45 46 36 39 | 42 31 30 30 30 32 32 30 |014AEF69|B1000220|
|00000120| 42 34 30 30 30 30 30 30 | 30 33 30 30 30 30 30 30 |B4000000|03000000|
|00000130| 30 31 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |01000000|00000000|
|00000140| 30 30 30 30 30 30 30 30 | 30 38 30 30 30 30 30 30 |00000000|08000000|
|00000150| 30 30 69 6e 63 6c 75 64 | 65 00 00 00 23 3d 3d 3d |00includ|e...#===|
|00000160| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 23 20 |========|=====.# |
|00000170| 46 49 4c 45 20 20 20 20 | 20 20 20 20 20 20 3a 20 |FILE | : |
|00000180| 4b 49 57 49 4c 69 6e 75 | 78 52 43 2e 73 68 0a 23 |KIWILinu|xRC.sh.#|
|00000190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001a0| 0a 23 20 50 52 4f 4a 45 | 43 54 20 20 20 20 20 20 |.# PROJE|CT |
|000001b0| 20 3a 20 4f 70 65 6e 53 | 55 53 45 20 42 75 69 6c | : OpenS|USE Buil|
|000001c0| 64 2d 53 65 72 76 69 63 | 65 0a 23 20 43 4f 50 59 |d-Servic|e.# COPY|
|000001d0| 52 49 47 48 54 20 20 20 | 20 20 3a 20 28 63 29 20 |RIGHT | : (c) |
|000001e0| 32 30 30 36 20 53 55 53 | 45 20 4c 49 4e 55 58 20 |2006 SUS|E LINUX |
|000001f0| 50 72 6f 64 75 63 74 73 | 20 47 6d 62 48 2c 20 47 |Products| GmbH, G|
|00000200| 65 72 6d 61 6e 79 0a 23 | 20 20 20 20 20 20 20 20 |ermany.#| |
|00000210| 20 20 20 20 20 20 20 3a | 0a 23 20 41 55 54 48 4f | :|.# AUTHO|
|00000220| 52 20 20 20 20 20 20 20 | 20 3a 20 4d 61 72 63 75 |R | : Marcu|
|00000230| 73 20 53 63 68 61 65 66 | 65 72 20 3c 6d 73 40 73 |s Schaef|er <ms@s|
|00000240| 75 73 65 2e 64 65 3e 0a | 23 20 20 20 20 20 20 20 |use.de>.|# |
|00000250| 20 20 20 20 20 20 20 20 | 3a 0a 23 20 42 45 4c 4f | |:.# BELO|
|00000260| 4e 47 53 20 54 4f 20 20 | 20 20 3a 20 4f 70 65 72 |NGS TO | : Oper|
|00000270| 61 74 69 6e 67 20 53 79 | 73 74 65 6d 20 69 6d 61 |ating Sy|stem ima|
|00000280| 67 65 73 0a 23 20 20 20 | 20 20 20 20 20 20 20 20 |ges.# | |
|00000290| 20 20 20 20 3a 0a 23 20 | 44 45 53 43 52 49 50 54 | :.# |DESCRIPT|
|000002a0| 49 4f 4e 20 20 20 3a 20 | 54 68 69 73 20 6d 6f 64 |ION : |This mod|
|000002b0| 75 6c 65 20 63 6f 6e 74 | 61 69 6e 73 20 63 6f 6d |ule cont|ains com|
|000002c0| 6d 6f 6e 20 75 73 65 64 | 20 66 75 6e 63 74 69 6f |mon used| functio|
|000002d0| 6e 73 0a 23 20 20 20 20 | 20 20 20 20 20 20 20 20 |ns.# | |
|000002e0| 20 20 20 3a 20 66 6f 72 | 20 74 68 65 20 73 75 73 | : for| the sus|
|000002f0| 65 20 6c 69 6e 75 78 72 | 63 20 61 6e 64 20 70 72 |e linuxr|c and pr|
|00000300| 65 69 6e 69 74 20 62 6f | 6f 74 20 69 6d 61 67 65 |einit bo|ot image|
|00000310| 0a 23 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.# | |
|00000320| 20 3a 20 66 69 6c 65 73 | 0a 23 20 20 20 20 20 20 | : files|.# |
|00000330| 20 20 20 20 20 20 20 20 | 20 3a 20 0a 23 20 20 20 | | : .# |
|00000340| 20 20 20 20 20 20 20 20 | 20 20 20 20 3a 0a 23 20 | | :.# |
|00000350| 53 54 41 54 55 53 20 20 | 20 20 20 20 20 20 3a 20 |STATUS | : |
|00000360| 44 65 76 65 6c 6f 70 6d | 65 6e 74 0a 23 2d 2d 2d |Developm|ent.#---|
|00000370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 23 3d |--------|-----.#=|
|00000380| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000390| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003a0| 3d 3d 3d 3d 3d 0a 23 20 | 45 78 70 6f 72 74 73 20 |=====.# |Exports |
|000003b0| 28 47 65 6e 65 72 61 6c | 29 0a 23 2d 2d 2d 2d 2d |(General|).#-----|
|000003c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003e0| 2d 0a 65 78 70 6f 72 74 | 20 45 4c 4f 47 5f 46 49 |-.export| ELOG_FI|
|000003f0| 4c 45 3d 2f 76 61 72 2f | 6c 6f 67 2f 62 6f 6f 74 |LE=/var/|log/boot|
|00000400| 2e 6b 69 77 69 0a 65 78 | 70 6f 72 74 20 45 4c 4f |.kiwi.ex|port ELO|
|00000410| 47 5f 43 4f 4e 53 4f 4c | 45 3d 2f 64 65 76 2f 74 |G_CONSOL|E=/dev/t|
|00000420| 74 79 33 0a 65 78 70 6f | 72 74 20 45 4c 4f 47 5f |ty3.expo|rt ELOG_|
|00000430| 42 4f 4f 54 53 48 45 4c | 4c 3d 2f 64 65 76 2f 74 |BOOTSHEL|L=/dev/t|
|00000440| 74 79 32 0a 65 78 70 6f | 72 74 20 45 4c 4f 47 5f |ty2.expo|rt ELOG_|
|00000450| 45 58 43 45 50 54 49 4f | 4e 3d 2f 64 65 76 2f 74 |EXCEPTIO|N=/dev/t|
|00000460| 74 79 31 0a 65 78 70 6f | 72 74 20 4b 4c 4f 47 5f |ty1.expo|rt KLOG_|
|00000470| 43 4f 4e 53 4f 4c 45 3d | 34 0a 65 78 70 6f 72 74 |CONSOLE=|4.export|
|00000480| 20 4b 4c 4f 47 5f 44 45 | 46 41 55 4c 54 3d 31 0a | KLOG_DE|FAULT=1.|
|00000490| 65 78 70 6f 72 74 20 45 | 4c 4f 47 5f 53 54 4f 50 |export E|LOG_STOP|
|000004a0| 50 45 44 3d 30 0a 65 78 | 70 6f 72 74 20 50 41 52 |PED=0.ex|port PAR|
|000004b0| 54 49 54 49 4f 4e 45 52 | 3d 73 66 64 69 73 6b 0a |TITIONER|=sfdisk.|
|000004c0| 65 78 70 6f 72 74 20 54 | 52 41 4e 53 46 45 52 5f |export T|RANSFER_|
|000004d0| 45 52 52 4f 52 53 5f 46 | 49 4c 45 3d 2f 74 6d 70 |ERRORS_F|ILE=/tmp|
|000004e0| 2f 74 72 61 6e 73 66 65 | 72 2e 65 72 72 6f 72 73 |/transfe|r.errors|
|000004f0| 0a 65 78 70 6f 72 74 20 | 44 45 46 41 55 4c 54 5f |.export |DEFAULT_|
|00000500| 56 47 41 3d 30 78 33 31 | 34 0a 65 78 70 6f 72 74 |VGA=0x31|4.export|
|00000510| 20 48 41 56 45 5f 4d 4f | 44 55 4c 45 53 5f 4f 52 | HAVE_MO|DULES_OR|
|00000520| 44 45 52 3d 31 0a 65 78 | 70 6f 72 74 20 44 49 41 |DER=1.ex|port DIA|
|00000530| 4c 4f 47 5f 4c 41 4e 47 | 3d 61 73 6b 0a 65 78 70 |LOG_LANG|=ask.exp|
|00000540| 6f 72 74 20 55 46 4f 4e | 54 3d 2f 75 73 72 2f 73 |ort UFON|T=/usr/s|
|00000550| 68 61 72 65 2f 66 62 69 | 74 65 72 6d 2f 66 6f 6e |hare/fbi|term/fon|
|00000560| 74 73 2f 62 31 36 2e 70 | 63 66 2e 67 7a 0a 65 78 |ts/b16.p|cf.gz.ex|
|00000570| 70 6f 72 74 20 54 45 52 | 4d 3d 6c 69 6e 75 78 0a |port TER|M=linux.|
|00000580| 65 78 70 6f 72 74 20 4c | 41 4e 47 3d 65 6e 5f 55 |export L|ANG=en_U|
|00000590| 53 2e 75 74 66 38 0a 65 | 78 70 6f 72 74 20 55 54 |S.utf8.e|xport UT|
|000005a0| 49 4d 45 52 3d 30 0a 0a | 23 3d 3d 3d 3d 3d 3d 3d |IMER=0..|#=======|
|000005b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000005c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a |========|=======.|
|000005d0| 23 20 53 74 61 72 74 20 | 62 6f 6f 74 20 74 69 6d |# Start |boot tim|
|000005e0| 65 72 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |er.#----|--------|
|000005f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 69 66 20 5b 20 |--------|--.if [ |
|00000610| 2d 78 20 2f 75 73 72 2f | 62 69 6e 2f 75 74 69 6d |-x /usr/|bin/utim|
|00000620| 65 72 20 5d 3b 74 68 65 | 6e 0a 09 2f 75 73 72 2f |er ];the|n../usr/|
|00000630| 62 69 6e 2f 75 74 69 6d | 65 72 0a 09 65 78 70 6f |bin/utim|er..expo|
|00000640| 72 74 20 55 54 49 4d 45 | 52 3d 24 28 63 61 74 20 |rt UTIME|R=$(cat |
|00000650| 2f 76 61 72 2f 72 75 6e | 2f 75 74 69 6d 65 72 2e |/var/run|/utimer.|
|00000660| 70 69 64 29 0a 66 69 0a | 0a 23 3d 3d 3d 3d 3d 3d |pid).fi.|.#======|
|00000670| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000680| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000690| 0a 23 20 44 69 61 6c 6f | 67 0a 23 2d 2d 2d 2d 2d |.# Dialo|g.#-----|
|000006a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006c0| 2d 0a 66 75 6e 63 74 69 | 6f 6e 20 44 69 61 6c 6f |-.functi|on Dialo|
|000006d0| 67 20 7b 0a 09 6c 6f 63 | 61 6c 20 63 6f 64 65 3d |g {..loc|al code=|
|000006e0| 31 0a 09 65 78 70 6f 72 | 74 20 44 49 41 4c 4f 47 |1..expor|t DIALOG|
|000006f0| 5f 43 41 4e 43 45 4c 3d | 31 0a 09 69 66 20 5b 20 |_CANCEL=|1..if [ |
|00000700| 2d 65 20 2f 64 65 76 2f | 66 62 30 20 5d 3b 74 68 |-e /dev/|fb0 ];th|
|00000710| 65 6e 0a 09 09 63 6f 64 | 65 3d 24 28 66 62 69 74 |en...cod|e=$(fbit|
|00000720| 65 72 6d 20 2d 6d 20 24 | 55 46 4f 4e 54 20 2d 2d |erm -m $|UFONT --|
|00000730| 20 64 69 61 6c 6f 67 20 | 5c 0a 09 09 09 2d 2d 6f | dialog |\....--o|
|00000740| 6b 2d 6c 61 62 65 6c 20 | 22 24 28 67 65 74 54 65 |k-label |"$(getTe|
|00000750| 78 74 20 22 4f 4b 22 29 | 22 20 5c 0a 09 09 09 2d |xt "OK")|" \....-|
|00000760| 2d 63 61 6e 63 65 6c 2d | 6c 61 62 65 6c 20 22 24 |-cancel-|label "$|
|00000770| 28 67 65 74 54 65 78 74 | 20 22 43 61 6e 63 65 6c |(getText| "Cancel|
|00000780| 22 29 22 20 5c 0a 09 09 | 09 2d 2d 79 65 73 2d 6c |")" \...|.--yes-l|
|00000790| 61 62 65 6c 20 22 24 28 | 67 65 74 54 65 78 74 20 |abel "$(|getText |
|000007a0| 22 59 65 73 22 29 22 20 | 5c 0a 09 09 09 2d 2d 6e |"Yes")" |\....--n|
|000007b0| 6f 2d 6c 61 62 65 6c 20 | 22 24 28 67 65 74 54 65 |o-label |"$(getTe|
|000007c0| 78 74 20 22 4e 6f 22 29 | 22 20 5c 0a 09 09 09 2d |xt "No")|" \....-|
|000007d0| 2d 65 78 69 74 2d 6c 61 | 62 65 6c 20 22 24 28 67 |-exit-la|bel "$(g|
|000007e0| 65 74 54 65 78 74 20 22 | 45 78 69 74 22 29 22 20 |etText "|Exit")" |
|000007f0| 5c 0a 09 09 09 22 24 40 | 22 3b 65 63 68 6f 20 24 |\...."$@|";echo $|
|00000800| 3f 29 0a 09 09 63 6f 64 | 65 3d 24 28 65 63 68 6f |?)...cod|e=$(echo|
|00000810| 20 24 63 6f 64 65 20 7c | 20 63 75 74 20 2d 63 35 | $code || cut -c5|
|00000820| 2d 29 0a 09 65 6c 73 65 | 0a 09 09 64 69 61 6c 6f |-)..else|...dialo|
|00000830| 67 20 5c 0a 09 09 09 2d | 2d 6f 6b 2d 6c 61 62 65 |g \....-|-ok-labe|
|00000840| 6c 20 22 24 28 67 65 74 | 54 65 78 74 20 22 4f 4b |l "$(get|Text "OK|
|00000850| 22 29 22 20 5c 0a 09 09 | 09 2d 2d 63 61 6e 63 65 |")" \...|.--cance|
|00000860| 6c 2d 6c 61 62 65 6c 20 | 22 24 28 67 65 74 54 65 |l-label |"$(getTe|
|00000870| 78 74 20 22 43 61 6e 63 | 65 6c 22 29 22 20 5c 0a |xt "Canc|el")" \.|
|00000880| 09 09 09 2d 2d 79 65 73 | 2d 6c 61 62 65 6c 20 22 |...--yes|-label "|
|00000890| 24 28 67 65 74 54 65 78 | 74 20 22 59 65 73 22 29 |$(getTex|t "Yes")|
|000008a0| 22 20 5c 0a 09 09 09 2d | 2d 6e 6f 2d 6c 61 62 65 |" \....-|-no-labe|
|000008b0| 6c 20 22 24 28 67 65 74 | 54 65 78 74 20 22 4e 6f |l "$(get|Text "No|
|000008c0| 22 29 22 20 5c 0a 09 09 | 09 2d 2d 65 78 69 74 2d |")" \...|.--exit-|
|000008d0| 6c 61 62 65 6c 20 22 24 | 28 67 65 74 54 65 78 74 |label "$|(getText|
|000008e0| 20 22 45 78 69 74 22 29 | 22 20 5c 0a 09 09 09 22 | "Exit")|" \...."|
|000008f0| 24 40 22 0a 09 09 63 6f | 64 65 3d 24 3f 0a 09 66 |$@"...co|de=$?..f|
|00000900| 69 0a 09 72 65 74 75 72 | 6e 20 24 63 6f 64 65 0a |i..retur|n $code.|
|00000910| 7d 0a 23 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |}.#=====|========|
|00000920| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000930| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0a 23 20 44 65 62 75 |========|=.# Debu|
|00000940| 67 0a 23 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |g.#-----|--------|
|00000950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 66 75 6e 63 74 69 |--------|-.functi|
|00000970| 6f 6e 20 44 65 62 75 67 | 20 7b 0a 09 23 20 2f 2e |on Debug| {..# /.|
|00000980| 2e 2e 2f 0a 09 23 20 70 | 72 69 6e 74 20 6d 65 73 |../..# p|rint mes|
|00000990| 73 61 67 65 20 69 66 20 | 76 61 72 69 61 62 6c 65 |sage if |variable|
|000009a0| 20 44 45 42 55 47 20 69 | 73 20 73 65 74 20 74 6f | DEBUG i|s set to|
|000009b0| 20 31 0a 09 23 20 2d 2d | 2d 2d 2d 0a 09 69 66 20 | 1..# --|---..if |
|000009c0| 74 65 73 74 20 22 24 44 | 45 42 55 47 22 20 3d 20 |test "$D|EBUG" = |
|000009d0| 31 3b 74 68 65 6e 0a 09 | 09 65 63 68 6f 20 22 2b |1;then..|.echo "+|
|000009e0| 2b 2b 2b 2b 3e 20 24 31 | 22 0a 09 66 69 0a 7d 0a |++++> $1|"..fi.}.|
|000009f0| 23 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |#=======|========|
|00000a00| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000a10| 3d 3d 3d 3d 3d 3d 3d 0a | 23 20 45 63 68 6f 0a 23 |=======.|# Echo.#|
|00000a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a40| 2d 2d 2d 2d 2d 2d 0a 66 | 75 6e 63 74 69 6f 6e 20 |------.f|unction |
|00000a50| 45 63 68 6f 20 7b 0a 09 | 23 20 2f 2e 2e 2e 2f 0a |Echo {..|# /.../.|
|00000a60| 09 23 20 70 72 69 6e 74 | 20 61 20 6d 65 73 73 61 |.# print| a messa|
|00000a70| 67 65 20 74 6f 20 74 68 | 65 20 63 6f 6e 74 72 6f |ge to th|e contro|
|00000a80| 6c 69 6e 67 20 74 65 72 | 6d 69 6e 61 6c 0a 09 23 |ling ter|minal..#|
|00000a90| 20 2d 2d 2d 2d 0a 09 69 | 66 20 5b 20 24 45 4c 4f | ----..i|f [ $ELO|
|00000aa0| 47 5f 53 54 4f 50 50 45 | 44 20 3d 20 30 20 5d 3b |G_STOPPE|D = 0 ];|
|00000ab0| 74 68 65 6e 0a 09 09 73 | 65 74 20 2b 78 0a 09 66 |then...s|et +x..f|
|00000ac0| 69 0a 09 69 66 20 5b 20 | 21 20 24 55 54 49 4d 45 |i..if [ |! $UTIME|
|00000ad0| 52 20 3d 20 30 20 5d 3b | 74 68 65 6e 0a 09 09 6b |R = 0 ];|then...k|
|00000ae0| 69 6c 6c 20 2d 48 55 50 | 20 24 55 54 49 4d 45 52 |ill -HUP| $UTIMER|
|00000af0| 0a 09 09 6c 6f 63 61 6c | 20 70 72 65 66 69 78 3d |...local| prefix=|
|00000b00| 24 28 63 61 74 20 2f 74 | 6d 70 2f 75 74 69 6d 65 |$(cat /t|mp/utime|
|00000b10| 72 29 0a 09 65 6c 73 65 | 0a 09 09 6c 6f 63 61 6c |r)..else|...local|
|00000b20| 20 70 72 65 66 69 78 3d | 22 3d 3d 3d 3e 22 0a 09 | prefix=|"===>"..|
|00000b30| 66 69 0a 09 6c 6f 63 61 | 6c 20 6f 70 74 69 6f 6e |fi..loca|l option|
|00000b40| 3d 22 22 0a 09 6c 6f 63 | 61 6c 20 6f 70 74 6e 3d |=""..loc|al optn=|
|00000b50| 22 22 0a 09 6c 6f 63 61 | 6c 20 6f 70 74 65 3d 22 |""..loca|l opte="|
|00000b60| 22 0a 09 77 68 69 6c 65 | 20 67 65 74 6f 70 74 73 |"..while| getopts|
|00000b70| 20 22 62 6e 65 22 20 6f | 70 74 69 6f 6e 3b 64 6f | "bne" o|ption;do|
|00000b80| 0a 09 09 63 61 73 65 20 | 24 6f 70 74 69 6f 6e 20 |...case |$option |
|00000b90| 69 6e 0a 09 09 09 62 29 | 20 70 72 65 66 69 78 3d |in....b)| prefix=|
|00000ba0| 22 20 20 20 20 22 20 3b | 3b 0a 09 09 09 6e 29 20 |" " ;|;....n) |
|00000bb0| 6f 70 74 6e 3d 22 2d 6e | 22 20 3b 3b 0a 09 09 09 |optn="-n|" ;;....|
|00000bc0| 65 29 20 6f 70 74 65 3d | 22 2d 65 22 20 3b 3b 0a |e) opte=|"-e" ;;.|
|00000bd0| 09 09 09 2a 29 20 65 63 | 68 6f 20 22 49 6e 76 61 |...*) ec|ho "Inva|
|00000be0| 6c 69 64 20 61 72 67 75 | 6d 65 6e 74 3a 20 24 6f |lid argu|ment: $o|
|00000bf0| 70 74 69 6f 6e 22 20 3b | 3b 0a 09 09 65 73 61 63 |ption" ;|;...esac|
|00000c00| 0a 09 64 6f 6e 65 0a 09 | 73 68 69 66 74 20 24 28 |..done..|shift $(|
|00000c10| 28 24 4f 50 54 49 4e 44 | 20 2d 20 31 29 29 0a 09 |($OPTIND| - 1))..|
|00000c20| 69 66 20 5b 20 24 45 4c | 4f 47 5f 53 54 4f 50 50 |if [ $EL|OG_STOPP|
|00000c30| 45 44 20 3d 20 30 20 5d | 3b 74 68 65 6e 0a 09 09 |ED = 0 ]|;then...|
|00000c40| 73 65 74 20 2d 78 0a 09 | 66 69 0a 09 65 63 68 6f |set -x..|fi..echo|
|00000c50| 20 24 6f 70 74 6e 20 24 | 6f 70 74 65 20 22 24 70 | $optn $|opte "$p|
|00000c60| 72 65 66 69 78 20 24 31 | 22 0a 09 69 66 20 5b 20 |refix $1|"..if [ |
|00000c70| 24 45 4c 4f 47 5f 53 54 | 4f 50 50 45 44 20 3d 20 |$ELOG_ST|OPPED = |
|00000c80| 30 20 5d 3b 74 68 65 6e | 0a 09 09 73 65 74 20 2b |0 ];then|...set +|
|00000c90| 78 0a 09 66 69 0a 09 4f | 50 54 49 4e 44 3d 31 0a |x..fi..O|PTIND=1.|
|00000ca0| 09 69 66 20 5b 20 24 45 | 4c 4f 47 5f 53 54 4f 50 |.if [ $E|LOG_STOP|
|00000cb0| 50 45 44 20 3d 20 30 20 | 5d 3b 74 68 65 6e 0a 09 |PED = 0 |];then..|
|00000cc0| 09 73 65 74 20 2d 78 0a | 09 66 69 0a 7d 0a 23 3d |.set -x.|.fi.}.#=|
|00000cd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000ce0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000cf0| 3d 3d 3d 3d 3d 0a 23 20 | 57 61 69 74 4b 65 79 0a |=====.# |WaitKey.|
|00000d00| 23 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |#-------|--------|
|00000d10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d20| 2d 2d 2d 2d 2d 2d 2d 0a | 66 75 6e 63 74 69 6f 6e |-------.|function|
|00000d30| 20 57 61 69 74 4b 65 79 | 20 7b 0a 09 23 20 2f 2e | WaitKey| {..# /.|
|00000d40| 2e 2e 2f 0a 09 23 20 69 | 66 20 44 45 42 55 47 20 |../..# i|f DEBUG |
|00000d50| 69 73 20 73 65 74 20 77 | 61 69 74 20 66 6f 72 20 |is set w|ait for |
|00000d60| 45 4e 54 45 52 20 74 6f | 20 63 6f 6e 74 69 6e 75 |ENTER to| continu|
|00000d70| 65 0a 09 23 20 2d 2d 2d | 2d 0a 09 69 66 20 74 65 |e..# ---|-..if te|
|00000d80| 73 74 20 22 24 44 45 42 | 55 47 22 20 3d 20 31 3b |st "$DEB|UG" = 1;|
|00000d90| 74 68 65 6e 0a 09 09 45 | 63 68 6f 20 2d 6e 20 22 |then...E|cho -n "|
|00000da0| 50 72 65 73 73 20 45 4e | 54 45 52 20 74 6f 20 63 |Press EN|TER to c|
|00000db0| 6f 6e 74 69 6e 75 65 2e | 2e 2e 22 0a 09 09 72 65 |ontinue.|.."...re|
|00000dc0| 61 64 0a 09 66 69 0a 7d | 0a 23 3d 3d 3d 3d 3d 3d |ad..fi.}|.#======|
|00000dd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000de0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000df0| 0a 23 20 63 6c 6f 73 65 | 4b 65 72 6e 65 6c 43 6f |.# close|KernelCo|
|00000e00| 6e 73 6f 6c 65 0a 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |nsole.#-|--------|
|00000e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 66 75 |--------|-----.fu|
|00000e30| 6e 63 74 69 6f 6e 20 63 | 6c 6f 73 65 4b 65 72 6e |nction c|loseKern|
|00000e40| 65 6c 43 6f 6e 73 6f 6c | 65 20 7b 0a 09 23 20 2f |elConsol|e {..# /|
|00000e50| 2e 2e 2e 2f 0a 09 23 20 | 63 6c 6f 73 65 20 74 68 |.../..# |close th|
|00000e60| 65 20 6b 65 72 6e 65 6c | 20 63 6f 6e 73 6f 6c 65 |e kernel| console|
|00000e70| 2c 20 73 65 74 20 6c 65 | 76 65 6c 20 74 6f 20 31 |, set le|vel to 1|
|00000e80| 0a 09 23 20 2d 2d 2d 2d | 0a 09 6b 6c 6f 67 63 6f |..# ----|..klogco|
|00000e90| 6e 73 6f 6c 65 20 2d 6c | 20 31 0a 7d 0a 23 3d 3d |nsole -l| 1.}.#==|
|00000ea0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000eb0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000ec0| 3d 3d 3d 3d 0a 23 20 6f | 70 65 6e 4b 65 72 6e 65 |====.# o|penKerne|
|00000ed0| 6c 43 6f 6e 73 6f 6c 65 | 0a 23 2d 2d 2d 2d 2d 2d |lConsole|.#------|
|00000ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f00| 0a 66 75 6e 63 74 69 6f | 6e 20 6f 70 65 6e 4b 65 |.functio|n openKe|
|00000f10| 72 6e 65 6c 43 6f 6e 73 | 6f 6c 65 20 7b 0a 09 23 |rnelCons|ole {..#|
|00000f20| 20 2f 2e 2e 2e 2f 0a 09 | 23 20 6d 6f 76 65 20 74 | /.../..|# move t|
|00000f30| 68 65 20 6b 65 72 6e 65 | 6c 20 63 6f 6e 73 6f 6c |he kerne|l consol|
|00000f40| 65 20 74 6f 20 74 65 72 | 6d 69 6e 61 6c 20 33 20 |e to ter|minal 3 |
|00000f50| 61 73 20 79 6f 75 20 63 | 61 6e 27 74 20 73 65 65 |as you c|an't see|
|00000f60| 20 74 68 65 20 6d 65 73 | 73 61 67 65 73 0a 09 23 | the mes|sages..#|
|00000f70| 20 6e 6f 77 20 64 69 72 | 65 63 74 6c 79 20 69 74 | now dir|ectly it|
|00000f80| 20 6c 6f 6f 6b 73 20 6c | 69 6b 65 20 74 68 65 20 | looks l|ike the |
|00000f90| 6b 65 72 6e 65 6c 20 63 | 6f 6e 73 6f 6c 65 20 69 |kernel c|onsole i|
|00000fa0| 73 20 73 77 69 74 63 68 | 65 64 20 6f 66 66 0a 09 |s switch|ed off..|
|00000fb0| 23 20 62 75 74 20 69 74 | 20 69 73 6e 27 74 20 72 |# but it| isn't r|
|00000fc0| 65 61 6c 6c 79 2e 20 49 | 66 20 44 45 42 55 47 20 |eally. I|f DEBUG |
|00000fd0| 69 73 20 73 65 74 20 74 | 68 65 20 6c 6f 67 67 69 |is set t|he loggi|
|00000fe0| 6e 67 20 72 65 6d 61 69 | 6e 73 20 6f 6e 0a 09 23 |ng remai|ns on..#|
|00000ff0| 20 74 68 65 20 66 69 72 | 73 74 20 63 6f 6e 73 6f | the fir|st conso|
|00001000| 6c 65 0a 09 23 20 2d 2d | 2d 2d 0a 09 69 66 20 74 |le..# --|--..if t|
|00001010| 65 73 74 20 22 24 44 45 | 42 55 47 22 20 3d 20 30 |est "$DE|BUG" = 0|
|00001020| 3b 74 68 65 6e 0a 09 09 | 45 63 68 6f 20 22 4b 65 |;then...|Echo "Ke|
|00001030| 72 6e 65 6c 20 6c 6f 67 | 67 69 6e 67 20 65 6e 61 |rnel log|ging ena|
|00001040| 62 6c 65 64 20 6f 6e 3a | 20 2f 64 65 76 2f 74 74 |bled on:| /dev/tt|
|00001050| 79 24 4b 4c 4f 47 5f 43 | 4f 4e 53 4f 4c 45 22 0a |y$KLOG_C|ONSOLE".|
|00001060| 09 09 73 65 74 63 74 73 | 69 64 20 2f 64 65 76 2f |..setcts|id /dev/|
|00001070| 74 74 79 24 4b 4c 4f 47 | 5f 43 4f 4e 53 4f 4c 45 |tty$KLOG|_CONSOLE|
|00001080| 20 5c 0a 09 09 09 6b 6c | 6f 67 63 6f 6e 73 6f 6c | \....kl|ogconsol|
|00001090| 65 20 2d 6c 20 37 20 2d | 72 24 4b 4c 4f 47 5f 43 |e -l 7 -|r$KLOG_C|
|000010a0| 4f 4e 53 4f 4c 45 0a 09 | 66 69 0a 7d 0a 23 3d 3d |ONSOLE..|fi.}.#==|
|000010b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000010c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000010d0| 3d 3d 3d 3d 0a 23 20 72 | 65 6f 70 65 6e 4b 65 72 |====.# r|eopenKer|
|000010e0| 6e 65 6c 43 6f 6e 73 6f | 6c 65 0a 23 2d 2d 2d 2d |nelConso|le.#----|
|000010f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001110| 2d 2d 0a 66 75 6e 63 74 | 69 6f 6e 20 72 65 6f 70 |--.funct|ion reop|
|00001120| 65 6e 4b 65 72 6e 65 6c | 43 6f 6e 73 6f 6c 65 20 |enKernel|Console |
|00001130| 7b 0a 09 23 20 2f 2e 2e | 2e 2f 0a 09 23 20 72 65 |{..# /..|./..# re|
|00001140| 6f 70 65 6e 20 6b 65 72 | 6e 65 6c 20 63 6f 6e 73 |open ker|nel cons|
|00001150| 6f 6c 65 20 74 6f 20 62 | 65 20 61 62 6c 65 20 74 |ole to b|e able t|
|00001160| 6f 20 73 65 65 20 6b 65 | 72 6e 65 6c 20 6d 65 73 |o see ke|rnel mes|
|00001170| 73 61 67 65 73 0a 09 23 | 20 77 68 69 6c 65 20 74 |sages..#| while t|
|00001180| 68 65 20 73 79 73 74 65 | 6d 20 69 73 20 62 6f 6f |he syste|m is boo|
|00001190| 74 69 6e 67 0a 09 23 20 | 2d 2d 2d 2d 0a 09 45 63 |ting..# |----..Ec|
|000011a0| 68 6f 20 22 4b 65 72 6e | 65 6c 20 6c 6f 67 67 69 |ho "Kern|el loggi|
|000011b0| 6e 67 20 65 6e 61 62 6c | 65 64 20 6f 6e 3a 20 2f |ng enabl|ed on: /|
|000011c0| 64 65 76 2f 74 74 79 24 | 4b 4c 4f 47 5f 44 45 46 |dev/tty$|KLOG_DEF|
|000011d0| 41 55 4c 54 22 0a 09 6b | 6c 6f 67 63 6f 6e 73 6f |AULT"..k|logconso|
|000011e0| 6c 65 20 2d 6c 20 37 20 | 2d 72 24 4b 4c 4f 47 5f |le -l 7 |-r$KLOG_|
|000011f0| 44 45 46 41 55 4c 54 0a | 7d 0a 23 3d 3d 3d 3d 3d |DEFAULT.|}.#=====|
|00001200| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001210| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001220| 3d 0a 23 20 69 6d 70 6f | 72 74 46 69 6c 65 0a 23 |=.# impo|rtFile.#|
|00001230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001250| 2d 2d 2d 2d 2d 2d 0a 66 | 75 6e 63 74 69 6f 6e 20 |------.f|unction |
|00001260| 69 6d 70 6f 72 74 46 69 | 6c 65 20 7b 0a 09 23 20 |importFi|le {..# |
|00001270| 2f 2e 2e 2e 2f 0a 09 23 | 20 69 6d 70 6f 72 74 20 |/.../..#| import |
|00001280| 74 68 65 20 63 6f 6e 66 | 69 67 2e 3c 4d 41 43 3e |the conf|ig.<MAC>|
|00001290| 20 73 74 79 6c 65 20 66 | 6f 72 6d 61 74 2e 20 74 | style f|ormat. t|
|000012a0| 68 65 20 66 75 6e 63 74 | 69 6f 6e 0a 09 23 20 77 |he funct|ion..# w|
|000012b0| 69 6c 6c 20 65 78 70 6f | 72 74 20 65 61 63 68 20 |ill expo|rt each |
|000012c0| 65 6e 74 72 79 20 6f 66 | 20 74 68 65 20 66 69 6c |entry of| the fil|
|000012d0| 65 20 61 73 20 76 61 72 | 69 61 62 6c 65 20 69 6e |e as var|iable in|
|000012e0| 74 6f 0a 09 23 20 74 68 | 65 20 63 75 72 72 65 6e |to..# th|e curren|
|000012f0| 74 20 73 68 65 6c 6c 20 | 65 6e 76 69 72 6f 6e 6d |t shell |environm|
|00001300| 65 6e 74 0a 09 23 20 2d | 2d 2d 2d 0a 09 49 46 53 |ent..# -|---..IFS|
|00001310| 3d 22 0a 09 22 0a 09 77 | 68 69 6c 65 20 72 65 61 |=".."..w|hile rea|
|00001320| 64 20 6c 69 6e 65 3b 64 | 6f 0a 09 09 65 63 68 6f |d line;d|o...echo|
|00001330| 20 24 6c 69 6e 65 20 7c | 20 67 72 65 70 20 2d 71 | $line || grep -q|
|00001340| 69 20 22 5e 23 22 20 26 | 26 20 63 6f 6e 74 69 6e |i "^#" &|& contin|
|00001350| 75 65 0a 09 09 6b 65 79 | 3d 60 65 63 68 6f 20 22 |ue...key|=`echo "|
|00001360| 24 6c 69 6e 65 22 20 7c | 20 63 75 74 20 2d 64 20 |$line" || cut -d |
|00001370| 27 3d 27 20 2d 66 31 60 | 0a 09 09 69 74 65 6d 3d |'=' -f1`|...item=|
|00001380| 60 65 63 68 6f 20 22 24 | 6c 69 6e 65 22 20 7c 20 |`echo "$|line" | |
|00001390| 63 75 74 20 2d 64 20 27 | 3d 27 20 2d 66 32 2d 60 |cut -d '|=' -f2-`|
|000013a0| 0a 09 09 69 66 20 5b 20 | 2d 7a 20 22 24 6b 65 79 |...if [ |-z "$key|
|000013b0| 22 20 5d 20 7c 7c 20 5b | 20 2d 7a 20 22 24 69 74 |" ] || [| -z "$it|
|000013c0| 65 6d 22 20 5d 3b 74 68 | 65 6e 0a 09 09 09 63 6f |em" ];th|en....co|
|000013d0| 6e 74 69 6e 75 65 0a 09 | 09 66 69 0a 09 09 69 66 |ntinue..|.fi...if|
|000013e0| 20 21 20 65 63 68 6f 20 | 24 69 74 65 6d 20 7c 20 | ! echo |$item | |
|000013f0| 67 72 65 70 20 2d 45 20 | 2d 71 20 22 5e 28 5c 22 |grep -E |-q "^(\"|
|00001400| 7c 27 29 22 3b 74 68 65 | 6e 0a 09 09 09 69 74 65 ||')";the|n....ite|
|00001410| 6d 3d 22 27 22 24 69 74 | 65 6d 22 27 22 0a 09 09 |m="'"$it|em"'"...|
|00001420| 66 69 0a 09 09 44 65 62 | 75 67 20 22 24 6b 65 79 |fi...Deb|ug "$key|
|00001430| 3d 24 69 74 65 6d 22 0a | 09 09 65 76 61 6c 20 65 |=$item".|..eval e|
|00001440| 78 70 6f 72 74 20 22 24 | 6b 65 79 5c 3d 24 69 74 |xport "$|key\=$it|
|00001450| 65 6d 22 0a 09 64 6f 6e | 65 0a 09 69 66 20 5b 20 |em"..don|e..if [ |
|00001460| 21 20 2d 7a 20 22 24 45 | 52 52 4f 52 5f 49 4e 54 |! -z "$E|RROR_INT|
|00001470| 45 52 52 55 50 54 22 20 | 5d 3b 74 68 65 6e 0a 09 |ERRUPT" |];then..|
|00001480| 09 45 63 68 6f 20 2d 65 | 20 22 24 45 52 52 4f 52 |.Echo -e| "$ERROR|
|00001490| 5f 49 4e 54 45 52 52 55 | 50 54 22 0a 09 09 73 79 |_INTERRU|PT"...sy|
|000014a0| 73 74 65 6d 45 78 63 65 | 70 74 69 6f 6e 20 22 2a |stemExce|ption "*|
|000014b0| 2a 2a 20 69 6e 74 65 72 | 72 75 70 74 65 64 20 2a |** inter|rupted *|
|000014c0| 2a 2a 2a 22 20 22 73 68 | 65 6c 6c 22 0a 09 66 69 |***" "sh|ell"..fi|
|000014d0| 0a 09 49 46 53 3d 24 49 | 46 53 5f 4f 52 49 47 0a |..IFS=$I|FS_ORIG.|
|000014e0| 7d 0a 23 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |}.#=====|========|
|000014f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001500| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0a 23 20 73 79 73 74 |========|=.# syst|
|00001510| 65 6d 45 78 63 65 70 74 | 69 6f 6e 0a 23 2d 2d 2d |emExcept|ion.#---|
|00001520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001540| 2d 2d 2d 0a 66 75 6e 63 | 74 69 6f 6e 20 73 79 73 |---.func|tion sys|
|00001550| 74 65 6d 45 78 63 65 70 | 74 69 6f 6e 20 7b 0a 09 |temExcep|tion {..|
|00001560| 23 20 2f 2e 2e 2e 2f 0a | 09 23 20 70 72 69 6e 74 |# /.../.|.# print|
|00001570| 20 61 20 6d 65 73 73 61 | 67 65 20 74 6f 20 74 68 | a messa|ge to th|
|00001580| 65 20 63 6f 6e 74 72 6f | 6c 69 6e 67 20 74 65 72 |e contro|ling ter|
|00001590| 6d 69 6e 61 6c 20 66 6f | 6c 6c 6f 77 65 64 0a 09 |minal fo|llowed..|
|000015a0| 23 20 62 79 20 61 6e 20 | 61 63 74 69 6f 6e 2e 20 |# by an |action. |
|000015b0| 50 6f 73 73 69 62 6c 65 | 20 61 63 74 69 6f 6e 73 |Possible| actions|
|000015c0| 20 61 72 65 20 72 65 62 | 6f 6f 74 2c 20 77 61 69 | are reb|oot, wai|
|000015d0| 74 0a 09 23 20 61 6e 64 | 20 6f 70 65 6e 69 6e 67 |t..# and| opening|
|000015e0| 20 61 20 73 68 65 6c 6c | 0a 09 23 20 2d 2d 2d 2d | a shell|..# ----|
|000015f0| 0a 09 73 65 74 20 2b 78 | 0a 09 6c 6f 63 61 6c 20 |..set +x|..local |
|00001600| 77 68 61 74 3d 24 32 0a | 09 74 65 73 74 20 2d 65 |what=$2.|.test -e|
|00001610| 20 2f 70 72 6f 63 2f 73 | 70 6c 61 73 68 20 26 26 | /proc/s|plash &&|
|00001620| 20 65 63 68 6f 20 76 65 | 72 62 6f 73 65 20 3e 20 | echo ve|rbose > |
|00001630| 2f 70 72 6f 63 2f 73 70 | 6c 61 73 68 0a 09 69 66 |/proc/sp|lash..if|
|00001640| 20 5b 20 24 77 68 61 74 | 20 3d 20 22 72 65 62 6f | [ $what| = "rebo|
|00001650| 6f 74 22 20 5d 3b 74 68 | 65 6e 0a 09 09 69 66 20 |ot" ];th|en...if |
|00001660| 63 61 74 20 2f 70 72 6f | 63 2f 63 6d 64 6c 69 6e |cat /pro|c/cmdlin|
|00001670| 65 20 7c 20 67 72 65 70 | 20 2d 71 69 20 22 6b 69 |e | grep| -qi "ki|
|00001680| 77 69 64 65 62 75 67 3d | 31 22 3b 74 68 65 6e 0a |widebug=|1";then.|
|00001690| 09 09 09 77 68 61 74 3d | 22 73 68 65 6c 6c 22 0a |...what=|"shell".|
|000016a0| 09 09 66 69 0a 09 66 69 | 0a 09 45 63 68 6f 20 22 |..fi..fi|..Echo "|
|000016b0| 24 31 22 0a 09 63 61 73 | 65 20 22 24 77 68 61 74 |$1"..cas|e "$what|
|000016c0| 22 20 69 6e 0a 09 22 72 | 65 62 6f 6f 74 22 29 0a |" in.."r|eboot").|
|000016d0| 09 09 45 63 68 6f 20 22 | 72 65 62 6f 6f 74 45 78 |..Echo "|rebootEx|
|000016e0| 63 65 70 74 69 6f 6e 3a | 20 65 72 72 6f 72 20 63 |ception:| error c|
|000016f0| 6f 6e 73 6f 6c 65 73 20 | 61 74 20 41 6c 74 2d 46 |onsoles |at Alt-F|
|00001700| 33 2f 46 34 22 0a 09 09 | 45 63 68 6f 20 22 72 65 |3/F4"...|Echo "re|
|00001710| 62 6f 6f 74 45 78 63 65 | 70 74 69 6f 6e 3a 20 72 |bootExce|ption: r|
|00001720| 65 62 6f 6f 74 20 69 6e | 20 31 32 30 20 73 65 63 |eboot in| 120 sec|
|00001730| 2e 2e 2e 22 3b 20 73 6c | 65 65 70 20 31 32 30 0a |..."; sl|eep 120.|
|00001740| 09 09 2f 73 62 69 6e 2f | 72 65 62 6f 6f 74 20 2d |../sbin/|reboot -|
|00001750| 66 20 2d 69 20 3e 2f 64 | 65 76 2f 6e 75 6c 6c 0a |f -i >/d|ev/null.|
|00001760| 09 3b 3b 0a 09 22 77 61 | 69 74 22 29 0a 09 09 45 |.;;.."wa|it")...E|
|00001770| 63 68 6f 20 22 77 61 69 | 74 45 78 63 65 70 74 69 |cho "wai|tExcepti|
|00001780| 6f 6e 3a 20 77 61 69 74 | 69 6e 67 20 66 6f 72 20 |on: wait|ing for |
|00001790| 65 76 65 72 2e 2e 2e 22 | 0a 09 09 77 68 69 6c 65 |ever..."|...while|
|000017a0| 20 74 72 75 65 3b 64 6f | 20 73 6c 65 65 70 20 31 | true;do| sleep 1|
|000017b0| 30 30 3b 64 6f 6e 65 0a | 09 3b 3b 0a 09 22 73 68 |00;done.|.;;.."sh|
|000017c0| 65 6c 6c 22 29 0a 09 09 | 45 63 68 6f 20 22 73 68 |ell")...|Echo "sh|
|000017d0| 65 6c 6c 45 78 63 65 70 | 74 69 6f 6e 3a 20 70 72 |ellExcep|tion: pr|
|000017e0| 6f 76 69 64 69 6e 67 20 | 73 68 65 6c 6c 2e 2e 2e |oviding |shell...|
|000017f0| 22 0a 09 09 73 65 74 63 | 74 73 69 64 20 24 45 4c |"...setc|tsid $EL|
|00001800| 4f 47 5f 45 58 43 45 50 | 54 49 4f 4e 20 2f 62 69 |OG_EXCEP|TION /bi|
|00001810| 6e 2f 62 61 73 68 20 2d | 69 20 7c 7c 20 2f 62 69 |n/bash -|i || /bi|
|00001820| 6e 2f 62 61 73 68 20 2d | 69 0a 09 3b 3b 0a 09 2a |n/bash -|i..;;..*|
|00001830| 29 0a 09 09 45 63 68 6f | 20 22 75 6e 6b 6e 6f 77 |)...Echo| "unknow|
|00001840| 6e 45 78 63 65 70 74 69 | 6f 6e 2e 2e 2e 22 0a 09 |nExcepti|on..."..|
|00001850| 3b 3b 0a 09 65 73 61 63 | 0a 7d 0a 23 3d 3d 3d 3d |;;..esac|.}.#====|
|00001860| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001870| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001880| 3d 3d 0a 23 20 63 6f 70 | 79 44 65 76 69 63 65 73 |==.# cop|yDevices|
|00001890| 0a 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|000018a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000018b0| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 66 75 6e 63 74 69 6f |--------|.functio|
|000018c0| 6e 20 63 6f 70 79 44 65 | 76 69 63 65 4e 6f 64 65 |n copyDe|viceNode|
|000018d0| 73 20 7b 0a 09 6c 6f 63 | 61 6c 20 73 65 61 72 63 |s {..loc|al searc|
|000018e0| 68 3d 24 31 0a 09 6c 6f | 63 61 6c 20 70 72 65 66 |h=$1..lo|cal pref|
|000018f0| 69 78 3d 24 32 0a 09 6c | 6f 63 61 6c 20 64 74 79 |ix=$2..l|ocal dty|
|00001900| 70 65 0a 09 6c 6f 63 61 | 6c 20 6d 61 6a 6f 72 0a |pe..loca|l major.|
|00001910| 09 6c 6f 63 61 6c 20 6d | 69 6e 6f 72 0a 09 6c 6f |.local m|inor..lo|
|00001920| 63 61 6c 20 70 65 72 6d | 73 0a 09 69 66 20 5b 20 |cal perm|s..if [ |
|00001930| 2d 7a 20 22 24 73 65 61 | 72 63 68 22 20 5d 3b 74 |-z "$sea|rch" ];t|
|00001940| 68 65 6e 0a 09 09 73 65 | 61 72 63 68 3d 2f 64 65 |hen...se|arch=/de|
|00001950| 76 0a 09 66 69 0a 09 70 | 75 73 68 64 20 24 73 65 |v..fi..p|ushd $se|
|00001960| 61 72 63 68 20 3e 2f 64 | 65 76 2f 6e 75 6c 6c 0a |arch >/d|ev/null.|
|00001970| 09 66 6f 72 20 69 20 69 | 6e 20 2a 3b 64 6f 0a 09 |.for i i|n *;do..|
|00001980| 09 69 66 20 5b 20 2d 65 | 20 24 70 72 65 66 69 78 |.if [ -e| $prefix|
|00001990| 2f 24 69 20 5d 3b 74 68 | 65 6e 0a 09 09 09 63 6f |/$i ];th|en....co|
|000019a0| 6e 74 69 6e 75 65 0a 09 | 09 66 69 0a 09 09 69 66 |ntinue..|.fi...if|
|000019b0| 20 5b 20 2d 62 20 24 69 | 20 5d 3b 74 68 65 6e 0a | [ -b $i| ];then.|
|000019c0| 09 09 09 64 74 79 70 65 | 3d 62 0a 09 09 65 6c 69 |...dtype|=b...eli|
|000019d0| 66 20 5b 20 2d 63 20 24 | 69 20 5d 3b 74 68 65 6e |f [ -c $|i ];then|
|000019e0| 0a 09 09 09 64 74 79 70 | 65 3d 63 0a 09 09 65 6c |....dtyp|e=c...el|
|000019f0| 69 66 20 5b 20 2d 70 20 | 24 69 20 5d 3b 74 68 65 |if [ -p |$i ];the|
|00001a00| 6e 0a 09 09 09 64 74 79 | 70 65 3d 70 0a 09 09 65 |n....dty|pe=p...e|
|00001a10| 6c 73 65 0a 09 09 09 63 | 6f 6e 74 69 6e 75 65 0a |lse....c|ontinue.|
|00001a20| 09 09 66 69 0a 09 09 69 | 6e 66 6f 3d 60 73 74 61 |..fi...i|nfo=`sta|
|00001a30| 74 20 24 69 20 2d 63 20 | 22 30 25 61 3a 30 78 25 |t $i -c |"0%a:0x%|
|00001a40| 74 3a 30 78 25 54 22 60 | 0a 09 09 6d 61 6a 6f 72 |t:0x%T"`|...major|
|00001a50| 3d 60 65 63 68 6f 20 24 | 69 6e 66 6f 20 7c 20 63 |=`echo $|info | c|
|00001a60| 75 74 20 2d 66 32 20 2d | 64 3a 60 0a 09 09 6d 69 |ut -f2 -|d:`...mi|
|00001a70| 6e 6f 72 3d 60 65 63 68 | 6f 20 24 69 6e 66 6f 20 |nor=`ech|o $info |
|00001a80| 7c 20 63 75 74 20 2d 66 | 33 20 2d 64 3a 60 0a 09 || cut -f|3 -d:`..|
|00001a90| 09 70 65 72 6d 73 3d 60 | 65 63 68 6f 20 24 69 6e |.perms=`|echo $in|
|00001aa0| 66 6f 20 7c 20 63 75 74 | 20 2d 66 31 20 2d 64 3a |fo | cut| -f1 -d:|
|00001ab0| 60 0a 09 09 69 66 20 5b | 20 24 64 74 79 70 65 20 |`...if [| $dtype |
|00001ac0| 3d 20 22 70 22 20 5d 3b | 74 68 65 6e 0a 09 09 09 |= "p" ];|then....|
|00001ad0| 6d 6b 6e 6f 64 20 2d 6d | 20 24 70 65 72 6d 73 20 |mknod -m| $perms |
|00001ae0| 24 70 72 65 66 69 78 2f | 24 69 20 24 64 74 79 70 |$prefix/|$i $dtyp|
|00001af0| 65 0a 09 09 65 6c 73 65 | 0a 09 09 09 6d 6b 6e 6f |e...else|....mkno|
|00001b00| 64 20 2d 6d 20 24 70 65 | 72 6d 73 20 24 70 72 65 |d -m $pe|rms $pre|
|00001b10| 66 69 78 2f 24 69 20 24 | 64 74 79 70 65 20 24 6d |fix/$i $|dtype $m|
|00001b20| 61 6a 6f 72 20 24 6d 69 | 6e 6f 72 0a 09 09 66 69 |ajor $mi|nor...fi|
|00001b30| 0a 09 64 6f 6e 65 0a 09 | 70 6f 70 64 20 3e 2f 64 |..done..|popd >/d|
|00001b40| 65 76 2f 6e 75 6c 6c 0a | 7d 0a 23 3d 3d 3d 3d 3d |ev/null.|}.#=====|
|00001b50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001b60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001b70| 3d 0a 23 20 63 6f 70 79 | 44 65 76 69 63 65 73 0a |=.# copy|Devices.|
|00001b80| 23 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |#-------|--------|
|00001b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ba0| 2d 2d 2d 2d 2d 2d 2d 0a | 66 75 6e 63 74 69 6f 6e |-------.|function|
|00001bb0| 20 63 72 65 61 74 65 49 | 6e 69 74 69 61 6c 44 65 | createI|nitialDe|
|00001bc0| 76 69 63 65 73 20 7b 0a | 09 6c 6f 63 61 6c 20 70 |vices {.|.local p|
|00001bd0| 72 65 66 69 78 3d 24 31 | 0a 09 6d 6b 64 69 72 20 |refix=$1|..mkdir |
|00001be0| 2d 70 20 24 70 72 65 66 | 69 78 0a 09 69 66 20 5b |-p $pref|ix..if [|
|00001bf0| 20 21 20 2d 64 20 24 70 | 72 65 66 69 78 20 5d 3b | ! -d $p|refix ];|
|00001c00| 74 68 65 6e 0a 09 09 72 | 65 74 75 72 6e 0a 09 66 |then...r|eturn..f|
|00001c10| 69 0a 09 69 66 20 5b 20 | 2d 65 20 24 70 72 65 66 |i..if [ |-e $pref|
|00001c20| 69 78 2f 6e 75 6c 6c 20 | 5d 3b 74 68 65 6e 0a 09 |ix/null |];then..|
|00001c30| 09 72 6d 20 2d 66 20 24 | 70 72 65 66 69 78 2f 6e |.rm -f $|prefix/n|
|00001c40| 75 6c 6c 0a 09 66 69 0a | 09 74 65 73 74 20 2d 63 |ull..fi.|.test -c|
|00001c50| 20 24 70 72 65 66 69 78 | 2f 74 74 79 20 20 20 20 | $prefix|/tty |
|00001c60| 20 20 7c 7c 20 6d 6b 6e | 6f 64 20 2d 6d 20 30 36 | || mkn|od -m 06|
|00001c70| 36 36 20 24 70 72 65 66 | 69 78 2f 74 74 79 20 20 |66 $pref|ix/tty |
|00001c80| 20 20 20 20 63 20 35 20 | 30 0a 09 74 65 73 74 20 | c 5 |0..test |
|00001c90| 2d 63 20 24 70 72 65 66 | 69 78 2f 74 74 79 31 20 |-c $pref|ix/tty1 |
|00001ca0| 20 20 20 20 7c 7c 20 6d | 6b 6e 6f 64 20 2d 6d 20 | || m|knod -m |
|00001cb0| 30 36 36 36 20 24 70 72 | 65 66 69 78 2f 74 74 79 |0666 $pr|efix/tty|
|00001cc0| 31 20 20 20 20 20 63 20 | 34 20 31 0a 09 74 65 73 |1 c |4 1..tes|
|00001cd0| 74 20 2d 63 20 24 70 72 | 65 66 69 78 2f 74 74 79 |t -c $pr|efix/tty|
|00001ce0| 32 20 20 20 20 20 7c 7c | 20 6d 6b 6e 6f 64 20 2d |2 ||| mknod -|
|00001cf0| 6d 20 30 36 36 36 20 24 | 70 72 65 66 69 78 2f 74 |m 0666 $|prefix/t|
|00001d00| 74 79 32 20 20 20 20 20 | 63 20 34 20 32 0a 09 74 |ty2 |c 4 2..t|
|00001d10| 65 73 74 20 2d 63 20 24 | 70 72 65 66 69 78 2f 74 |est -c $|prefix/t|
|00001d20| 74 79 33 20 20 20 20 20 | 7c 7c 20 6d 6b 6e 6f 64 |ty3 ||| mknod|
|00001d30| 20 2d 6d 20 30 36 36 36 | 20 24 70 72 65 66 69 78 | -m 0666| $prefix|
|00001d40| 2f 74 74 79 33 20 20 20 | 20 20 63 20 34 20 33 0a |/tty3 | c 4 3.|
|00001d50| 09 74 65 73 74 20 2d 63 | 20 24 70 72 65 66 69 78 |.test -c| $prefix|
|00001d60| 2f 74 74 79 34 20 20 20 | 20 20 7c 7c 20 6d 6b 6e |/tty4 | || mkn|
|00001d70| 6f 64 20 2d 6d 20 30 36 | 36 36 20 24 70 72 65 66 |od -m 06|66 $pref|
|00001d80| 69 78 2f 74 74 79 34 20 | 20 20 20 20 63 20 34 20 |ix/tty4 | c 4 |
|00001d90| 34 0a 09 74 65 73 74 20 | 2d 63 20 24 70 72 65 66 |4..test |-c $pref|
|00001da0| 69 78 2f 63 6f 6e 73 6f | 6c 65 20 20 7c 7c 20 6d |ix/conso|le || m|
|00001db0| 6b 6e 6f 64 20 2d 6d 20 | 30 36 30 30 20 24 70 72 |knod -m |0600 $pr|
|00001dc0| 65 66 69 78 2f 63 6f 6e | 73 6f 6c 65 20 20 63 20 |efix/con|sole c |
|00001dd0| 35 20 31 0a 09 74 65 73 | 74 20 2d 63 20 24 70 72 |5 1..tes|t -c $pr|
|00001de0| 65 66 69 78 2f 70 74 6d | 78 20 20 20 20 20 7c 7c |efix/ptm|x |||
|00001df0| 20 6d 6b 6e 6f 64 20 2d | 6d 20 30 36 36 36 20 24 | mknod -|m 0666 $|
|00001e00| 70 72 65 66 69 78 2f 70 | 74 6d 78 20 20 20 20 20 |prefix/p|tmx |
|00001e10| 63 20 35 20 32 0a 09 65 | 78 65 63 20 3c 20 24 70 |c 5 2..e|xec < $p|
|00001e20| 72 65 66 69 78 2f 63 6f | 6e 73 6f 6c 65 20 3e 20 |refix/co|nsole > |
|00001e30| 24 70 72 65 66 69 78 2f | 63 6f 6e 73 6f 6c 65 0a |$prefix/|console.|
|00001e40| 09 74 65 73 74 20 2d 63 | 20 24 70 72 65 66 69 78 |.test -c| $prefix|
|00001e50| 2f 6e 75 6c 6c 20 20 20 | 20 20 7c 7c 20 6d 6b 6e |/null | || mkn|
|00001e60| 6f 64 20 2d 6d 20 30 36 | 36 36 20 24 70 72 65 66 |od -m 06|66 $pref|
|00001e70| 69 78 2f 6e 75 6c 6c 20 | 20 20 20 20 63 20 31 20 |ix/null | c 1 |
|00001e80| 33 0a 09 74 65 73 74 20 | 2d 63 20 24 70 72 65 66 |3..test |-c $pref|
|00001e90| 69 78 2f 6b 6d 73 67 20 | 20 20 20 20 7c 7c 20 6d |ix/kmsg | || m|
|00001ea0| 6b 6e 6f 64 20 2d 6d 20 | 30 36 30 30 20 24 70 72 |knod -m |0600 $pr|
|00001eb0| 65 66 69 78 2f 6b 6d 73 | 67 20 20 20 20 20 63 20 |efix/kms|g c |
|00001ec0| 31 20 31 31 0a 09 74 65 | 73 74 20 2d 63 20 24 70 |1 11..te|st -c $p|
|00001ed0| 72 65 66 69 78 2f 73 6e | 61 70 73 68 6f 74 20 7c |refix/sn|apshot ||
|00001ee0| 7c 20 6d 6b 6e 6f 64 20 | 2d 6d 20 30 36 36 30 20 || mknod |-m 0660 |
|00001ef0| 24 70 72 65 66 69 78 2f | 73 6e 61 70 73 68 6f 74 |$prefix/|snapshot|
|00001f00| 20 63 20 31 30 20 32 33 | 31 0a 09 74 65 73 74 20 | c 10 23|1..test |
|00001f10| 2d 63 20 24 70 72 65 66 | 69 78 2f 72 61 6e 64 6f |-c $pref|ix/rando|
|00001f20| 6d 20 20 20 7c 7c 20 6d | 6b 6e 6f 64 20 2d 6d 20 |m || m|knod -m |
|00001f30| 30 36 36 36 20 24 70 72 | 65 66 69 78 2f 72 61 6e |0666 $pr|efix/ran|
|00001f40| 64 6f 6d 20 20 20 63 20 | 31 20 38 0a 09 74 65 73 |dom c |1 8..tes|
|00001f50| 74 20 2d 63 20 24 70 72 | 65 66 69 78 2f 75 72 61 |t -c $pr|efix/ura|
|00001f60| 6e 64 6f 6d 20 20 7c 7c | 20 6d 6b 6e 6f 64 20 2d |ndom ||| mknod -|
|00001f70| 6d 20 30 36 34 34 20 24 | 70 72 65 66 69 78 2f 75 |m 0644 $|prefix/u|
|00001f80| 72 61 6e 64 6f 6d 20 20 | 63 20 31 20 39 0a 09 74 |random |c 1 9..t|
|00001f90| 65 73 74 20 2d 62 20 24 | 70 72 65 66 69 78 2f 6c |est -b $|prefix/l|
|00001fa0| 6f 6f 70 30 20 20 20 20 | 7c 7c 20 6d 6b 6e 6f 64 |oop0 ||| mknod|
|00001fb0| 20 2d 6d 20 30 36 34 30 | 20 24 70 72 65 66 69 78 | -m 0640| $prefix|
|00001fc0| 2f 6c 6f 6f 70 30 20 20 | 20 20 62 20 37 20 30 0a |/loop0 | b 7 0.|
|00001fd0| 09 74 65 73 74 20 2d 62 | 20 24 70 72 65 66 69 78 |.test -b| $prefix|
|00001fe0| 2f 6c 6f 6f 70 31 20 20 | 20 20 7c 7c 20 6d 6b 6e |/loop1 | || mkn|
|00001ff0| 6f 64 20 2d 6d 20 30 36 | 34 30 20 24 70 72 65 66 |od -m 06|40 $pref|
|00002000| 69 78 2f 6c 6f 6f 70 31 | 20 20 20 20 62 20 37 20 |ix/loop1| b 7 |
|00002010| 31 0a 09 74 65 73 74 20 | 2d 62 20 24 70 72 65 66 |1..test |-b $pref|
|00002020| 69 78 2f 6c 6f 6f 70 32 | 20 20 20 20 7c 7c 20 6d |ix/loop2| || m|
|00002030| 6b 6e 6f 64 20 2d 6d 20 | 30 36 34 30 20 24 70 72 |knod -m |0640 $pr|
|00002040| 65 66 69 78 2f 6c 6f 6f | 70 32 20 20 20 20 62 20 |efix/loo|p2 b |
|00002050| 37 20 32 0a 09 6d 6b 64 | 69 72 20 2d 70 20 2d 6d |7 2..mkd|ir -p -m|
|00002060| 20 30 37 35 35 20 24 70 | 72 65 66 69 78 2f 70 74 | 0755 $p|refix/pt|
|00002070| 73 0a 09 6d 6b 64 69 72 | 20 2d 70 20 2d 6d 20 31 |s..mkdir| -p -m 1|
|00002080| 37 37 37 20 24 70 72 65 | 66 69 78 2f 73 68 6d 0a |777 $pre|fix/shm.|
|00002090| 09 74 65 73 74 20 2d 4c | 20 24 70 72 65 66 69 78 |.test -L| $prefix|
|000020a0| 2f 66 64 20 20 20 20 20 | 7c 7c 20 6c 6e 20 2d 73 |/fd ||| ln -s|
|000020b0| 20 2f 70 72 6f 63 2f 73 | 65 6c 66 2f 66 64 20 24 | /proc/s|elf/fd $|
|000020c0| 70 72 65 66 69 78 2f 66 | 64 0a 09 74 65 73 74 20 |prefix/f|d..test |
|000020d0| 2d 4c 20 24 70 72 65 66 | 69 78 2f 73 74 64 69 6e |-L $pref|ix/stdin|
|000020e0| 20 20 7c 7c 20 6c 6e 20 | 2d 73 20 66 64 2f 30 20 | || ln |-s fd/0 |
|000020f0| 24 70 72 65 66 69 78 2f | 73 74 64 69 6e 0a 09 74 |$prefix/|stdin..t|
|00002100| 65 73 74 20 2d 4c 20 24 | 70 72 65 66 69 78 2f 73 |est -L $|prefix/s|
|00002110| 74 64 6f 75 74 20 7c 7c | 20 6c 6e 20 2d 73 20 66 |tdout ||| ln -s f|
|00002120| 64 2f 31 20 24 70 72 65 | 66 69 78 2f 73 74 64 6f |d/1 $pre|fix/stdo|
|00002130| 75 74 0a 09 74 65 73 74 | 20 2d 4c 20 24 70 72 65 |ut..test| -L $pre|
|00002140| 66 69 78 2f 73 74 64 65 | 72 72 20 7c 7c 20 6c 6e |fix/stde|rr || ln|
|00002150| 20 2d 73 20 66 64 2f 32 | 20 24 70 72 65 66 69 78 | -s fd/2| $prefix|
|00002160| 2f 73 74 64 65 72 72 0a | 7d 0a 23 3d 3d 3d 3d 3d |/stderr.|}.#=====|
|00002170| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002180| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002190| 3d 0a 23 20 6d 6f 75 6e | 74 53 79 73 74 65 6d 46 |=.# moun|tSystemF|
|000021a0| 69 6c 65 73 79 73 74 65 | 6d 73 0a 23 2d 2d 2d 2d |ilesyste|ms.#----|
|000021b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000021c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000021d0| 2d 2d 0a 66 75 6e 63 74 | 69 6f 6e 20 6d 6f 75 6e |--.funct|ion moun|
|000021e0| 74 53 79 73 74 65 6d 46 | 69 6c 65 73 79 73 74 65 |tSystemF|ilesyste|
|000021f0| 6d 73 20 7b 0a 09 6d 6f | 75 6e 74 20 2d 74 20 70 |ms {..mo|unt -t p|
|00002200| 72 6f 63 20 20 70 72 6f | 63 20 20 20 2f 70 72 6f |roc pro|c /pro|
|00002210| 63 0a 09 6d 6f 75 6e 74 | 20 2d 74 20 73 79 73 66 |c..mount| -t sysf|
|00002220| 73 20 73 79 73 66 73 20 | 20 2f 73 79 73 0a 09 6d |s sysfs | /sys..m|
|00002230| 6f 75 6e 74 20 2d 74 20 | 74 6d 70 66 73 20 2d 6f |ount -t |tmpfs -o|
|00002240| 20 6d 6f 64 65 3d 30 37 | 35 35 20 75 64 65 76 20 | mode=07|55 udev |
|00002250| 2f 64 65 76 0a 09 63 72 | 65 61 74 65 49 6e 69 74 |/dev..cr|eateInit|
|00002260| 69 61 6c 44 65 76 69 63 | 65 73 20 2f 64 65 76 0a |ialDevic|es /dev.|
|00002270| 09 6d 6f 75 6e 74 20 2d | 74 20 64 65 76 70 74 73 |.mount -|t devpts|
|00002280| 20 64 65 76 70 74 73 20 | 2f 64 65 76 2f 70 74 73 | devpts |/dev/pts|
|00002290| 0a 7d 0a 23 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.}.#====|========|
|000022a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000022b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 23 20 75 6d 6f |========|==.# umo|
|000022c0| 75 6e 74 53 79 73 74 65 | 6d 46 69 6c 65 73 79 73 |untSyste|mFilesys|
|000022d0| 74 65 6d 73 0a 23 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |tems.#--|--------|
|000022e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 66 75 6e |--------|----.fun|
|00002300| 63 74 69 6f 6e 20 75 6d | 6f 75 6e 74 53 79 73 74 |ction um|ountSyst|
|00002310| 65 6d 46 69 6c 65 73 79 | 73 74 65 6d 73 20 7b 0a |emFilesy|stems {.|
|00002320| 09 75 6d 6f 75 6e 74 20 | 2f 64 65 76 2f 70 74 73 |.umount |/dev/pts|
|00002330| 20 3e 2f 64 65 76 2f 6e | 75 6c 6c 0a 09 75 6d 6f | >/dev/n|ull..umo|
|00002340| 75 6e 74 20 2f 73 79 73 | 20 20 20 20 20 3e 2f 64 |unt /sys| >/d|
|00002350| 65 76 2f 6e 75 6c 6c 0a | 09 75 6d 6f 75 6e 74 20 |ev/null.|.umount |
|00002360| 2f 70 72 6f 63 20 20 20 | 20 3e 2f 64 65 76 2f 6e |/proc | >/dev/n|
|00002370| 75 6c 6c 0a 7d 0a 23 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ull.}.#=|========|
|00002380| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002390| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 23 20 |========|=====.# |
|000023a0| 63 72 65 61 74 65 46 72 | 61 6d 65 62 75 66 66 65 |createFr|amebuffe|
|000023b0| 72 44 65 76 69 63 65 73 | 0a 23 2d 2d 2d 2d 2d 2d |rDevices|.#------|
|000023c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023e0| 0a 66 75 6e 63 74 69 6f | 6e 20 63 72 65 61 74 65 |.functio|n create|
|000023f0| 46 72 61 6d 65 62 75 66 | 66 65 72 44 65 76 69 63 |Framebuf|ferDevic|
|00002400| 65 73 20 7b 0a 09 69 66 | 20 5b 20 2d 66 20 2f 70 |es {..if| [ -f /p|
|00002410| 72 6f 63 2f 66 62 20 5d | 3b 20 74 68 65 6e 0a 09 |roc/fb ]|; then..|
|00002420| 09 45 63 68 6f 20 22 43 | 72 65 61 74 69 6e 67 20 |.Echo "C|reating |
|00002430| 66 72 61 6d 65 62 75 66 | 66 65 72 20 64 65 76 69 |framebuf|fer devi|
|00002440| 63 65 73 22 0a 09 09 77 | 68 69 6c 65 20 72 65 61 |ces"...w|hile rea|
|00002450| 64 20 66 62 6e 75 6d 20 | 66 62 74 79 70 65 3b 20 |d fbnum |fbtype; |
|00002460| 64 6f 0a 09 09 09 69 66 | 20 5b 20 24 28 28 24 66 |do....if| [ $(($f|
|00002470| 62 6e 75 6d 20 3c 20 33 | 32 29 29 20 5d 20 3b 20 |bnum < 3|2)) ] ; |
|00002480| 74 68 65 6e 0a 09 09 09 | 09 5b 20 2d 63 20 2f 64 |then....|.[ -c /d|
|00002490| 65 76 2f 66 62 24 66 62 | 6e 75 6d 20 5d 20 7c 7c |ev/fb$fb|num ] |||
|000024a0| 20 6d 6b 6e 6f 64 20 2d | 6d 20 30 36 36 30 20 2f | mknod -|m 0660 /|
|000024b0| 64 65 76 2f 66 62 24 66 | 62 6e 75 6d 20 63 20 32 |dev/fb$f|bnum c 2|
|000024c0| 39 20 24 66 62 6e 75 6d | 0a 09 09 09 66 69 0a 09 |9 $fbnum|....fi..|
|000024d0| 09 64 6f 6e 65 20 3c 20 | 2f 70 72 6f 63 2f 66 62 |.done < |/proc/fb|
|000024e0| 0a 09 66 69 0a 7d 0a 23 | 3d 3d 3d 3d 3d 3d 3d 3d |..fi.}.#|========|
|000024f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002500| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 23 |========|======.#|
|00002510| 20 65 72 72 6f 72 4c 6f | 67 53 74 6f 70 0a 23 2d | errorLo|gStop.#-|
|00002520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002540| 2d 2d 2d 2d 2d 0a 66 75 | 6e 63 74 69 6f 6e 20 65 |-----.fu|nction e|
|00002550| 72 72 6f 72 4c 6f 67 53 | 74 6f 70 20 7b 0a 09 73 |rrorLogS|top {..s|
|00002560| 65 74 20 2b 78 0a 09 65 | 78 70 6f 72 74 20 45 4c |et +x..e|xport EL|
|00002570| 4f 47 5f 53 54 4f 50 50 | 45 44 3d 31 0a 09 65 78 |OG_STOPP|ED=1..ex|
|00002580| 65 63 20 32 3e 24 45 4c | 4f 47 5f 45 58 43 45 50 |ec 2>$EL|OG_EXCEP|
|00002590| 54 49 4f 4e 0a 7d 0a 23 | 3d 3d 3d 3d 3d 3d 3d 3d |TION.}.#|========|
|000025a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000025b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 23 |========|======.#|
|000025c0| 20 65 72 72 6f 72 4c 6f | 67 43 6f 6e 74 69 6e 75 | errorLo|gContinu|
|000025d0| 65 0a 23 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |e.#-----|--------|
|000025e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000025f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 66 75 6e 63 74 69 |--------|-.functi|
|00002600| 6f 6e 20 65 72 72 6f 72 | 4c 6f 67 43 6f 6e 74 69 |on error|LogConti|
|00002610| 6e 75 65 20 7b 0a 09 65 | 78 65 63 20 32 3e 3e 24 |nue {..e|xec 2>>$|
|00002620| 45 4c 4f 47 5f 46 49 4c | 45 0a 09 65 78 70 6f 72 |ELOG_FIL|E..expor|
|00002630| 74 20 45 4c 4f 47 5f 53 | 54 4f 50 50 45 44 3d 30 |t ELOG_S|TOPPED=0|
|00002640| 0a 09 73 65 74 20 2d 78 | 0a 7d 0a 23 3d 3d 3d 3d |..set -x|.}.#====|
|00002650| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002660| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002670| 3d 3d 0a 23 20 65 72 72 | 6f 72 4c 6f 67 53 74 61 |==.# err|orLogSta|
|00002680| 72 74 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |rt.#----|--------|
|00002690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 66 75 6e 63 74 |--------|--.funct|
|000026b0| 69 6f 6e 20 65 72 72 6f | 72 4c 6f 67 53 74 61 72 |ion erro|rLogStar|
|000026c0| 74 20 7b 0a 09 23 20 2f | 2e 2e 2e 2f 0a 09 23 20 |t {..# /|.../..# |
|000026d0| 4c 6f 67 20 61 6c 6c 20 | 65 72 72 6f 72 73 20 75 |Log all |errors u|
|000026e0| 70 20 74 6f 20 6e 6f 77 | 20 74 6f 20 74 68 65 20 |p to now| to the |
|000026f0| 74 65 72 6d 69 6e 61 6c | 20 73 70 65 63 69 66 69 |terminal| specifi|
|00002700| 65 64 0a 09 23 20 62 79 | 20 45 4c 4f 47 5f 43 4f |ed..# by| ELOG_CO|
|00002710| 4e 53 4f 4c 45 0a 09 23 | 20 2d 2d 2d 2d 0a 09 69 |NSOLE..#| ----..i|
|00002720| 66 20 5b 20 21 20 2d 66 | 20 24 45 4c 4f 47 5f 46 |f [ ! -f| $ELOG_F|
|00002730| 49 4c 45 20 5d 3b 74 68 | 65 6e 0a 09 09 65 63 68 |ILE ];th|en...ech|
|00002740| 6f 20 22 4b 49 57 49 20 | 4c 6f 67 3a 22 20 3e 3e |o "KIWI |Log:" >>|
|00002750| 20 24 45 4c 4f 47 5f 46 | 49 4c 45 0a 09 65 6c 73 | $ELOG_F|ILE..els|
|00002760| 65 0a 09 09 6b 69 6c 6c | 70 72 6f 63 20 74 61 69 |e...kill|proc tai|
|00002770| 6c 0a 09 09 65 63 68 6f | 20 22 4b 49 57 49 20 50 |l...echo| "KIWI P|
|00002780| 72 65 49 6e 69 74 20 4c | 6f 67 22 20 3e 3e 20 24 |reInit L|og" >> $|
|00002790| 45 4c 4f 47 5f 46 49 4c | 45 0a 09 66 69 0a 09 65 |ELOG_FIL|E..fi..e|
|000027a0| 63 68 6f 20 22 42 6f 6f | 74 2d 4c 6f 67 67 69 6e |cho "Boo|t-Loggin|
|000027b0| 67 20 65 6e 61 62 6c 65 | 64 20 6f 6e 20 24 45 4c |g enable|d on $EL|
|000027c0| 4f 47 5f 43 4f 4e 53 4f | 4c 45 22 0a 09 73 65 74 |OG_CONSO|LE"..set|
|000027d0| 63 74 73 69 64 20 2d 66 | 20 24 45 4c 4f 47 5f 43 |ctsid -f| $ELOG_C|
|000027e0| 4f 4e 53 4f 4c 45 20 2f | 62 69 6e 2f 62 61 73 68 |ONSOLE /|bin/bash|
|000027f0| 20 2d 69 20 2d 63 20 22 | 74 61 69 6c 20 2d 66 20 | -i -c "|tail -f |
|00002800| 24 45 4c 4f 47 5f 46 49 | 4c 45 22 20 26 0a 09 65 |$ELOG_FI|LE" &..e|
|00002810| 78 65 63 20 32 3e 3e 24 | 45 4c 4f 47 5f 46 49 4c |xec 2>>$|ELOG_FIL|
|00002820| 45 0a 09 69 66 20 5b 20 | 2d 66 20 2e 70 72 6f 66 |E..if [ |-f .prof|
|00002830| 69 6c 65 20 5d 3b 74 68 | 65 6e 0a 09 09 65 63 68 |ile ];th|en...ech|
|00002840| 6f 20 22 4b 49 57 49 20 | 2e 70 72 6f 66 69 6c 65 |o "KIWI |.profile|
|00002850| 20 63 6f 6e 74 65 6e 74 | 73 3a 22 20 31 3e 26 32 | content|s:" 1>&2|
|00002860| 0a 09 09 63 61 74 20 2e | 70 72 6f 66 69 6c 65 20 |...cat .|profile |
|00002870| 31 3e 26 32 0a 09 66 69 | 0a 09 73 65 74 20 2d 78 |1>&2..fi|..set -x|
|00002880| 20 31 3e 26 32 0a 7d 0a | 23 3d 3d 3d 3d 3d 3d 3d | 1>&2.}.|#=======|
|00002890| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000028a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a |========|=======.|
|000028b0| 23 20 75 64 65 76 50 65 | 6e 64 69 6e 67 0a 23 2d |# udevPe|nding.#-|
|000028c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028e0| 2d 2d 2d 2d 2d 0a 66 75 | 6e 63 74 69 6f 6e 20 75 |-----.fu|nction u|
|000028f0| 64 65 76 50 65 6e 64 69 | 6e 67 20 7b 0a 09 6c 6f |devPendi|ng {..lo|
|00002900| 63 61 6c 20 74 69 6d 65 | 6f 75 74 3d 33 30 0a 09 |cal time|out=30..|
|00002910| 69 66 20 5b 20 2d 78 20 | 2f 73 62 69 6e 2f 75 64 |if [ -x |/sbin/ud|
|00002920| 65 76 61 64 6d 20 5d 3b | 74 68 65 6e 0a 09 09 2f |evadm ];|then.../|
|00002930| 73 62 69 6e 2f 75 64 65 | 76 61 64 6d 20 74 72 69 |sbin/ude|vadm tri|
|00002940| 67 67 65 72 0a 09 09 2f | 73 62 69 6e 2f 75 64 65 |gger.../|sbin/ude|
|00002950| 76 61 64 6d 20 73 65 74 | 74 6c 65 20 2d 2d 74 69 |vadm set|tle --ti|
|00002960| 6d 65 6f 75 74 3d 24 74 | 69 6d 65 6f 75 74 0a 09 |meout=$t|imeout..|
|00002970| 65 6c 73 65 0a 09 09 2f | 73 62 69 6e 2f 75 64 65 |else.../|sbin/ude|
|00002980| 76 74 72 69 67 67 65 72 | 0a 09 09 2f 73 62 69 6e |vtrigger|.../sbin|
|00002990| 2f 75 64 65 76 73 65 74 | 74 6c 65 20 2d 2d 74 69 |/udevset|tle --ti|
|000029a0| 6d 65 6f 75 74 3d 24 74 | 69 6d 65 6f 75 74 0a 09 |meout=$t|imeout..|
|000029b0| 66 69 0a 7d 0a 23 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |fi.}.#==|========|
|000029c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000029d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 23 20 75 |========|====.# u|
|000029e0| 64 65 76 53 79 73 74 65 | 6d 53 74 61 72 74 0a 23 |devSyste|mStart.#|
|000029f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a10| 2d 2d 2d 2d 2d 2d 0a 66 | 75 6e 63 74 69 6f 6e 20 |------.f|unction |
|00002a20| 75 64 65 76 53 79 73 74 | 65 6d 53 74 61 72 74 20 |udevSyst|emStart |
|00002a30| 7b 0a 09 23 20 2f 2e 2e | 2e 2f 0a 09 23 20 73 74 |{..# /..|./..# st|
|00002a40| 61 72 74 20 75 64 65 76 | 20 77 68 69 6c 65 20 69 |art udev| while i|
|00002a50| 6e 20 70 72 65 2d 69 6e | 69 74 20 70 68 61 73 65 |n pre-in|it phase|
|00002a60| 2e 20 54 68 69 73 20 6d | 65 61 6e 73 20 77 65 20 |. This m|eans we |
|00002a70| 63 61 6e 0a 09 23 20 72 | 75 6e 20 75 64 65 76 20 |can..# r|un udev |
|00002a80| 66 72 6f 6d 20 74 68 65 | 20 73 74 61 6e 64 61 72 |from the| standar|
|00002a90| 64 20 72 75 6e 6c 65 76 | 65 6c 20 73 63 72 69 70 |d runlev|el scrip|
|00002aa0| 74 0a 09 23 20 2d 2d 2d | 2d 0a 09 2f 65 74 63 2f |t..# ---|-../etc/|
|00002ab0| 69 6e 69 74 2e 64 2f 62 | 6f 6f 74 2e 75 64 65 76 |init.d/b|oot.udev|
|00002ac0| 20 73 74 61 72 74 0a 09 | 65 63 68 6f 0a 7d 0a 23 | start..|echo.}.#|
|00002ad0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002ae0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002af0| 3d 3d 3d 3d 3d 3d 0a 23 | 20 75 64 65 76 53 74 61 |======.#| udevSta|
|00002b00| 72 74 0a 23 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |rt.#----|--------|
|00002b10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002b20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0a 66 75 6e 63 74 |--------|--.funct|
|00002b30| 69 6f 6e 20 75 64 65 76 | 53 74 61 72 74 20 7b 0a |ion udev|Start {.|
|00002b40| 09 23 20 2f 2e 2e 2e 2f | 0a 09 23 20 73 74 61 72 |.# /.../|..# star|
|00002b50| 74 20 74 68 65 20 75 64 | 65 76 20 64 61 65 6d 6f |t the ud|ev daemo|
|00002b60| 6e 2e 0a 09 23 20 2d 2d | 2d 2d 0a 09 65 63 68 6f |n...# --|--..echo|
|00002b70| 20 22 43 72 65 61 74 69 | 6e 67 20 64 65 76 69 63 | "Creati|ng devic|
|00002b80| 65 20 6e 6f 64 65 73 20 | 77 69 74 68 20 75 64 65 |e nodes |with ude|
|00002b90| 76 22 0a 09 23 20 64 69 | 73 61 62 6c 65 20 68 6f |v"..# di|sable ho|
|00002ba0| 74 70 6c 75 67 20 68 65 | 6c 70 65 72 2c 20 75 64 |tplug he|lper, ud|
|00002bb0| 65 76 64 20 6c 69 73 74 | 65 6e 73 20 74 6f 20 6e |evd list|ens to n|
|00002bc0| 65 74 6c 69 6e 6b 0a 09 | 69 66 20 5b 20 2d 65 20 |etlink..|if [ -e |
|00002bd0| 2f 70 72 6f 63 2f 73 79 | 73 2f 6b 65 72 6e 65 6c |/proc/sy|s/kernel|
|00002be0| 2f 68 6f 74 70 6c 75 67 | 20 5d 3b 74 68 65 6e 0a |/hotplug| ];then.|
|00002bf0| 09 09 65 63 68 6f 20 22 | 22 20 3e 20 2f 70 72 6f |..echo "|" > /pro|
|00002c00| 63 2f 73 79 73 2f 6b 65 | 72 6e 65 6c 2f 68 6f 74 |c/sys/ke|rnel/hot|
|00002c10| 70 6c 75 67 0a 09 66 69 | 0a 09 69 66 20 21 20 6c |plug..fi|..if ! l|
|00002c20| 73 20 2f 6c 69 62 2f 6d | 6f 64 75 6c 65 73 2f 2a |s /lib/m|odules/*|
|00002c30| 2f 6d 6f 64 75 6c 65 73 | 2e 6f 72 64 65 72 20 26 |/modules|.order &|
|00002c40| 3e 2f 64 65 76 2f 6e 75 | 6c 6c 3b 74 68 65 6e 0a |>/dev/nu|ll;then.|
|00002c50| 09 09 23 20 2f 2e 2e 2e | 2f 0a 09 09 23 20 77 69 |..# /...|/...# wi|
|00002c60| 74 68 6f 75 74 20 6d 6f | 64 75 6c 65 73 2e 6f 72 |thout mo|dules.or|
|00002c70| 64 65 72 20 69 6e 20 70 | 6c 61 63 65 20 77 65 20 |der in p|lace we |
|00002c80| 70 72 65 76 65 6e 74 20 | 75 64 65 76 20 66 72 6f |prevent |udev fro|
|00002c90| 6d 20 6c 6f 61 64 69 6e | 67 0a 09 09 23 20 74 68 |m loadin|g...# th|
|00002ca0| 65 20 73 74 6f 72 61 67 | 65 20 6d 6f 64 75 6c 65 |e storag|e module|
|00002cb0| 73 20 62 65 63 61 75 73 | 65 20 69 74 20 64 6f 65 |s becaus|e it doe|
|00002cc0| 73 20 6e 6f 74 20 6d 61 | 6b 65 20 61 20 70 72 6f |s not ma|ke a pro|
|00002cd0| 70 70 65 72 0a 09 09 23 | 20 63 68 6f 69 63 65 20 |pper...#| choice |
|00002ce0| 69 66 20 74 68 65 72 65 | 20 61 72 65 20 6d 75 6c |if there| are mul|
|00002cf0| 74 69 70 6c 65 20 70 6f | 73 73 69 62 6c 65 20 6d |tiple po|ssible m|
|00002d00| 6f 64 75 6c 65 73 20 61 | 76 61 69 6c 61 62 6c 65 |odules a|vailable|
|00002d10| 2e 0a 09 09 23 20 45 78 | 61 6d 70 6c 65 3a 0a 09 |....# Ex|ample:..|
|00002d20| 09 23 20 75 64 65 76 20 | 70 72 65 66 65 72 73 20 |.# udev |prefers |
|00002d30| 61 74 61 5f 67 65 6e 65 | 72 69 63 20 6f 76 65 72 |ata_gene|ric over|
|00002d40| 20 61 74 61 5f 70 69 69 | 78 20 62 75 74 20 74 68 | ata_pii|x but th|
|00002d50| 65 20 68 77 69 6e 66 6f | 0a 09 09 23 20 6f 72 64 |e hwinfo|...# ord|
|00002d60| 65 72 20 69 73 20 61 74 | 61 5f 70 69 69 78 20 66 |er is at|a_piix f|
|00002d70| 69 72 73 74 20 77 68 69 | 63 68 20 61 6c 73 6f 20 |irst whi|ch also |
|00002d80| 73 65 65 6d 73 20 74 6f | 20 6d 61 6b 65 20 6d 6f |seems to| make mo|
|00002d90| 72 65 0a 09 09 23 20 73 | 65 6e 73 65 2e 0a 09 09 |re...# s|ense....|
|00002da0| 23 20 2d 2d 2d 2d 2d 0a | 09 09 72 6d 20 2d 66 20 |# -----.|..rm -f |
|00002db0| 2f 65 74 63 2f 75 64 65 | 76 2f 72 75 6c 65 73 2e |/etc/ude|v/rules.|
|00002dc0| 64 2f 2a 2d 64 72 69 76 | 65 72 73 2e 72 75 6c 65 |d/*-driv|ers.rule|
|00002dd0| 73 0a 09 09 72 6d 20 2d | 66 20 2f 6c 69 62 2f 75 |s...rm -|f /lib/u|
|00002de0| 64 65 76 2f 72 75 6c 65 | 73 2e 64 2f 2a 2d 64 72 |dev/rule|s.d/*-dr|
|00002df0| 69 76 65 72 73 2e 72 75 | 6c 65 73 0a 09 09 48 41 |ivers.ru|les...HA|
|00002e00| 56 45 5f 4d 4f 44 55 4c | 45 53 5f 4f 52 44 45 52 |VE_MODUL|ES_ORDER|
|00002e10| 3d 30 0a 09 66 69 0a 09 | 23 20 73 74 61 72 74 20 |=0..fi..|# start |
|00002e20| 74 68 65 20 75 64 65 76 | 20 64 61 65 6d 6f 6e 0a |the udev| daemon.|
|00002e30| 09 75 64 65 76 64 20 2d | 2d 64 61 65 6d 6f 6e 20 |.udevd -|-daemon |
|00002e40| 75 64 65 76 5f 6c 6f 67 | 3d 22 64 65 62 75 67 22 |udev_log|="debug"|
|00002e50| 0a 09 23 20 77 61 69 74 | 20 66 6f 72 20 70 65 6e |..# wait| for pen|
|00002e60| 64 69 6e 67 20 74 72 69 | 67 67 65 72 65 64 20 75 |ding tri|ggered u|
|00002e70| 64 65 76 20 65 76 65 6e | 74 73 2e 0a 09 75 64 65 |dev even|ts...ude|
|00002e80| 76 50 65 6e 64 69 6e 67 | 0a 09 23 20 73 74 61 72 |vPending|..# star|
|00002e90| 74 20 73 70 6c 61 73 68 | 79 20 69 66 20 63 6f 6e |t splash|y if con|
|00002ea0| 66 69 67 75 72 65 64 0a | 09 73 74 61 72 74 53 70 |figured.|.startSp|
|00002eb0| 6c 61 73 68 79 0a 7d 0a | 23 3d 3d 3d 3d 3d 3d 3d |lashy.}.|#=======|
|00002ec0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002ed0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a |========|=======.|
|00002ee0| 23 20 75 64 65 76 4b 69 | 6c 6c 0a 23 2d 2d 2d 2d |# udevKi|ll.#----|
|00002ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f10| 2d 2d 0a 66 75 6e 63 74 | 69 6f 6e 20 75 64 65 76 |--.funct|ion udev|
|00002f20| 4b 69 6c 6c 20 7b 0a 09 | 6b 69 6c 6c 70 72 6f 63 |Kill {..|killproc|
|00002f30| 20 2f 73 62 69 6e 2f 75 | 64 65 76 64 0a 7d 0a 23 | /sbin/u|devd.}.#|
|00002f40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002f50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002f60| 3d 3d 3d 3d 3d 3d 0a 23 | 20 73 74 61 72 74 53 70 |======.#| startSp|
|00002f70| 6c 61 73 68 79 0a 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |lashy.#-|--------|
|00002f80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 66 75 |--------|-----.fu|
|00002fa0| 6e 63 74 69 6f 6e 20 73 | 74 61 72 74 53 70 6c 61 |nction s|tartSpla|
|00002fb0| 73 68 79 20 7b 0a 09 69 | 66 20 5b 20 2d 78 20 2f |shy {..i|f [ -x /|
|00002fc0| 75 73 72 2f 73 62 69 6e | 2f 73 70 6c 61 73 68 79 |usr/sbin|/splashy|
|00002fd0| 20 5d 3b 74 68 65 6e 0a | 09 09 73 70 6c 61 73 68 | ];then.|..splash|
|00002fe0| 79 20 62 6f 6f 74 0a 09 | 66 69 0a 7d 0a 23 3d 3d |y boot..|fi.}.#==|
|00002ff0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003000| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003010| 3d 3d 3d 3d 0a 23 20 73 | 74 61 72 74 42 6c 6f 67 |====.# s|tartBlog|
|00003020| 44 0a 23 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |D.#-----|--------|
|00003030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 66 75 6e 63 74 69 |--------|-.functi|
|00003050| 6f 6e 20 73 74 61 72 74 | 42 6c 6f 67 44 20 7b 0a |on start|BlogD {.|
|00003060| 09 52 45 44 49 52 45 43 | 54 3d 24 28 73 68 6f 77 |.REDIREC|T=$(show|
|00003070| 63 6f 6e 73 6f 6c 65 20 | 32 3e 2f 64 65 76 2f 6e |console |2>/dev/n|
|00003080| 75 6c 6c 29 0a 09 69 66 | 20 74 65 73 74 20 2d 6e |ull)..if| test -n|
|00003090| 20 22 24 52 45 44 49 52 | 45 43 54 22 20 3b 20 74 | "$REDIR|ECT" ; t|
|000030a0| 68 65 6e 0a 09 09 6d 6b | 64 69 72 20 2d 70 20 2f |hen...mk|dir -p /|
|000030b0| 76 61 72 2f 6c 6f 67 0a | 09 09 3e 20 2f 64 65 76 |var/log.|..> /dev|
|000030c0| 2f 73 68 6d 2f 69 6e 69 | 74 72 64 2e 6d 73 67 0a |/shm/ini|trd.msg.|
|000030d0| 09 09 6c 6e 20 2d 73 66 | 20 2f 64 65 76 2f 73 68 |..ln -sf| /dev/sh|
|000030e0| 6d 2f 69 6e 69 74 72 64 | 2e 6d 73 67 20 2f 76 61 |m/initrd|.msg /va|
|000030f0| 72 2f 6c 6f 67 2f 62 6f | 6f 74 2e 6d 73 67 0a 09 |r/log/bo|ot.msg..|
|00003100| 09 6d 6b 64 69 72 20 2d | 70 20 2f 76 61 72 2f 72 |.mkdir -|p /var/r|
|00003110| 75 6e 0a 09 09 2f 73 62 | 69 6e 2f 62 6c 6f 67 64 |un.../sb|in/blogd|
|00003120| 20 24 52 45 44 49 52 45 | 43 54 0a 09 66 69 0a 7d | $REDIRE|CT..fi.}|
|00003130| 0a 23 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.#======|========|
|00003140| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003150| 3d 3d 3d 3d 3d 3d 3d 3d | 0a 23 20 6b 69 6c 6c 42 |========|.# killB|
|00003160| 6c 6f 67 44 0a 23 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |logD.#--|--------|
|00003170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 66 75 6e |--------|----.fun|
|00003190| 63 74 69 6f 6e 20 6b 69 | 6c 6c 42 6c 6f 67 44 20 |ction ki|llBlogD |
|000031a0| 7b 0a 09 23 20 2f 2e 2e | 2e 2f 0a 09 23 20 6b 69 |{..# /..|./..# ki|
|000031b0| 6c 6c 20 62 6c 6f 67 64 | 20 6f 6e 20 2f 64 65 76 |ll blogd| on /dev|
|000031c0| 2f 63 6f 6e 73 6f 6c 65 | 0a 09 23 20 2d 2d 2d 2d |/console|..# ----|
|000031d0| 0a 09 6c 6f 63 61 6c 20 | 75 6d 6f 75 6e 74 50 72 |..local |umountPr|
|000031e0| 6f 63 3d 30 0a 09 69 66 | 20 5b 20 21 20 2d 65 20 |oc=0..if| [ ! -e |
|000031f0| 2f 70 72 6f 63 2f 6d 6f | 75 6e 74 73 20 5d 3b 74 |/proc/mo|unts ];t|
|00003200| 68 65 6e 0a 09 09 6d 6f | 75 6e 74 20 2d 74 20 70 |hen...mo|unt -t p|
|00003210| 72 6f 63 20 70 72 6f 63 | 20 2f 70 72 6f 63 0a 09 |roc proc| /proc..|
|00003220| 09 75 6d 6f 75 6e 74 50 | 72 6f 63 3d 31 0a 09 66 |.umountP|roc=1..f|
|00003230| 69 0a 09 45 63 68 6f 20 | 22 53 74 6f 70 70 69 6e |i..Echo |"Stoppin|
|00003240| 67 20 62 6f 6f 74 20 6c | 6f 67 67 69 6e 67 22 0a |g boot l|ogging".|
|00003250| 09 6b 69 6c 6c 61 6c 6c | 20 2d 39 20 62 6c 6f 67 |.killall| -9 blog|
|00003260| 64 0a 09 69 66 20 5b 20 | 24 75 6d 6f 75 6e 74 50 |d..if [ |$umountP|
|00003270| 72 6f 63 20 2d 65 71 20 | 31 20 5d 3b 74 68 65 6e |roc -eq |1 ];then|
|00003280| 0a 09 09 75 6d 6f 75 6e | 74 20 2f 70 72 6f 63 0a |...umoun|t /proc.|
|00003290| 09 66 69 0a 7d 0a 23 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.fi.}.#=|========|
|000032a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000032b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 23 20 |========|=====.# |
|000032c0| 69 6e 73 74 61 6c 6c 42 | 6f 6f 74 4c 6f 61 64 65 |installB|ootLoade|
|000032d0| 72 0a 23 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |r.#-----|--------|
|000032e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000032f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0a 66 75 6e 63 74 69 |--------|-.functi|
|00003300| 6f 6e 20 69 6e 73 74 61 | 6c 6c 42 6f 6f 74 4c 6f |on insta|llBootLo|
|00003310| 61 64 65 72 20 7b 0a 09 | 23 20 2f 2e 2e 2e 2f 0a |ader {..|# /.../.|
|00003320| 09 23 20 67 65 6e 65 72 | 69 63 20 66 75 6e 63 74 |.# gener|ic funct|
|00003330| 69 6f 6e 20 74 6f 20 69 | 6e 73 74 61 6c 6c 20 74 |ion to i|nstall t|
|00003340| 68 65 20 62 6f 6f 74 20 | 6c 6f 61 64 65 72 2e 0a |he boot |loader..|
|00003350| 09 23 20 54 68 65 20 73 | 65 6c 65 63 74 69 6f 6e |.# The s|election|
|00003360| 20 6f 66 20 74 68 65 20 | 62 6f 6f 74 6c 6f 61 64 | of the |bootload|
|00003370| 65 72 20 68 61 70 70 65 | 6e 73 20 61 63 63 6f 72 |er happe|ns accor|
|00003380| 64 69 6e 67 20 74 6f 0a | 09 23 20 74 68 65 20 61 |ding to.|.# the a|
|00003390| 72 63 68 69 74 65 63 74 | 75 72 65 20 6f 66 20 74 |rchitect|ure of t|
|000033a0| 68 65 20 73 79 73 74 65 | 6d 0a 09 23 20 2d 2d 2d |he syste|m..# ---|
|000033b0| 2d 0a 09 6c 6f 63 61 6c | 20 61 72 63 68 3d 60 75 |-..local| arch=`u|
|000033c0| 6e 61 6d 65 20 2d 6d 60 | 0a 09 69 66 20 5b 20 2d |name -m`|..if [ -|
|000033d0| 7a 20 22 24 6c 6f 61 64 | 65 72 22 20 5d 3b 74 68 |z "$load|er" ];th|
|000033e0| 65 6e 0a 09 09 6c 6f 61 | 64 65 72 3d 22 67 72 75 |en...loa|der="gru|
|000033f0| 62 22 0a 09 66 69 0a 09 | 63 61 73 65 20 24 61 72 |b"..fi..|case $ar|
|00003400| 63 68 2d 24 6c 6f 61 64 | 65 72 20 69 6e 0a 09 09 |ch-$load|er in...|
|00003410| 69 2a 38 36 2d 67 72 75 | 62 29 20 20 20 69 6e 73 |i*86-gru|b) ins|
|00003420| 74 61 6c 6c 42 6f 6f 74 | 4c 6f 61 64 65 72 47 72 |tallBoot|LoaderGr|
|00003430| 75 62 20 3b 3b 0a 09 09 | 78 38 36 5f 36 34 2d 67 |ub ;;...|x86_64-g|
|00003440| 72 75 62 29 20 69 6e 73 | 74 61 6c 6c 42 6f 6f 74 |rub) ins|tallBoot|
|00003450| 4c 6f 61 64 65 72 47 72 | 75 62 20 3b 3b 0a 09 09 |LoaderGr|ub ;;...|
|00003460| 70 70 63 2a 29 20 20 20 | 20 20 20 20 20 69 6e 73 |ppc*) | ins|
|00003470| 74 61 6c 6c 42 6f 6f 74 | 4c 6f 61 64 65 72 4c 69 |tallBoot|LoaderLi|
|00003480| 6c 6f 20 3b 3b 0a 09 09 | 2a 29 0a 09 09 73 79 73 |lo ;;...|*)...sys|
|00003490| 74 65 6d 45 78 63 65 70 | 74 69 6f 6e 20 5c 0a 09 |temExcep|tion \..|
|000034a0| 09 09 22 2a 2a 2a 20 62 | 6f 6f 74 20 6c 6f 61 64 |.."*** b|oot load|
|000034b0| 65 72 20 69 6e 73 74 61 | 6c 6c 20 66 6f 72 20 24 |er insta|ll for $|
|000034c0| 61 72 63 68 2d 24 6c 6f | 61 64 65 72 20 6e 6f 74 |arch-$lo|ader not|
|000034d0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 2a 2a 2a | impleme|nted ***|
|000034e0| 22 20 5c 0a 09 09 22 72 | 65 62 6f 6f 74 22 0a 09 |" \..."r|eboot"..|
|000034f0| 65 73 61 63 0a 7d 0a 23 | 3d 3d 3d 3d 3d 3d 3d 3d |esac.}.#|========|
|00003500| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003510| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 23 |========|======.#|
|00003520| 20 69 6e 73 74 61 6c 6c | 42 6f 6f 74 4c 6f 61 64 | install|BootLoad|
|00003530| 65 72 52 65 63 6f 76 65 | 72 79 0a 23 2d 2d 2d 2d |erRecove|ry.#----|
|00003540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003560| 2d 2d 0a 66 75 6e 63 74 | 69 6f 6e 20 69 6e 73 74 |--.funct|ion inst|
|00003570| 61 6c 6c 42 6f 6f 74 4c | 6f 61 64 65 72 52 65 63 |allBootL|oaderRec|
|00003580| 6f 76 65 72 79 20 7b 0a | 09 23 20 2f 2e 2e 2e 2f |overy {.|.# /.../|
|00003590| 0a 09 23 20 67 65 6e 65 | 72 69 63 20 66 75 6e 63 |..# gene|ric func|
|000035a0| 74 69 6f 6e 20 74 6f 20 | 69 6e 73 74 61 6c 6c 20 |tion to |install |
|000035b0| 74 68 65 20 62 6f 6f 74 | 20 6c 6f 61 64 65 72 20 |the boot| loader |
|000035c0| 69 6e 74 6f 0a 09 23 20 | 74 68 65 20 72 65 63 6f |into..# |the reco|
|000035d0| 76 65 72 79 20 70 61 72 | 74 69 74 69 6f 6e 2e 20 |very par|tition. |
|000035e0| 54 68 65 20 73 65 6c 65 | 63 74 69 6f 6e 20 6f 66 |The sele|ction of|
|000035f0| 20 74 68 65 20 62 6f 6f | 74 6c 6f 61 64 65 72 0a | the boo|tloader.|
|00003600| 09 23 20 68 61 70 70 65 | 6e 73 20 61 63 63 6f 72 |.# happe|ns accor|
|00003610| 64 69 6e 67 20 74 6f 20 | 74 68 65 20 61 72 63 68 |ding to |the arch|
|00003620| 69 74 65 63 74 75 72 65 | 20 6f 66 20 74 68 65 20 |itecture| of the |
|00003630| 73 79 73 74 65 6d 0a 09 | 23 20 2d 2d 2d 2d 0a 09 |system..|# ----..|
|00003640| 6c 6f 63 61 6c 20 61 72 | 63 68 3d 60 75 6e 61 6d |local ar|ch=`unam|
|00003650| 65 20 2d 6d 60 0a 09 69 | 66 20 5b 20 2d 7a 20 22 |e -m`..i|f [ -z "|
|00003660| 24 6c 6f 61 64 65 72 22 | 20 5d 3b 74 68 65 6e 0a |$loader"| ];then.|
|00003670| 09 09 6c 6f 61 64 65 72 | 3d 22 67 72 75 62 22 0a |..loader|="grub".|
|00003680| 09 66 69 0a 09 63 61 73 | 65 20 24 61 72 63 68 2d |.fi..cas|e $arch-|
|00003690| 24 6c 6f 61 64 65 72 20 | 69 6e 0a 09 09 69 2a 38 |$loader |in...i*8|
|000036a0| 36 2d 67 72 75 62 29 20 | 20 20 69 6e 73 74 61 6c |6-grub) | instal|
|000036b0| 6c 42 6f 6f 74 4c 6f 61 | 64 65 72 47 72 75 62 52 |lBootLoa|derGrubR|
|000036c0| 65 63 6f 76 65 72 79 20 | 3b 3b 0a 09 09 78 38 36 |ecovery |;;...x86|
|000036d0| 5f 36 34 2d 67 72 75 62 | 29 20 69 6e 73 74 61 6c |_64-grub|) instal|
|000036e0| 6c 42 6f 6f 74 4c 6f 61 | 64 65 72 47 72 75 62 52 |lBootLoa|derGrubR|
|000036f0| 65 63 6f 76 65 72 79 20 | 3b 3b 0a 09 09 2a 29 0a |ecovery |;;...*).|
|00003700| 09 09 73 79 73 74 65 6d | 45 78 63 65 70 74 69 6f |..system|Exceptio|
|00003710| 6e 20 5c 0a 09 09 09 22 | 2a 2a 2a 20 62 6f 6f 74 |n \...."|*** boot|
|00003720| 20 6c 6f 61 64 65 72 20 | 73 65 74 75 70 20 66 6f | loader |setup fo|
|00003730| 72 20 24 61 72 63 68 2d | 24 6c 6f 61 64 65 72 20 |r $arch-|$loader |
|00003740| 6e 6f 74 20 69 6d 70 6c | 65 6d 65 6e 74 65 64 20 |not impl|emented |
|00003750| 2a 2a 2a 22 20 5c 0a 09 | 09 22 72 65 62 6f 6f 74 |***" \..|."reboot|
|00003760| 22 0a 09 65 73 61 63 0a | 7d 0a 23 3d 3d 3d 3d 3d |"..esac.|}.#=====|
|00003770| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003780| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003790| 3d 0a 23 20 69 6e 73 74 | 61 6c 6c 42 6f 6f 74 4c |=.# inst|allBootL|
|000037a0| 6f 61 64 65 72 47 72 75 | 62 0a 23 2d 2d 2d 2d 2d |oaderGru|b.#-----|
|000037b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000037c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000037d0| 2d 0a 66 75 6e 63 74 69 | 6f 6e 20 69 6e 73 74 61 |-.functi|on insta|
|000037e0| 6c 6c 42 6f 6f 74 4c 6f | 61 64 65 72 47 72 75 62 |llBootLo|aderGrub|
|000037f0| 20 7b 0a 09 23 20 2f 2e | 2e 2e 2f 0a 09 23 20 69 | {..# /.|../..# i|
|00003800| 6e 73 74 61 6c 6c 20 74 | 68 65 20 67 72 75 62 20 |nstall t|he grub |
|00003810| 61 63 63 6f 72 64 69 6e | 67 20 74 6f 20 74 68 65 |accordin|g to the|
|00003820| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 0a 09 23 20 | content|s of..# |
|00003830| 2f 65 74 63 2f 67 72 75 | 62 2e 63 6f 6e 66 20 61 |/etc/gru|b.conf a|
|00003840| 6e 64 20 2f 62 6f 6f 74 | 2f 67 72 75 62 2f 6d 65 |nd /boot|/grub/me|
|00003850| 6e 75 2e 6c 73 74 0a 09 | 23 20 2d 2d 2d 2d 0a 09 |nu.lst..|# ----..|
|00003860| 69 66 20 5b 20 2d 78 20 | 2f 75 73 72 2f 73 62 69 |if [ -x |/usr/sbi|
|00003870| 6e 2f 67 72 75 62 20 5d | 3b 74 68 65 6e 0a 09 09 |n/grub ]|;then...|
|00003880| 45 63 68 6f 20 22 49 6e | 73 74 61 6c 6c 69 6e 67 |Echo "In|stalling|
|00003890| 20 62 6f 6f 74 20 6c 6f | 61 64 65 72 2e 2e 2e 22 | boot lo|ader..."|
|000038a0| 0a 09 09 2f 75 73 72 2f | 73 62 69 6e 2f 67 72 75 |.../usr/|sbin/gru|
|000038b0| 62 20 2d 2d 62 61 74 63 | 68 20 2d 2d 6e 6f 2d 66 |b --batc|h --no-f|
|000038c0| 6c 6f 70 70 79 20 3c 20 | 2f 65 74 63 2f 67 72 75 |loppy < |/etc/gru|
|000038d0| 62 2e 63 6f 6e 66 20 31 | 3e 26 32 0a 09 09 69 66 |b.conf 1|>&2...if|
|000038e0| 20 5b 20 21 20 24 3f 20 | 3d 20 30 20 5d 3b 74 68 | [ ! $? |= 0 ];th|
|000038f0| 65 6e 0a 09 09 09 45 63 | 68 6f 20 22 46 61 69 6c |en....Ec|ho "Fail|
|00003900| 65 64 20 74 6f 20 69 6e | 73 74 61 6c 6c 20 62 6f |ed to in|stall bo|
|00003910| 6f 74 20 6c 6f 61 64 65 | 72 22 0a 09 09 66 69 0a |ot loade|r"...fi.|
|00003920| 09 65 6c 73 65 0a 09 09 | 45 63 68 6f 20 22 49 6d |.else...|Echo "Im|
|00003930| 61 67 65 20 64 6f 65 73 | 6e 27 74 20 68 61 76 65 |age does|n't have|
|00003940| 20 67 72 75 62 20 69 6e | 73 74 61 6c 6c 65 64 22 | grub in|stalled"|
|00003950| 0a 09 09 45 63 68 6f 20 | 22 43 61 6e 27 74 20 69 |...Echo |"Can't i|
|00003960| 6e 73 74 61 6c 6c 20 62 | 6f 6f 74 20 6c 6f 61 64 |nstall b|oot load|
|00003970| 65 72 22 0a 09 66 69 0a | 7d 0a 23 3d 3d 3d 3d 3d |er"..fi.|}.#=====|
|00003980| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003990| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000039a0| 3d 0a 23 20 69 6e 73 74 | 61 6c 6c 42 6f 6f 74 4c |=.# inst|allBootL|
|000039b0| 6f 61 64 65 72 4c 69 6c | 6f 0a 23 2d 2d 2d 2d 2d |oaderLil|o.#-----|
|000039c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039e0| 2d 0a 66 75 6e 63 74 69 | 6f 6e 20 69 6e 73 74 61 |-.functi|on insta|
|000039f0| 6c 6c 42 6f 6f 74 4c 6f | 61 64 65 72 4c 69 6c 6f |llBootLo|aderLilo|
|00003a00| 20 7b 0a 09 23 20 2f 2e | 2e 2e 2f 0a 09 23 20 69 | {..# /.|../..# i|
|00003a10| 6e 73 74 61 6c 6c 20 74 | 68 65 20 6c 69 6c 6f 20 |nstall t|he lilo |
|00003a20| 61 63 63 6f 72 64 69 6e | 67 20 74 6f 20 74 68 65 |accordin|g to the|
|00003a30| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 0a 09 23 20 | content|s of..# |
|00003a40| 2f 65 74 63 2f 6c 69 6c | 6f 2e 63 6f 6e 66 0a 09 |/etc/lil|o.conf..|
|00003a50| 23 20 2d 2d 2d 2d 0a 09 | 69 66 20 5b 20 2d 78 20 |# ----..|if [ -x |
|00003a60| 2f 73 62 69 6e 2f 6c 69 | 6c 6f 20 5d 3b 74 68 65 |/sbin/li|lo ];the|
|00003a70| 6e 0a 09 09 45 63 68 6f | 20 22 49 6e 73 74 61 6c |n...Echo| "Instal|
|00003a80| 6c 69 6e 67 20 62 6f 6f | 74 20 6c 6f 61 64 65 72 |ling boo|t loader|
|00003a90| 2e 2e 2e 22 0a 09 09 2f | 73 62 69 6e 2f 6c 69 6c |...".../|sbin/lil|
|00003aa0| 6f 20 31 3e 26 32 0a 09 | 09 69 66 20 5b 20 21 20 |o 1>&2..|.if [ ! |
|00003ab0| 24 3f 20 3d 20 30 20 5d | 3b 74 68 65 6e 0a 09 09 |$? = 0 ]|;then...|
|00003ac0| 09 45 63 68 6f 20 22 46 | 61 69 6c 65 64 20 74 6f |.Echo "F|ailed to|
|00003ad0| 20 69 6e 73 74 61 6c 6c | 20 62 6f 6f 74 20 6c 6f | install| boot lo|
|00003ae0| 61 64 65 72 22 0a 09 09 | 66 69 0a 09 65 6c 73 65 |ader"...|fi..else|
|00003af0| 0a 09 09 45 63 68 6f 20 | 22 49 6d 61 67 65 20 64 |...Echo |"Image d|
|00003b00| 6f 65 73 6e 27 74 20 68 | 61 76 65 20 6c 69 6c 6f |oesn't h|ave lilo|
|00003b10| 20 69 6e 73 74 61 6c 6c | 65 64 22 0a 09 09 45 63 | install|ed"...Ec|
|00003b20| 68 6f 20 22 43 61 6e 27 | 74 20 69 6e 73 74 61 6c |ho "Can'|t instal|
|00003b30| 6c 20 62 6f 6f 74 20 6c | 6f 61 64 65 72 22 0a 09 |l boot l|oader"..|
|00003b40| 66 69 0a 7d 0a 23 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |fi.}.#==|========|
|00003b50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003b60| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 23 20 69 |========|====.# i|
|00003b70| 6e 73 74 61 6c 6c 42 6f | 6f 74 4c 6f 61 64 65 72 |nstallBo|otLoader|
|00003b80| 47 72 75 62 52 65 63 6f | 76 65 72 79 0a 23 2d 2d |GrubReco|very.#--|
|00003b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003bb0| 2d 2d 2d 2d 0a 66 75 6e | 63 74 69 6f 6e 20 69 6e |----.fun|ction in|
|00003bc0| 73 74 61 6c 6c 42 6f 6f | 74 4c 6f 61 64 65 72 47 |stallBoo|tLoaderG|
|00003bd0| 72 75 62 52 65 63 6f 76 | 65 72 79 20 7b 0a 09 23 |rubRecov|ery {..#|
|00003be0| 20 2f 2e 2e 2e 2f 0a 09 | 23 20 69 6e 73 74 61 6c | /.../..|# instal|
|00003bf0| 6c 20 74 68 65 20 67 72 | 75 62 20 69 6e 74 6f 20 |l the gr|ub into |
|00003c00| 74 68 65 20 72 65 63 6f | 76 65 72 79 20 70 61 72 |the reco|very par|
|00003c10| 74 69 74 69 6f 6e 2e 0a | 09 23 20 42 79 20 64 65 |tition..|.# By de|
|00003c20| 73 69 67 6e 20 74 68 65 | 20 72 65 63 6f 76 65 72 |sign the| recover|
|00003c30| 79 20 70 61 72 74 69 74 | 69 6f 6e 20 69 73 20 61 |y partit|ion is a|
|00003c40| 6c 77 61 79 73 20 74 68 | 65 0a 09 23 20 66 6f 75 |lways th|e..# fou|
|00003c50| 72 74 68 20 70 72 69 6d | 61 72 79 20 70 61 72 74 |rth prim|ary part|
|00003c60| 69 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 64 69 73 |ition of| the dis|
|00003c70| 6b 0a 09 23 20 2d 2d 2d | 2d 0a 09 6c 6f 63 61 6c |k..# ---|-..local|
|00003c80| 20 69 6e 70 75 74 3d 2f | 67 72 75 62 2e 69 6e 70 | input=/|grub.inp|
|00003c90| 75 74 0a 09 6c 6f 63 61 | 6c 20 67 64 65 76 72 65 |ut..loca|l gdevre|
|00003ca0| 63 6f 3d 24 28 65 78 70 | 72 20 24 72 65 63 6f 69 |co=$(exp|r $recoi|
|00003cb0| 64 20 2d 20 31 29 0a 09 | 65 63 68 6f 20 22 64 65 |d - 1)..|echo "de|
|00003cc0| 76 69 63 65 20 28 68 64 | 30 29 20 24 69 6d 61 67 |vice (hd|0) $imag|
|00003cd0| 65 44 69 73 6b 44 65 76 | 69 63 65 22 20 3e 20 24 |eDiskDev|ice" > $|
|00003ce0| 69 6e 70 75 74 0a 09 65 | 63 68 6f 20 22 72 6f 6f |input..e|cho "roo|
|00003cf0| 74 20 28 68 64 30 2c 24 | 67 64 65 76 72 65 63 6f |t (hd0,$|gdevreco|
|00003d00| 29 22 20 20 3e 3e 20 24 | 69 6e 70 75 74 0a 09 65 |)" >> $|input..e|
|00003d10| 63 68 6f 20 22 73 65 74 | 75 70 20 28 68 64 30 2c |cho "set|up (hd0,|
|00003d20| 24 67 64 65 76 72 65 63 | 6f 29 22 20 3e 3e 20 24 |$gdevrec|o)" >> $|
|00003d30| 69 6e 70 75 74 0a 09 65 | 63 68 6f 20 22 71 75 69 |input..e|cho "qui|
|00003d40| 74 22 20 20 20 20 20 20 | 20 20 20 20 3e 3e 20 24 |t" | >> $|
|00003d50| 69 6e 70 75 74 0a 09 69 | 66 20 5b 20 2d 78 20 2f |input..i|f [ -x /|
|00003d60| 6d 6e 74 2f 75 73 72 2f | 73 62 69 6e 2f 67 72 75 |mnt/usr/|sbin/gru|
|00003d70| 62 20 5d 3b 74 68 65 6e | 0a 09 09 2f 6d 6e 74 2f |b ];then|.../mnt/|
|00003d80| 75 73 72 2f 73 62 69 6e | 2f 67 72 75 62 20 2d 2d |usr/sbin|/grub --|
|00003d90| 62 61 74 63 68 20 3c 20 | 24 69 6e 70 75 74 20 31 |batch < |$input 1|
|00003da0| 3e 26 32 0a 09 65 6c 73 | 65 0a 09 09 45 63 68 6f |>&2..els|e...Echo|
|00003db0| 20 22 49 6d 61 67 65 20 | 64 6f 65 73 6e 27 74 20 | "Image |doesn't |
|00003dc0| 68 61 76 65 20 67 72 75 | 62 20 69 6e 73 74 61 6c |have gru|b instal|
|00003dd0| 6c 65 64 22 0a 09 09 45 | 63 68 6f 20 22 43 61 6e |led"...E|cho "Can|
|00003de0| 27 74 20 69 6e 73 74 61 | 6c 6c 20 62 6f 6f 74 20 |'t insta|ll boot |
|00003df0| 6c 6f 61 64 65 72 22 0a | 09 09 73 79 73 74 65 6d |loader".|..system|
|00003e00| 45 78 63 65 70 74 69 6f | 6e 20 5c 0a 09 09 09 22 |Exceptio|n \...."|
|00003e10| 72 65 63 6f 76 65 72 79 | 20 67 72 75 62 20 73 65 |recovery| grub se|
|00003e20| 74 75 70 20 66 61 69 6c | 65 64 22 20 5c 0a 09 09 |tup fail|ed" \...|
|00003e30| 22 72 65 62 6f 6f 74 22 | 0a 09 66 69 0a 7d 0a 23 |"reboot"|..fi.}.#|
|00003e40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003e50| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003e60| 3d 3d 3d 3d 3d 3d 0a 23 | 20 73 65 74 75 70 53 55 |======.#| setupSU|
|00003e70| 53 45 49 6e 69 74 72 64 | 0a 23 2d 2d 2d 2d 2d 2d |SEInitrd|.#------|
|00003e80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ea0| 0a 66 75 6e 63 74 69 6f | 6e 20 73 65 74 75 70 53 |.functio|n setupS|
|00003eb0| 55 53 45 49 6e 69 74 72 | 64 20 7b 0a 09 23 20 2f |USEInitr|d {..# /|
|00003ec0| 2e 2e 2e 2f 0a 09 23 20 | 63 61 6c 6c 20 6d 6b 69 |.../..# |call mki|
|00003ed0| 6e 69 74 72 64 20 6f 6e | 20 73 75 73 65 20 73 79 |nitrd on| suse sy|
|00003ee0| 73 74 65 6d 73 20 74 6f | 20 63 72 65 61 74 65 20 |stems to| create |
|00003ef0| 74 68 65 20 64 69 73 74 | 72 6f 20 69 6e 69 74 72 |the dist|ro initr|
|00003f00| 64 0a 09 23 20 62 61 73 | 65 64 20 6f 6e 20 2f 65 |d..# bas|ed on /e|
|00003f10| 74 63 2f 73 79 73 63 6f | 6e 66 69 67 2f 6b 65 72 |tc/sysco|nfig/ker|
|00003f20| 6e 65 6c 0a 09 23 20 2d | 2d 2d 2d 0a 09 62 6f 6f |nel..# -|---..boo|
|00003f30| 74 4c 6f 61 64 65 72 4f | 4b 3d 31 0a 09 6c 6f 63 |tLoaderO|K=1..loc|
|00003f40| 61 6c 20 75 6d 6f 75 6e | 74 50 72 6f 63 3d 30 0a |al umoun|tProc=0.|
|00003f50| 09 6c 6f 63 61 6c 20 75 | 6d 6f 75 6e 74 53 79 73 |.local u|mountSys|
|00003f60| 3d 30 0a 09 6c 6f 63 61 | 6c 20 73 79 73 74 65 6d |=0..loca|l system|
|00003f70| 4d 61 70 3d 30 0a 09 6c | 6f 63 61 6c 20 72 75 6e |Map=0..l|ocal run|
|00003f80| 6e 69 6e 67 0a 09 6c 6f | 63 61 6c 20 72 6c 69 6e |ning..lo|cal rlin|
|00003f90| 75 78 0a 09 6c 6f 63 61 | 6c 20 72 69 6e 69 74 72 |ux..loca|l rinitr|
|00003fa0| 64 0a 09 66 6f 72 20 69 | 20 69 6e 20 60 66 69 6e |d..for i| in `fin|
|00003fb0| 64 20 2f 62 6f 6f 74 2f | 20 2d 6e 61 6d 65 20 22 |d /boot/| -name "|
|00003fc0| 53 79 73 74 65 6d 2e 6d | 61 70 2a 22 60 3b 64 6f |System.m|ap*"`;do|
|00003fd0| 0a 09 09 73 79 73 74 65 | 6d 4d 61 70 3d 31 0a 09 |...syste|mMap=1..|
|00003fe0| 64 6f 6e 65 0a 09 69 66 | 20 5b 20 24 73 79 73 74 |done..if| [ $syst|
|00003ff0| 65 6d 4d 61 70 20 2d 65 | 71 20 31 20 5d 3b 74 68 |emMap -e|q 1 ];th|
|00004000| 65 6e 0a 09 09 69 66 20 | 5b 20 21 20 2d 65 20 2f |en...if |[ ! -e /|
|00004010| 70 72 6f 63 2f 6d 6f 75 | 6e 74 73 20 5d 3b 74 68 |proc/mou|nts ];th|
|00004020| 65 6e 0a 09 09 09 6d 6f | 75 6e 74 20 2d 74 20 70 |en....mo|unt -t p|
|00004030| 72 6f 63 20 70 72 6f 63 | 20 2f 70 72 6f 63 0a 09 |roc proc| /proc..|
|00004040| 09 09 75 6d 6f 75 6e 74 | 50 72 6f 63 3d 31 0a 09 |..umount|Proc=1..|
|00004050| 09 66 69 0a 09 09 69 66 | 20 5b 20 21 20 2d 65 20 |.fi...if| [ ! -e |
|00004060| 2f 73 79 73 2f 62 6c 6f | 63 6b 20 5d 3b 74 68 65 |/sys/blo|ck ];the|
|00004070| 6e 0a 09 09 09 6d 6f 75 | 6e 74 20 2d 74 20 73 79 |n....mou|nt -t sy|
|00004080| 73 66 73 20 73 79 73 66 | 73 20 2f 73 79 73 0a 09 |sfs sysf|s /sys..|
|00004090| 09 09 75 6d 6f 75 6e 74 | 53 79 73 3d 31 0a 09 09 |..umount|Sys=1...|
|000040a0| 66 69 0a 09 09 69 66 20 | 5b 20 2d 66 20 2f 65 74 |fi...if |[ -f /et|
|000040b0| 63 2f 69 6e 69 74 2e 64 | 2f 62 6f 6f 74 2e 64 65 |c/init.d|/boot.de|
|000040c0| 76 69 63 65 2d 6d 61 70 | 70 65 72 20 5d 3b 74 68 |vice-map|per ];th|
|000040d0| 65 6e 0a 09 09 09 2f 65 | 74 63 2f 69 6e 69 74 2e |en..../e|tc/init.|
|000040e0| 64 2f 62 6f 6f 74 2e 64 | 65 76 69 63 65 2d 6d 61 |d/boot.d|evice-ma|
|000040f0| 70 70 65 72 20 73 74 61 | 72 74 0a 09 09 66 69 0a |pper sta|rt...fi.|
|00004100| 09 09 69 66 20 5b 20 22 | 24 68 61 76 65 4c 56 4d |..if [ "|$haveLVM|
|00004110| 22 20 3d 20 22 79 65 73 | 22 20 5d 3b 20 74 68 65 |" = "yes|" ]; the|
|00004120| 6e 0a 09 09 09 2f 65 74 | 63 2f 69 6e 69 74 2e 64 |n..../et|c/init.d|
|00004130| 2f 62 6f 6f 74 2e 6c 76 | 6d 20 73 74 61 72 74 0a |/boot.lv|m start.|
|00004140| 09 09 66 69 0a 09 09 69 | 66 20 21 20 6d 6b 69 6e |..fi...i|f ! mkin|
|00004150| 69 74 72 64 3b 74 68 65 | 6e 0a 09 09 09 45 63 68 |itrd;the|n....Ech|
|00004160| 6f 20 22 43 61 6e 27 74 | 20 63 72 65 61 74 65 20 |o "Can't| create |
|00004170| 69 6e 69 74 72 64 22 0a | 09 09 09 73 79 73 74 65 |initrd".|...syste|
|00004180| 6d 49 6e 74 65 67 72 69 | 74 79 3d 75 6e 6b 6e 6f |mIntegri|ty=unkno|
|00004190| 77 6e 0a 09 09 09 62 6f | 6f 74 4c 6f 61 64 65 72 |wn....bo|otLoader|
|000041a0| 4f 4b 3d 30 0a 09 09 66 | 69 0a 09 09 69 66 20 5b |OK=0...f|i...if [|
|000041b0| 20 2d 66 20 2f 65 74 63 | 2f 69 6e 69 74 2e 64 2f | -f /etc|/init.d/|
|000041c0| 62 6f 6f 74 2e 64 65 76 | 69 63 65 2d 6d 61 70 70 |boot.dev|ice-mapp|
|000041d0| 65 72 20 5d 3b 74 68 65 | 6e 0a 09 09 09 2f 65 74 |er ];the|n..../et|
|000041e0| 63 2f 69 6e 69 74 2e 64 | 2f 62 6f 6f 74 2e 64 65 |c/init.d|/boot.de|
|000041f0| 76 69 63 65 2d 6d 61 70 | 70 65 72 20 73 74 6f 70 |vice-map|per stop|
|00004200| 0a 09 09 66 69 0a 09 09 | 69 66 20 5b 20 24 62 6f |...fi...|if [ $bo|
|00004210| 6f 74 4c 6f 61 64 65 72 | 4f 4b 20 3d 20 22 31 22 |otLoader|OK = "1"|
|00004220| 20 5d 3b 74 68 65 6e 0a | 09 09 09 69 66 20 5b 20 | ];then.|...if [ |
|00004230| 2d 66 20 2f 62 6f 6f 74 | 2f 69 6e 69 74 72 64 2e |-f /boot|/initrd.|
|00004240| 76 6d 78 20 5d 3b 74 68 | 65 6e 0a 09 09 09 09 72 |vmx ];th|en.....r|
|00004250| 6d 20 2d 66 20 2f 62 6f | 6f 74 2f 69 6e 69 74 72 |m -f /bo|ot/initr|
|00004260| 64 2e 76 6d 78 0a 09 09 | 09 09 72 6d 20 2d 66 20 |d.vmx...|..rm -f |
|00004270| 2f 62 6f 6f 74 2f 6c 69 | 6e 75 78 2e 76 6d 78 0a |/boot/li|nux.vmx.|
|00004280| 09 09 09 09 72 75 6e 6e | 69 6e 67 3d 24 28 75 6e |....runn|ing=$(un|
|00004290| 61 6d 65 20 2d 72 29 0a | 09 09 09 09 72 6c 69 6e |ame -r).|....rlin|
|000042a0| 75 78 3d 76 6d 6c 69 6e | 75 7a 2d 24 72 75 6e 6e |ux=vmlin|uz-$runn|
|000042b0| 69 6e 67 0a 09 09 09 09 | 72 69 6e 69 74 72 64 3d |ing.....|rinitrd=|
|000042c0| 69 6e 69 74 72 64 2d 24 | 72 75 6e 6e 69 6e 67 0a |initrd-$|running.|
|000042d0| 09 09 09 09 6c 6e 20 2d | 73 20 24 72 6c 69 6e 75 |....ln -|s $rlinu|
|000042e0| 78 20 20 2f 62 6f 6f 74 | 2f 6c 69 6e 75 78 2e 76 |x /boot|/linux.v|
|000042f0| 6d 78 0a 09 09 09 09 6c | 6e 20 2d 73 20 24 72 69 |mx.....l|n -s $ri|
|00004300| 6e 69 74 72 64 20 2f 62 | 6f 6f 74 2f 69 6e 69 74 |nitrd /b|oot/init|
|00004310| 72 64 2e 76 6d 78 0a 09 | 09 09 66 69 0a 09 09 66 |rd.vmx..|..fi...f|
|00004320| 69 0a 09 09 69 66 20 5b | 20 24 75 6d 6f 75 6e 74 |i...if [| $umount|
|00004330| 53 79 73 20 2d 65 71 20 | 31 20 5d 3b 74 68 65 6e |Sys -eq |1 ];then|
|00004340| 0a 09 09 09 75 6d 6f 75 | 6e 74 20 2f 73 79 73 0a |....umou|nt /sys.|
|00004350| 09 09 66 69 0a 09 09 69 | 66 20 5b 20 24 75 6d 6f |..fi...i|f [ $umo|
|00004360| 75 6e 74 50 72 6f 63 20 | 2d 65 71 20 31 20 5d 3b |untProc |-eq 1 ];|
|00004370| 74 68 65 6e 0a 09 09 09 | 75 6d 6f 75 6e 74 20 2f |then....|umount /|
|00004380| 70 72 6f 63 0a 09 09 66 | 69 0a 09 65 6c 73 65 0a |proc...f|i..else.|
|00004390| 09 09 45 63 68 6f 20 22 | 49 6d 61 67 65 20 64 6f |..Echo "|Image do|
|000043a0| 65 73 6e 27 74 20 69 6e | 63 6c 75 64 65 20 6b 65 |esn't in|clude ke|
|000043b0| 72 6e 65 6c 20 73 79 73 | 74 65 6d 20 6d 61 70 22 |rnel sys|tem map"|
|000043c0| 0a 09 09 45 63 68 6f 20 | 22 43 61 6e 27 74 20 63 |...Echo |"Can't c|
|000043d0| 72 65 61 74 65 20 69 6e | 69 74 72 64 22 0a 09 09 |reate in|itrd"...|
|000043e0| 73 79 73 74 65 6d 49 6e | 74 65 67 72 69 74 79 3d |systemIn|tegrity=|
|000043f0| 75 6e 6b 6e 6f 77 6e 0a | 09 09 62 6f 6f 74 4c 6f |unknown.|..bootLo|
|00004400| 61 64 65 72 4f 4b 3d 30 | 0a 09 66 69 0a 7d 0a 23 |aderOK=0|..fi.}.#|
|00004410| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004420| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004430| 3d 3d 3d 3d 3d 3d 0a 23 | 20 63 61 6c 6c 53 55 53 |======.#| callSUS|
|00004440| 45 49 6e 69 74 72 64 53 | 63 72 69 70 74 73 0a 23 |EInitrdS|cripts.#|
|00004450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004470| 2d 2d 2d 2d 2d 2d 0a 66 | 75 6e 63 74 69 6f 6e 20 |------.f|unction |
|00004480| 63 61 6c 6c 53 55 53 45 | 49 6e 69 74 72 64 53 63 |callSUSE|InitrdSc|
|00004490| 72 69 70 74 73 20 7b 0a | 09 23 20 2f 2e 2e 2e 2f |ripts {.|.# /.../|
|000044a0| 0a 09 23 20 63 72 65 61 | 74 65 20 69 6e 69 74 72 |..# crea|te initr|
|000044b0| 64 20 77 69 74 68 20 6d | 6b 69 6e 69 74 72 64 20 |d with m|kinitrd |
|000044c0| 61 6e 64 20 65 78 74 72 | 61 63 74 20 74 68 65 20 |and extr|act the |
|000044d0| 72 75 6e 5f 61 6c 6c 2e | 73 68 20 73 63 72 69 70 |run_all.|sh scrip|
|000044e0| 74 0a 09 23 20 61 66 74 | 65 72 20 74 68 61 74 20 |t..# aft|er that |
|000044f0| 63 61 6c 6c 20 74 68 65 | 20 73 63 72 69 70 74 20 |call the| script |
|00004500| 69 6e 20 2f 6c 69 62 2f | 6d 6b 69 6e 69 74 72 64 |in /lib/|mkinitrd|
|00004510| 2e 20 54 68 65 20 6d 6b | 69 6e 69 74 72 64 0a 09 |. The mk|initrd..|
|00004520| 23 20 70 61 63 6b 61 67 | 65 20 6d 75 73 74 20 62 |# packag|e must b|
|00004530| 65 20 69 6e 73 74 61 6c | 6c 65 64 20 69 6e 20 74 |e instal|led in t|
|00004540| 68 65 20 73 79 73 74 65 | 6d 20 69 6d 61 67 65 20 |he syste|m image |
|00004550| 74 6f 20 64 6f 20 74 68 | 61 74 0a 09 23 20 2d 2d |to do th|at..# --|
|00004560| 2d 2d 0a 09 6c 6f 63 61 | 6c 20 70 72 65 66 69 78 |--..loca|l prefix|
|00004570| 3d 24 31 0a 09 69 66 20 | 5b 20 21 20 2d 64 20 24 |=$1..if |[ ! -d $|
|00004580| 70 72 65 66 69 78 2f 6c | 69 62 2f 6d 6b 69 6e 69 |prefix/l|ib/mkini|
|00004590| 74 72 64 20 5d 3b 74 68 | 65 6e 0a 09 09 45 63 68 |trd ];th|en...Ech|
|000045a0| 6f 20 22 4e 6f 20 6d 6b | 69 6e 69 74 72 64 20 70 |o "No mk|initrd p|
|000045b0| 61 63 6b 61 67 65 20 69 | 6e 73 74 61 6c 6c 65 64 |ackage i|nstalled|
|000045c0| 22 0a 09 09 45 63 68 6f | 20 22 43 61 6e 27 74 20 |"...Echo| "Can't |
|000045d0| 63 61 6c 6c 20 69 6e 69 | 74 72 64 20 73 63 72 69 |call ini|trd scri|
|000045e0| 70 74 73 22 0a 09 09 72 | 65 74 75 72 6e 0a 09 66 |pts"...r|eturn..f|
|000045f0| 69 0a 09 6d 6b 69 6e 69 | 74 72 64 20 3e 2f 64 65 |i..mkini|trd >/de|
|00004600| 76 2f 6e 75 6c 6c 0a 09 | 69 66 20 5b 20 21 20 2d |v/null..|if [ ! -|
|00004610| 66 20 24 70 72 65 66 69 | 78 2f 62 6f 6f 74 2f 69 |f $prefi|x/boot/i|
|00004620| 6e 69 74 72 64 20 5d 3b | 74 68 65 6e 0a 09 09 45 |nitrd ];|then...E|
|00004630| 63 68 6f 20 22 4e 6f 20 | 69 6e 69 74 72 64 20 66 |cho "No |initrd f|
|00004640| 69 6c 65 20 66 6f 75 6e | 64 22 0a 09 09 45 63 68 |ile foun|d"...Ech|
|00004650| 6f 20 22 43 61 6e 27 74 | 20 63 61 6c 6c 20 69 6e |o "Can't| call in|
|00004660| 69 74 72 64 20 73 63 72 | 69 70 74 73 22 0a 09 09 |itrd scr|ipts"...|
|00004670| 72 65 74 75 72 6e 0a 09 | 66 69 0a 09 6d 6b 64 69 |return..|fi..mkdi|
|00004680| 72 20 24 70 72 65 66 69 | 78 2f 74 6d 70 2f 73 75 |r $prefi|x/tmp/su|
|00004690| 73 65 0a 09 63 64 20 24 | 70 72 65 66 69 78 2f 74 |se..cd $|prefix/t|
|000046a0| 6d 70 2f 73 75 73 65 20 | 26 26 20 67 7a 69 70 20 |mp/suse |&& gzip |
|000046b0| 2d 63 64 20 24 70 72 65 | 66 69 78 2f 62 6f 6f 74 |-cd $pre|fix/boot|
|000046c0| 2f 69 6e 69 74 72 64 20 | 7c 20 63 70 69 6f 20 2d |/initrd || cpio -|
|000046d0| 69 0a 09 69 66 20 5b 20 | 21 20 2d 66 20 24 70 72 |i..if [ |! -f $pr|
|000046e0| 65 66 69 78 2f 74 6d 70 | 2f 73 75 73 65 2f 72 75 |efix/tmp|/suse/ru|
|000046f0| 6e 5f 61 6c 6c 2e 73 68 | 20 5d 3b 74 68 65 6e 0a |n_all.sh| ];then.|
|00004700| 09 09 45 63 68 6f 20 22 | 4e 6f 20 72 75 6e 5f 61 |..Echo "|No run_a|
|00004710| 6c 6c 2e 73 68 20 73 63 | 72 69 70 74 20 69 6e 20 |ll.sh sc|ript in |
|00004720| 69 6e 69 74 72 64 22 0a | 09 09 45 63 68 6f 20 22 |initrd".|..Echo "|
|00004730| 43 61 6e 27 74 20 63 61 | 6c 6c 20 69 6e 69 74 72 |Can't ca|ll initr|
|00004740| 64 20 73 63 72 69 70 74 | 73 22 0a 09 09 72 65 74 |d script|s"...ret|
|00004750| 75 72 6e 0a 09 66 69 0a | 09 45 63 68 6f 20 22 43 |urn..fi.|.Echo "C|
|00004760| 61 6c 6c 69 6e 67 20 53 | 55 53 45 20 69 6e 69 74 |alling S|USE init|
|00004770| 72 64 20 73 63 72 69 70 | 74 73 22 0a 09 63 68 72 |rd scrip|ts"..chr|
|00004780| 6f 6f 74 20 2e 20 62 61 | 73 68 20 2e 2f 72 75 6e |oot . ba|sh ./run|
|00004790| 5f 61 6c 6c 2e 73 68 0a | 7d 0a 23 3d 3d 3d 3d 3d |_all.sh.|}.#=====|
|000047a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000047b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000047c0| 3d 0a 23 20 73 65 74 75 | 70 42 6f 6f 74 4c 6f 61 |=.# setu|pBootLoa|
|000047d0| 64 65 72 46 69 6c 65 73 | 0a 23 2d 2d 2d 2d 2d 2d |derFiles|.#------|
|000047e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000047f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004800| 0a 66 75 6e 63 74 69 6f | 6e 20 73 65 74 75 70 42 |.functio|n setupB|
|00004810| 6f 6f 74 4c 6f 61 64 65 | 72 46 69 6c 65 73 20 7b |ootLoade|rFiles {|
|00004820| 0a 09 23 20 2f 2e 2e 2e | 2f 0a 09 23 20 67 65 6e |..# /...|/..# gen|
|00004830| 65 72 69 63 20 66 75 6e | 63 74 69 6f 6e 20 77 68 |eric fun|ction wh|
|00004840| 69 63 68 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |ich retu|rns the |
|00004850| 66 69 6c 65 73 20 75 73 | 65 64 20 66 6f 72 20 61 |files us|ed for a|
|00004860| 0a 09 23 20 73 70 65 63 | 69 66 69 63 20 62 6f 6f |..# spec|ific boo|
|00004870| 74 6c 6f 61 64 65 72 2e | 20 54 68 65 20 73 65 6c |tloader.| The sel|
|00004880| 65 63 74 69 6f 6e 20 6f | 66 20 74 68 65 20 62 6f |ection o|f the bo|
|00004890| 6f 74 6c 6f 61 64 65 72 | 0a 09 23 20 68 61 70 70 |otloader|..# happ|
|000048a0| 65 6e 73 20 61 63 63 6f | 72 64 69 6e 67 20 74 6f |ens acco|rding to|
|000048b0| 20 74 68 65 20 61 72 63 | 68 69 74 65 63 74 75 72 | the arc|hitectur|
|000048c0| 65 20 6f 66 20 74 68 65 | 20 73 79 73 74 65 6d 0a |e of the| system.|
|000048d0| 09 23 20 2d 2d 2d 2d 0a | 09 6c 6f 63 61 6c 20 61 |.# ----.|.local a|
|000048e0| 72 63 68 3d 60 75 6e 61 | 6d 65 20 2d 6d 60 0a 09 |rch=`una|me -m`..|
|000048f0| 69 66 20 5b 20 2d 7a 20 | 22 24 6c 6f 61 64 65 72 |if [ -z |"$loader|
|00004900| 22 20 5d 3b 74 68 65 6e | 0a 09 09 6c 6f 61 64 65 |" ];then|...loade|
|00004910| 72 3d 22 67 72 75 62 22 | 0a 09 66 69 0a 09 63 61 |r="grub"|..fi..ca|
|00004920| 73 65 20 24 61 72 63 68 | 2d 24 6c 6f 61 64 65 72 |se $arch|-$loader|
|00004930| 20 69 6e 0a 09 09 69 2a | 38 36 2d 67 72 75 62 29 | in...i*|86-grub)|
|00004940| 20 20 20 20 73 65 74 75 | 70 42 6f 6f 74 4c 6f 61 | setu|pBootLoa|
|00004950| 64 65 72 46 69 6c 65 73 | 47 72 75 62 20 3b 3b 0a |derFiles|Grub ;;.|
|00004960| 09 09 78 38 36 5f 36 34 | 2d 67 72 75 62 29 20 20 |..x86_64|-grub) |
|00004970| 73 65 74 75 70 42 6f 6f | 74 4c 6f 61 64 65 72 46 |setupBoo|tLoaderF|
|00004980| 69 6c 65 73 47 72 75 62 | 20 3b 3b 0a 09 09 70 70 |ilesGrub| ;;...pp|
|00004990| 63 2a 29 20 20 20 20 20 | 20 20 20 20 73 65 74 75 |c*) | setu|
|000049a0| 70 42 6f 6f 74 4c 6f 61 | 64 65 72 46 69 6c 65 73 |pBootLoa|derFiles|
|000049b0| 4c 69 6c 6f 20 3b 3b 0a | 09 09 2a 29 0a 09 09 73 |Lilo ;;.|..*)...s|
|000049c0| 79 73 74 65 6d 45 78 63 | 65 70 74 69 6f 6e 20 5c |ystemExc|eption \|
|000049d0| 0a 09 09 09 22 2a 2a 2a | 20 62 6f 6f 74 20 6c 6f |...."***| boot lo|
|000049e0| 61 64 65 72 20 66 69 6c | 65 73 20 66 6f 72 20 24 |ader fil|es for $|
|000049f0| 61 72 63 68 2d 24 6c 6f | 61 64 65 72 20 6e 6f 74 |arch-$lo|ader not|
|00004a00| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 2a 2a 2a | impleme|nted ***|
|00004a10| 22 20 5c 0a 09 09 22 72 | 65 62 6f 6f 74 22 0a 09 |" \..."r|eboot"..|
|00004a20| 65 73 61 63 0a 7d 0a 23 | 3d 3d 3d 3d 3d 3d 3d 3d |esac.}.#|========|
|00004a30| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004a40| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 23 |========|======.#|
|00004a50| 20 73 65 74 75 70 42 6f | 6f 74 4c 6f 61 64 65 72 | setupBo|otLoader|
|00004a60| 46 69 6c 65 73 47 72 75 | 62 0a 23 2d 2d 2d 2d 2d |FilesGru|b.#-----|
|00004a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004a90| 2d 0a 66 75 6e 63 74 69 | 6f 6e 20 73 65 74 75 70 |-.functi|on setup|
|00004aa0| 42 6f 6f 74 4c 6f 61 64 | 65 72 46 69 6c 65 73 47 |BootLoad|erFilesG|
|00004ab0| 72 75 62 20 7b 0a 09 65 | 63 68 6f 20 22 2f 62 6f |rub {..e|cho "/bo|
|00004ac0| 6f 74 2f 67 72 75 62 2f | 6d 65 6e 75 2e 6c 73 74 |ot/grub/|menu.lst|
|00004ad0| 20 2f 65 74 63 2f 67 72 | 75 62 2e 63 6f 6e 66 22 | /etc/gr|ub.conf"|
|00004ae0| 0a 7d 0a 23 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.}.#====|========|
|00004af0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004b00| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0a 23 20 73 65 74 |========|==.# set|
|00004b10| 75 70 42 6f 6f 74 4c 6f | 61 64 65 72 46 69 6c 65 |upBootLo|aderFile|
|00004b20| 73 4c 69 6c 6f 0a 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |sLilo.#-|--------|
|00004b30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 66 75 |--------|-----.fu|
|00004b50| 6e 63 74 69 6f 6e 20 73 | 65 74 75 70 42 6f 6f 74 |nction s|etupBoot|
|00004b60| 4c 6f 61 64 65 72 46 69 | 6c 65 73 4c 69 6c 6f 20 |LoaderFi|lesLilo |
|00004b70| 7b 0a 09 65 63 68 6f 20 | 22 2f 65 74 63 2f 6c 69 |{..echo |"/etc/li|
|00004b80| 6c 6f 2e 63 6f 6e 66 22 | 0a 7d 0a 23 3d 3d 3d 3d |lo.conf"|.}.#====|
|00004b90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004ba0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004bb0| 3d 3d 0a 23 20 73 65 74 | 75 70 42 6f 6f 74 4c 6f |==.# set|upBootLo|
|00004bc0| 61 64 65 72 0a 23 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ader.#--|--------|
|00004bd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 66 75 6e |--------|----.fun|
|00004bf0| 63 74 69 6f 6e 20 73 65 | 74 75 70 42 6f 6f 74 4c |ction se|tupBootL|
|00004c00| 6f 61 64 65 72 20 7b 0a | 09 23 20 2f 2e 2e 2e 2f |oader {.|.# /.../|
|00004c10| 0a 09 23 20 67 65 6e 65 | 72 69 63 20 66 75 6e 63 |..# gene|ric func|
|00004c20| 74 69 6f 6e 20 74 6f 20 | 73 65 74 75 70 20 74 68 |tion to |setup th|
|00004c30| 65 20 62 6f 6f 74 20 6c | 6f 61 64 65 72 20 63 6f |e boot l|oader co|
|00004c40| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 0a 09 23 20 |nfigurat|ion...# |
|00004c50| 54 68 65 20 73 65 6c 65 | 63 74 69 6f 6e 20 6f 66 |The sele|ction of|
|00004c60| 20 74 68 65 20 62 6f 6f | 74 6c 6f 61 64 65 72 20 | the boo|tloader |
|00004c70| 68 61 70 70 65 6e 73 20 | 61 63 63 6f 72 64 69 6e |happens |accordin|
|00004c80| 67 20 74 6f 0a 09 23 20 | 74 68 65 20 61 72 63 68 |g to..# |the arch|
|00004c90| 69 74 65 63 74 75 72 65 | 20 6f 66 20 74 68 65 20 |itecture| of the |
|00004ca0| 73 79 73 74 65 6d 0a 09 | 23 20 2d 2d 2d 2d 0a 09 |system..|# ----..|
|00004cb0| 6c 6f 63 61 6c 20 61 72 | 63 68 3d 60 75 6e 61 6d |local ar|ch=`unam|
|00004cc0| 65 20 2d 6d 60 0a 09 6c | 6f 63 61 6c 20 70 61 72 |e -m`..l|ocal par|
|00004cd0| 61 3d 22 22 0a 09 77 68 | 69 6c 65 20 5b 20 24 23 |a=""..wh|ile [ $#|
|00004ce0| 20 2d 67 74 20 30 20 5d | 3b 64 6f 0a 09 09 70 61 | -gt 0 ]|;do...pa|
|00004cf0| 72 61 3d 22 24 70 61 72 | 61 20 5c 22 24 31 5c 22 |ra="$par|a \"$1\"|
|00004d00| 22 0a 09 09 73 68 69 66 | 74 0a 09 64 6f 6e 65 0a |"...shif|t..done.|
|00004d10| 09 69 66 20 5b 20 2d 7a | 20 22 24 6c 6f 61 64 65 |.if [ -z| "$loade|
|00004d20| 72 22 20 5d 3b 74 68 65 | 6e 0a 09 09 6c 6f 61 64 |r" ];the|n...load|
|00004d30| 65 72 3d 22 67 72 75 62 | 22 0a 09 66 69 0a 09 63 |er="grub|"..fi..c|
|00004d40| 61 73 65 20 24 61 72 63 | 68 2d 24 6c 6f 61 64 65 |ase $arc|h-$loade|
|00004d50| 72 20 69 6e 0a 09 09 69 | 2a 38 36 2d 67 72 75 62 |r in...i|*86-grub|
|00004d60| 29 20 20 20 20 20 20 20 | 65 76 61 6c 20 73 65 74 |) |eval set|
|00004d70| 75 70 42 6f 6f 74 4c 6f | 61 64 65 72 47 72 75 62 |upBootLo|aderGrub|
|00004d80| 20 24 70 61 72 61 20 3b | 3b 0a 09 09 78 38 36 5f | $para ;|;...x86_|
|00004d90| 36 34 2d 67 72 75 62 29 | 20 20 20 20 20 65 76 61 |64-grub)| eva|
|00004da0| 6c 20 73 65 74 75 70 42 | 6f 6f 74 4c 6f 61 64 65 |l setupB|ootLoade|
|00004db0| 72 47 72 75 62 20 24 70 | 61 72 61 20 3b 3b 0a 09 |rGrub $p|ara ;;..|
|00004dc0| 09 69 2a 38 36 2d 73 79 | 73 6c 69 6e 75 78 29 20 |.i*86-sy|slinux) |
|00004dd0| 20 20 65 76 61 6c 20 73 | 65 74 75 70 42 6f 6f 74 | eval s|etupBoot|
|00004de0| 4c 6f 61 64 65 72 53 79 | 73 6c 69 6e 75 78 20 24 |LoaderSy|slinux $|
|00004df0| 70 61 72 61 20 3b 3b 0a | 09 09 78 38 36 5f 36 34 |para ;;.|..x86_64|
|00004e00| 2d 73 79 73 6c 69 6e 75 | 78 29 20 65 76 61 6c 20 |-syslinu|x) eval |
|00004e10| 73 65 74 75 70 42 6f 6f | 74 4c 6f 61 64 65 72 53 |setupBoo|tLoaderS|
|00004e20| 79 73 6c 69 6e 75 78 20 | 24 70 61 72 61 20 3b 3b |yslinux |$para ;;|
|00004e30| 0a 09 09 70 70 63 2a 29 | 20 20 20 20 20 20 20 20 |...ppc*)| |
|00004e40| 20 20 20 20 65 76 61 6c | 20 73 65 74 75 70 42 6f | eval| setupBo|
|00004e50| 6f 74 4c 6f 61 64 65 72 | 4c 69 6c 6f 20 24 70 61 |otLoader|Lilo $pa|
|00004e60| 72 61 20 3b 3b 0a 09 09 | 2a 29 0a 09 09 73 79 73 |ra ;;...|*)...sys|
|00004e70| 74 65 6d 45 78 63 65 70 | 74 69 6f 6e 20 5c 0a 09 |temExcep|tion \..|
|00004e80| 09 09 22 2a 2a 2a 20 62 | 6f 6f 74 20 6c 6f 61 64 |.."*** b|oot load|
|00004e90| 65 72 20 73 65 74 75 70 | 20 66 6f 72 20 24 61 72 |er setup| for $ar|
|00004ea0| 63 68 2d 24 6c 6f 61 64 | 65 72 20 6e 6f 74 20 69 |ch-$load|er not i|
|00004eb0| 6d 70 6c 65 6d 65 6e 74 | 65 64 20 2a 2a 2a 22 20 |mplement|ed ***" |
|00004ec0| 5c 0a 09 09 22 72 65 62 | 6f 6f 74 22 0a 09 65 73 |\..."reb|oot"..es|
|00004ed0| 61 63 0a 7d 0a 23 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ac.}.#==|========|
|00004ee0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00004ef0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 0a 23 20 73 |========|====.# s|
|00004f00| 65 74 75 70 42 6f 6f 74 | 4c 6f 61 64 65 72 52 65 |etupBoot|LoaderRe|
|00004f10| 63 6f 76 65 72 79 0a 23 | 2d 2d 2d 2d 2d 2d 2d 2d |covery.#|--------|
|00004f20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004f30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 0a 66 |--------|------.f|
|00004f40| 75 6e 63 74 69 6f 6e 20 | 73 65 74 75 70 42 6f 6f |unction |setupBoo|
|00004f50| 74 4c 6f 61 64 65 72 52 | 65 63 6f 76 65 72 79 20 |tLoaderR|ecovery |
|00004f60| 7b 0a 09 23 20 2f 2e 2e | 2e 2f 0a 09 23 20 67 65 |{..# /..|./..# ge|
|00004f70| 6e 65 72 69 63 20 66 75 | 6e 63 74 69 6f 6e 20 74 |neric fu|nction t|
|00004f80| 6f 20 73 65 74 75 70 20 | 74 68 65 20 62 6f 6f 74 |o setup |the boot|
|00004f90| 20 6c 6f 61 64 65 72 20 | 63 6f 6e 66 69 67 75 72 | loader |configur|
|00004fa0| 61 74 69 6f 6e 0a 09 23 | 20 66 6f 72 20 74 68 65 |ation..#| for the|
|00004fb0| 20 72 65 63 6f 76 65 72 | 79 20 70 61 72 74 69 74 | recover|y partit|
|00004fc0| 69 6f 6e 2e 20 54 68 65 | 20 73 65 6c 65 63 74 69 |ion. The| selecti|
|00004fd0| 6f 6e 20 6f 66 20 74 68 | 65 20 62 6f 6f 74 6c 6f |on of th|e bootlo|
|00004fe0| 61 64 65 72 0a 09 23 20 | 68 61 70 70 65 6e 73 20 |ader..# |happens |
|00004ff0| 61 63 63 6f 72 64 69 6e | 67 20 74 6f 20 74 68 65 |accordin|g to the|
|00005000| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 20 6f 66 | archite|cture of|
|00005010| 20 74 68 65 20 73 79 73 | 74 65 6d 0a 09 23 20 2d | the sys|tem..# -|
|00005020| 2d 2d 2d 0a 09 6c 6f 63 | 61 6c 20 61 72 63 68 3d |---..loc|al arch=|
|00005030| 60 75 6e 61 6d 65 20 2d | 6d 60 0a 09 6c 6f 63 61 |`uname -|m`..loca|
|00005040| 6c 20 70 61 72 61 3d 22 | 22 0a 09 77 68 69 6c 65 |l para="|"..while|
|00005050| 20 5b 20 24 23 20 2d 67 | 74 20 30 20 5d 3b 64 6f | [ $# -g|t 0 ];do|
|00005060| 0a 09 09 70 61 72 61 3d | 22 24 70 61 72 61 20 5c |...para=|"$para \|
|00005070| 22 24 31 5c 22 22 0a 09 | 09 73 68 69 66 74 0a 09 |"$1\""..|.shift..|
|00005080| 64 6f 6e 65 0a 09 69 66 | 20 5b 20 2d 7a 20 22 24 |done..if| [ -z "$|
|00005090| 6c 6f 61 64 65 72 22 20 | 5d 3b 74 68 65 6e 0a 09 |loader" |];then..|
|000050a0| 09 6c 6f 61 64 65 72 3d | 22 67 72 75 62 22 0a 09 |.loader=|"grub"..|
|000050b0| 66 69 0a 09 63 61 73 65 | 20 24 61 72 63 68 2d 24 |fi..case| $arch-$|
|000050c0| 6c 6f 61 64 65 72 20 69 | 6e 0a 09 09 69 2a 38 36 |loader i|n...i*86|
|000050d0| 2d 67 72 75 62 29 20 20 | 20 65 76 61 6c 20 73 65 |-grub) | eval se|
|000050e0| 74 75 70 42 6f 6f 74 4c | 6f 61 64 65 72 47 72 75 |tupBootL|oaderGru|
|000050f0| 62 52 65 63 6f 76 65 72 | 79 20 24 70 61 72 61 20 |bRecover|y $para |
|00005100| 3b 3b 0a 09 09 78 38 36 | 5f 36 34 2d 67 72 75 62 |;;...x86|_64-grub|
|00005110| 29 20 65 76 61 6c 20 73 | 65 74 75 70 42 6f 6f 74 |) eval s|etupBoot|
|00005120| 4c 6f 61 64 65 72 47 72 | 75 62 52 65 63 6f 76 65 |LoaderGr|ubRecove|
|00005130| 72 79 20 24 70 61 72 61 | 20 3b 3b 0a 09 09 2a 29 |ry $para| ;;...*)|
|00005140| 0a 09 09 73 79 73 74 65 | 6d 45 78 63 65 70 74 69 |...syste|mExcepti|
|00005150| 6f 6e 20 5c 0a 09 09 09 | 22 2a 2a 2a 20 62 6f 6f |on \....|"*** boo|
|00005160| 74 20 6c 6f 61 64 65 72 | 20 73 65 74 75 70 20 66 |t loader| setup f|
|00005170| 6f 72 20 24 61 72 63 68 | 2d 24 6c 6f 61 64 65 72 |or $arch|-$loader|
|00005180| 20 6e 6f 74 20 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | not imp|lemented|
|00005190| 20 2a 2a 2a 22 20 5c 0a | 09 09 22 72 65 62 6f 6f | ***" \.|.."reboo|
|000051a0| 74 22 0a 09 65 73 61 63 | 0a 7d 0a 23 3d 3d 3d 3d |t"..esac|.}.#====|
|000051b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000051c0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000051d0| 3d 3d 0a 23 20 73 65 74 | 75 70 42 6f 6f 74 4c 6f |==.# set|upBootLo|
|000051e0| 61 64 65 72 47 72 75 62 | 52 65 63 6f 76 65 72 79 |aderGrub|Recovery|
|000051f0| 0a 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|00005200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005210| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 66 75 6e 63 74 69 6f |--------|.functio|
|00005220| 6e 20 73 65 74 75 70 42 | 6f 6f 74 4c 6f 61 64 65 |n setupB|ootLoade|
|00005230| 72 47 72 75 62 52 65 63 | 6f 76 65 72 79 20 7b 0a |rGrubRec|overy {.|
|00005240| 09 23 20 2f 2e 2e 2e 2f | 0a 09 23 20 63 72 65 61 |.# /.../|..# crea|
|00005250| 74 65 20 6d 65 6e 75 2e | 6c 73 74 20 66 69 6c 65 |te menu.|lst file|
|00005260| 20 66 6f 72 20 74 68 65 | 20 72 65 63 6f 76 65 72 | for the| recover|
|00005270| 79 20 62 6f 6f 74 20 73 | 79 73 74 65 6d 0a 09 23 |y boot s|ystem..#|
|00005280| 20 2d 2d 2d 2d 0a 09 6c | 6f 63 61 6c 20 6d 6f 75 | ----..l|ocal mou|
|00005290| 6e 74 50 72 65 66 69 78 | 3d 24 31 20 20 23 20 6d |ntPrefix|=$1 # m|
|000052a0| 6f 75 6e 74 20 70 61 74 | 68 20 6f 66 20 74 68 65 |ount pat|h of the|
|000052b0| 20 69 6d 61 67 65 0a 09 | 6c 6f 63 61 6c 20 64 65 | image..|local de|
|000052c0| 73 74 73 50 72 65 66 69 | 78 3d 24 32 20 20 23 20 |stsPrefi|x=$2 # |
|000052d0| 62 61 73 65 20 64 69 72 | 20 66 6f 72 20 74 68 65 |base dir| for the|
|000052e0| 20 63 6f 6e 66 69 67 20 | 66 69 6c 65 73 0a 09 6c | config |files..l|
|000052f0| 6f 63 61 6c 20 67 66 69 | 78 3d 24 33 20 20 20 20 |ocal gfi|x=$3 |
|00005300| 20 20 20 20 20 23 20 67 | 72 75 62 20 74 69 74 6c | # g|rub titl|
|00005310| 65 0a 09 6c 6f 63 61 6c | 20 6d 65 6e 75 3d 24 64 |e..local| menu=$d|
|00005320| 65 73 74 73 50 72 65 66 | 69 78 2f 62 6f 6f 74 2f |estsPref|ix/boot/|
|00005330| 67 72 75 62 2f 6d 65 6e | 75 2e 6c 73 74 0a 09 6c |grub/men|u.lst..l|
|00005340| 6f 63 61 6c 20 6b 65 72 | 6e 65 6c 3d 22 22 0a 09 |ocal ker|nel=""..|
|00005350| 6c 6f 63 61 6c 20 69 6e | 69 74 72 64 3d 22 22 0a |local in|itrd="".|
|00005360| 09 6c 6f 63 61 6c 20 66 | 62 6d 6f 64 65 3d 24 76 |.local f|bmode=$v|
|00005370| 67 61 0a 09 6c 6f 63 61 | 6c 20 67 64 65 76 72 65 |ga..loca|l gdevre|
|00005380| 63 6f 3d 24 28 65 78 70 | 72 20 24 72 65 63 6f 69 |co=$(exp|r $recoi|
|00005390| 64 20 2d 20 31 29 0a 09 | 69 66 20 5b 20 2d 7a 20 |d - 1)..|if [ -z |
|000053a0| 22 24 66 62 6d 6f 64 65 | 22 20 5d 3b 74 68 65 6e |"$fbmode|" ];then|
|000053b0| 0a 09 09 66 62 6d 6f 64 | 65 3d 24 44 45 46 41 55 |...fbmod|e=$DEFAU|
|000053c0| 4c 54 5f 56 47 41 0a 09 | 66 69 0a 09 67 64 65 76 |LT_VGA..|fi..gdev|
|000053d0| 5f 72 65 63 6f 76 65 72 | 79 3d 22 28 68 64 30 2c |_recover|y="(hd0,|
|000053e0| 24 67 64 65 76 72 65 63 | 6f 29 22 0a 09 72 64 65 |$gdevrec|o)"..rde|
|000053f0| 76 5f 72 65 63 6f 76 65 | 72 79 3d 24 4f 45 4d 5f |v_recove|ry=$OEM_|
|00005400| 52 45 43 4f 56 45 52 59 | 0a 09 64 69 73 6b 42 79 |RECOVERY|..diskBy|
|00005410| 49 44 3d 60 67 65 74 44 | 69 73 6b 49 44 20 24 72 |ID=`getD|iskID $r|
|00005420| 64 65 76 5f 72 65 63 6f | 76 65 72 79 60 0a 09 23 |dev_reco|very`..#|
|00005430| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005440| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005450| 3d 3d 3d 3d 3d 3d 0a 09 | 23 20 69 6d 70 6f 72 74 |======..|# import|
|00005460| 20 67 72 75 62 20 73 74 | 61 67 65 73 20 69 6e 74 | grub st|ages int|
|00005470| 6f 20 72 65 63 6f 76 65 | 72 79 0a 09 23 2d 2d 2d |o recove|ry..#---|
|00005480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000054a0| 2d 2d 2d 0a 09 63 70 20 | 24 6d 6f 75 6e 74 50 72 |---..cp |$mountPr|
|000054b0| 65 66 69 78 2f 62 6f 6f | 74 2f 67 72 75 62 2f 73 |efix/boo|t/grub/s|
|000054c0| 74 61 67 65 31 20 24 64 | 65 73 74 73 50 72 65 66 |tage1 $d|estsPref|
|000054d0| 69 78 2f 62 6f 6f 74 2f | 67 72 75 62 0a 09 63 70 |ix/boot/|grub..cp|
|000054e0| 20 24 6d 6f 75 6e 74 50 | 72 65 66 69 78 2f 62 6f | $mountP|refix/bo|
|000054f0| 6f 74 2f 67 72 75 62 2f | 73 74 61 67 65 32 20 24 |ot/grub/|stage2 $|
|00005500| 64 65 73 74 73 50 72 65 | 66 69 78 2f 62 6f 6f 74 |destsPre|fix/boot|
|00005510| 2f 67 72 75 62 0a 09 23 | 3d 3d 3d 3d 3d 3d 3d 3d |/grub..#|========|
|00005520| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005530| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 09 |========|======..|
|00005540| 23 20 62 61 63 6b 75 70 | 20 63 75 72 72 65 6e 74 |# backup| current|
|00005550| 20 6d 65 6e 75 2e 6c 73 | 74 0a 09 23 2d 2d 2d 2d | menu.ls|t..#----|
|00005560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005580| 2d 2d 0a 09 6d 76 20 24 | 6d 65 6e 75 20 24 6d 65 |--..mv $|menu $me|
|00005590| 6e 75 2e 73 79 73 74 65 | 6d 0a 09 23 3d 3d 3d 3d |nu.syste|m..#====|
|000055a0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000055b0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000055c0| 3d 3d 0a 09 23 20 63 72 | 65 61 74 65 20 72 65 63 |==..# cr|eate rec|
|000055d0| 6f 76 65 72 79 20 6d 65 | 6e 75 2e 6c 73 74 0a 09 |overy me|nu.lst..|
|000055e0| 23 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |#-------|--------|
|000055f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005600| 2d 2d 2d 2d 2d 2d 2d 0a | 09 65 63 68 6f 20 22 74 |-------.|.echo "t|
|00005610| 69 6d 65 6f 75 74 20 33 | 30 22 20 3e 20 24 6d 65 |imeout 3|0" > $me|
|00005620| 6e 75 0a 09 65 63 68 6f | 20 22 67 66 78 6d 65 6e |nu..echo| "gfxmen|
|00005630| 75 20 24 67 64 65 76 5f | 72 65 63 6f 76 65 72 79 |u $gdev_|recovery|
|00005640| 2f 62 6f 6f 74 2f 6d 65 | 73 73 61 67 65 22 20 3e |/boot/me|ssage" >|
|00005650| 3e 20 24 6d 65 6e 75 0a | 09 6b 65 72 6e 65 6c 3d |> $menu.|.kernel=|
|00005660| 76 6d 6c 69 6e 75 7a 20 | 23 20 74 68 69 73 20 69 |vmlinuz |# this i|
|00005670| 73 20 61 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |s a copy| of the |
|00005680| 6b 69 77 69 20 6c 69 6e | 75 78 2e 76 6d 78 20 66 |kiwi lin|ux.vmx f|
|00005690| 69 6c 65 0a 09 69 6e 69 | 74 72 64 3d 69 6e 69 74 |ile..ini|trd=init|
|000056a0| 72 64 20 20 23 20 74 68 | 69 73 20 69 73 20 61 20 |rd # th|is is a |
|000056b0| 63 6f 70 79 20 6f 66 20 | 74 68 65 20 6b 69 77 69 |copy of |the kiwi|
|000056c0| 20 69 6e 69 74 72 64 2e | 76 6d 78 20 66 69 6c 65 | initrd.|vmx file|
|000056d0| 0a 09 23 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |..#=====|========|
|000056e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000056f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0a 09 23 20 63 72 65 |========|=..# cre|
|00005700| 61 74 65 20 72 65 63 6f | 76 65 72 79 20 65 6e 74 |ate reco|very ent|
|00005710| 72 79 0a 09 23 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ry..#---|--------|
|00005720| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005730| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 09 69 66 20 |--------|---..if |
|00005740| 5b 20 21 20 2d 7a 20 22 | 24 4f 45 4d 5f 52 45 43 |[ ! -z "|$OEM_REC|
|00005750| 4f 56 45 52 59 22 20 5d | 3b 74 68 65 6e 0a 09 09 |OVERY" ]|;then...|
|00005760| 23 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |#=======|========|
|00005770| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005780| 3d 3d 3d 3d 3d 3d 3d 0a | 09 09 23 20 4d 61 6b 65 |=======.|..# Make|
|00005790| 20 74 68 65 20 63 61 6e | 63 65 6c 20 6f 70 74 69 | the can|cel opti|
|000057a0| 6f 6e 20 64 65 66 61 75 | 6c 74 0a 09 09 23 2d 2d |on defau|lt...#--|
|000057b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000057d0| 2d 2d 2d 2d 0a 09 09 65 | 63 68 6f 20 22 64 65 66 |----...e|cho "def|
|000057e0| 61 75 6c 74 20 32 22 20 | 20 20 20 20 20 20 20 20 |ault 2" | |
|000057f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005800| 20 20 20 20 20 20 20 20 | 20 3e 3e 20 24 6d 65 6e | | >> $men|
|00005810| 75 0a 09 09 23 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |u...#===|========|
|00005820| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005830| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 09 09 23 20 |========|===...# |
|00005840| 52 65 63 6f 76 65 72 79 | 0a 09 09 23 2d 2d 2d 2d |Recovery|...#----|
|00005850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005870| 2d 2d 0a 09 09 74 69 74 | 6c 65 3d 24 28 6d 61 6b |--...tit|le=$(mak|
|00005880| 65 4c 61 62 65 6c 20 22 | 52 65 63 6f 76 65 72 2f |eLabel "|Recover/|
|00005890| 52 65 70 61 69 72 20 53 | 79 73 74 65 6d 22 29 0a |Repair S|ystem").|
|000058a0| 09 09 65 63 68 6f 20 22 | 74 69 74 6c 65 20 24 74 |..echo "|title $t|
|000058b0| 69 74 6c 65 22 20 20 20 | 20 20 20 20 20 20 20 20 |itle" | |
|000058c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058d0| 20 20 20 20 3e 3e 20 24 | 6d 65 6e 75 0a 09 09 69 | >> $|menu...i|
|000058e0| 66 20 78 65 6e 53 65 72 | 76 65 72 3b 74 68 65 6e |f xenSer|ver;then|
|000058f0| 0a 09 09 09 65 63 68 6f | 20 22 20 72 6f 6f 74 20 |....echo| " root |
|00005900| 24 67 64 65 76 5f 72 65 | 63 6f 76 65 72 79 22 20 |$gdev_re|covery" |
|00005910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005920| 20 20 3e 3e 20 24 6d 65 | 6e 75 0a 09 09 09 65 63 | >> $me|nu....ec|
|00005930| 68 6f 20 22 20 6b 65 72 | 6e 65 6c 20 2f 62 6f 6f |ho " ker|nel /boo|
|00005940| 74 2f 78 65 6e 2e 67 7a | 22 20 20 20 20 20 20 20 |t/xen.gz|" |
|00005950| 20 20 20 20 20 20 20 20 | 20 20 20 20 3e 3e 20 24 | | >> $|
|00005960| 6d 65 6e 75 0a 09 09 09 | 65 63 68 6f 20 2d 6e 20 |menu....|echo -n |
|00005970| 22 20 6d 6f 64 75 6c 65 | 20 2f 62 6f 6f 74 2f 24 |" module| /boot/$|
|00005980| 6b 65 72 6e 65 6c 22 20 | 20 20 20 20 20 20 20 20 |kernel" | |
|00005990| 20 20 20 20 20 20 3e 3e | 20 24 6d 65 6e 75 0a 09 | >>| $menu..|
|000059a0| 09 09 65 63 68 6f 20 2d | 6e 20 22 20 72 6f 6f 74 |..echo -|n " root|
|000059b0| 3d 24 64 69 73 6b 42 79 | 49 44 20 24 63 6f 6e 73 |=$diskBy|ID $cons|
|000059c0| 6f 6c 65 22 20 20 20 20 | 20 20 20 20 20 20 20 20 |ole" | |
|000059d0| 3e 3e 20 24 6d 65 6e 75 | 0a 09 09 09 65 63 68 6f |>> $menu|....echo|
|000059e0| 20 2d 6e 20 22 20 76 67 | 61 3d 24 66 62 6d 6f 64 | -n " vg|a=$fbmod|
|000059f0| 65 20 73 70 6c 61 73 68 | 3d 73 69 6c 65 6e 74 22 |e splash|=silent"|
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 3e 3e 20 24 6d 65 | | >> $me|
|00005a10| 6e 75 0a 09 09 09 65 63 | 68 6f 20 2d 6e 20 22 20 |nu....ec|ho -n " |
|00005a20| 24 4b 49 57 49 5f 49 4e | 49 54 52 44 5f 50 41 52 |$KIWI_IN|ITRD_PAR|
|00005a30| 41 4d 53 22 20 20 20 20 | 20 20 20 20 20 20 20 20 |AMS" | |
|00005a40| 20 20 20 20 3e 3e 20 24 | 6d 65 6e 75 0a 09 09 09 | >> $|menu....|
|00005a50| 65 63 68 6f 20 2d 6e 20 | 22 20 24 4b 49 57 49 5f |echo -n |" $KIWI_|
|00005a60| 4b 45 52 4e 45 4c 5f 4f | 50 54 49 4f 4e 53 22 20 |KERNEL_O|PTIONS" |
|00005a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3e 3e | | >>|
|00005a80| 20 24 6d 65 6e 75 0a 09 | 09 09 65 63 68 6f 20 22 | $menu..|..echo "|
|00005a90| 20 4b 49 57 49 5f 52 45 | 43 4f 56 45 52 59 3d 24 | KIWI_RE|COVERY=$|
|00005aa0| 72 65 63 6f 69 64 20 73 | 68 6f 77 6f 70 74 73 22 |recoid s|howopts"|
|00005ab0| 20 20 20 20 20 20 20 20 | 3e 3e 20 24 6d 65 6e 75 | |>> $menu|
|00005ac0| 0a 09 09 09 65 63 68 6f | 20 22 20 6d 6f 64 75 6c |....echo| " modul|
|00005ad0| 65 20 2f 62 6f 6f 74 2f | 24 69 6e 69 74 72 64 22 |e /boot/|$initrd"|
|00005ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005af0| 20 20 3e 3e 20 24 6d 65 | 6e 75 0a 09 09 65 6c 73 | >> $me|nu...els|
|00005b00| 65 0a 09 09 09 65 63 68 | 6f 20 2d 6e 20 22 20 6b |e....ech|o -n " k|
|00005b10| 65 72 6e 65 6c 20 24 67 | 64 65 76 5f 72 65 63 6f |ernel $g|dev_reco|
|00005b20| 76 65 72 79 2f 62 6f 6f | 74 2f 24 6b 65 72 6e 65 |very/boo|t/$kerne|
|00005b30| 6c 22 20 3e 3e 20 24 6d | 65 6e 75 0a 09 09 09 65 |l" >> $m|enu....e|
|00005b40| 63 68 6f 20 2d 6e 20 22 | 20 72 6f 6f 74 3d 24 64 |cho -n "| root=$d|
|00005b50| 69 73 6b 42 79 49 44 20 | 24 63 6f 6e 73 6f 6c 65 |iskByID |$console|
|00005b60| 22 20 20 20 20 20 20 20 | 20 20 20 20 20 3e 3e 20 |" | >> |
|00005b70| 24 6d 65 6e 75 0a 09 09 | 09 65 63 68 6f 20 2d 6e |$menu...|.echo -n|
|00005b80| 20 22 20 76 67 61 3d 24 | 66 62 6d 6f 64 65 20 73 | " vga=$|fbmode s|
|00005b90| 70 6c 61 73 68 3d 73 69 | 6c 65 6e 74 22 20 20 20 |plash=si|lent" |
|00005ba0| 20 20 20 20 20 20 20 3e | 3e 20 24 6d 65 6e 75 0a | >|> $menu.|
|00005bb0| 09 09 09 65 63 68 6f 20 | 2d 6e 20 22 20 24 4b 49 |...echo |-n " $KI|
|00005bc0| 57 49 5f 49 4e 49 54 52 | 44 5f 50 41 52 41 4d 53 |WI_INITR|D_PARAMS|
|00005bd0| 22 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |" | |
|00005be0| 20 3e 3e 20 24 6d 65 6e | 75 0a 09 09 09 65 63 68 | >> $men|u....ech|
|00005bf0| 6f 20 2d 6e 20 22 20 24 | 4b 49 57 49 5f 4b 45 52 |o -n " $|KIWI_KER|
|00005c00| 4e 45 4c 5f 4f 50 54 49 | 4f 4e 53 22 20 20 20 20 |NEL_OPTI|ONS" |
|00005c10| 20 20 20 20 20 20 20 20 | 20 20 20 3e 3e 20 24 6d | | >> $m|
|00005c20| 65 6e 75 0a 09 09 09 65 | 63 68 6f 20 22 20 4b 49 |enu....e|cho " KI|
|00005c30| 57 49 5f 52 45 43 4f 56 | 45 52 59 3d 24 72 65 63 |WI_RECOV|ERY=$rec|
|00005c40| 6f 69 64 20 73 68 6f 77 | 6f 70 74 73 22 20 20 20 |oid show|opts" |
|00005c50| 20 20 20 20 20 3e 3e 20 | 24 6d 65 6e 75 0a 09 09 | >> |$menu...|
|00005c60| 09 65 63 68 6f 20 22 20 | 69 6e 69 74 72 64 20 24 |.echo " |initrd $|
|00005c70| 67 64 65 76 5f 72 65 63 | 6f 76 65 72 79 2f 62 6f |gdev_rec|overy/bo|
|00005c80| 6f 74 2f 24 69 6e 69 74 | 72 64 22 20 20 20 20 3e |ot/$init|rd" >|
|00005c90| 3e 20 24 6d 65 6e 75 0a | 09 09 66 69 0a 09 09 23 |> $menu.|..fi...#|
|00005ca0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005cb0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00005cc0| 3d 3d 3d 3d 3d 3d 0a 09 | 09 23 20 52 65 73 74 6f |======..|.# Resto|
|00005cd0| 72 65 0a 09 09 23 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |re...#--|--------|
|00005ce0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005cf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 09 09 74 |--------|----...t|
|00005d00| 69 74 6c 65 3d 24 28 6d | 61 6b 65 4c 61 62 65 6c |itle=$(m|akeLabel|
|00005d10| 20 22 52 65 73 74 6f 72 | 65 20 46 61 63 74 6f 72 | "Restor|e Factor|
|00005d20| 79 20 53 79 73 74 65 6d | 22 29 0a 09 09 65 63 68 |y System|")...ech|
|00005d30| 6f 20 22 74 69 74 6c 65 | 20 24 74 69 74 6c 65 22 |o "title| $title"|
|00005d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3e | | >|
|00005d60| 3e 20 24 6d 65 6e 75 0a | 09 09 69 66 20 78 65 6e |> $menu.|..if xen|
|00005d70| 53 65 72 76 65 72 3b 74 | 68 65 6e 0a 09 09 09 65 |Server;t|hen....e|
|00005d80| 63 68 6f 20 22 20 72 6f | 6f 74 20 24 67 64 65 76 |cho " ro|ot $gdev|
|00005d90| 5f 72 65 63 6f 76 65 72 | 79 22 20 20 20 20 20 20 |_recover|y" |
|00005da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3e 3e 20 | | >> |
|00005db0| 24 6d 65 6e 75 0a 09 09 | 09 65 63 68 6f 20 22 20 |$menu...|.echo " |
|00005dc0| 6b 65 72 6e 65 6c 20 2f | 62 6f 6f 74 2f 78 65 6e |kernel /|boot/xen|
|00005dd0| 2e 67 7a 22 20 20 20 20 | 20 20 20 20 20 20 20 20 |.gz" | |
|00005de0| 20 20 20 20 20 20 20 3e | 3e 20 24 6d 65 6e 75 0a | >|> $menu.|
|00005df0| 09 09 09 65 63 68 6f 20 | 2d 6e 20 22 20 6d 6f 64 |...echo |-n " mod|
|00005e00| 75 6c 65 20 2f 62 6f 6f | 74 2f 24 6b 65 72 6e 65 |ule /boo|t/$kerne|
|00005e10| 6c 22 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |l" | |
|00005e20| 20 3e 3e 20 24 6d 65 6e | 75 0a 09 09 09 65 63 68 | >> $men|u....ech|
|00005e30| 6f 20 2d 6e 20 22 20 72 | 6f 6f 74 3d 24 64 69 73 |o -n " r|oot=$dis|
|00005e40| 6b 42 79 49 44 20 24 63 | 6f 6e 73 6f 6c 65 22 20 |kByID $c|onsole" |
|00005e50| 20 20 20 20 20 20 20 20 | 20 20 20 3e 3e 20 24 6d | | >> $m|
|00005e60| 65 6e 75 0a 09 09 09 65 | 63 68 6f 20 2d 6e 20 22 |enu....e|cho -n "|
|00005e70| 20 76 67 61 3d 24 66 62 | 6d 6f 64 65 20 73 70 6c | vga=$fb|mode spl|
|00005e80| 61 73 68 3d 73 69 6c 65 | 6e 74 22 20 20 20 20 20 |ash=sile|nt" |
|00005e90| 20 20 20 20 20 3e 3e 20 | 24 6d 65 6e 75 0a 09 09 | >> |$menu...|
|00005ea0| 09 65 63 68 6f 20 2d 6e | 20 22 20 24 4b 49 57 49 |.echo -n| " $KIWI|
|00005eb0| 5f 49 4e 49 54 52 44 5f | 50 41 52 41 4d 53 22 20 |_INITRD_|PARAMS" |
|00005ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3e | | >|
|00005ed0| 3e 20 24 6d 65 6e 75 0a | 09 09 09 65 63 68 6f 20 |> $menu.|...echo |
|00005ee0| 2d 6e 20 22 20 24 4b 49 | 57 49 5f 4b 45 52 4e 45 |-n " $KI|WI_KERNE|
|00005ef0| 4c 5f 4f 50 54 49 4f 4e | 53 22 20 20 20 20 20 20 |L_OPTION|S" |
|00005f00| 20 20 20 20 20 20 20 20 | 20 3e 3e 20 24 6d 65 6e | | >> $men|
|00005f10| 75 0a 09 09 09 65 63 68 | 6f 20 22 20 4b 49 57 49 |u....ech|o " KIWI|
|00005f20| 5f 52 45 43 4f 56 45 52 | 59 3d 24 72 65 63 6f 69 |_RECOVER|Y=$recoi|
|00005f30| 64 20 73 68 6f 77 6f 70 | 74 73 22 20 20 20 20 20 |d showop|ts" |
|00005f40| 20 20 20 3e 3e 20 24 6d | 65 6e 75 0a 09 09 09 65 | >> $m|enu....e|
|00005f50| 63 68 6f 20 22 20 6d 6f | 64 75 6c 65 20 2f 62 6f |cho " mo|dule /bo|
|00005f60| 6f 74 2f 24 69 6e 69 74 | 72 64 22 20 20 20 20 20 |ot/$init|rd" |
|00005f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3e 3e 20 | | >> |
|00005f80| 24 6d 65 6e 75 0a 09 09 | 65 6c 73 65 0a 09 09 09 |$menu...|else....|
|00005f90| 65 63 68 6f 20 2d 6e 20 | 22 20 6b 65 72 6e 65 6c |echo -n |" kernel|
|00005fa0| 20 24 67 64 65 76 5f 72 | 65 63 6f 76 65 72 79 2f | $gdev_r|ecovery/|
|00005fb0| 62 6f 6f 74 2f 24 6b 65 | 72 6e 65 6c 22 20 3e 3e |boot/$ke|rnel" >>|
|00005fc0| 20 24 6d 65 6e 75 0a 09 | 09 09 65 63 68 6f 20 2d | $menu..|..echo -|
|00005fd0| 6e 20 22 20 72 6f 6f 74 | 3d 24 64 69 73 6b 42 79 |n " root|=$diskBy|
|00005fe0| 49 44 20 24 63 6f 6e 73 | 6f 6c 65 22 20 20 20 20 |ID $cons|ole" |
|00005ff0| 20 20 20 20 20 20 20 20 | 3e 3e 20 24 6d 65 6e 75 | |>> $menu|
|00006000| 0a 09 09 09 65 63 68 6f | 20 2d 6e 20 22 20 76 67 |....echo| -n " vg|
|00006010| 61 3d 24 66 62 6d 6f 64 | 65 20 73 70 6c 61 73 68 |a=$fbmod|e splash|
|00006020| 3d 73 69 6c 65 6e 74 22 | 20 20 20 20 20 20 20 20 |=silent"| |
|00006030| 20 20 3e 3e 20 24 6d 65 | 6e 75 0a 09 09 09 65 63 | >> $me|nu....ec|
|00006040| 68 6f 20 2d 6e 20 22 20 | 24 4b 49 57 49 5f 49 4e |ho -n " |$KIWI_IN|
|00006050| 49 54 52 44 5f 50 41 52 | 41 4d 53 22 20 20 20 20 |ITRD_PAR|AMS" |
|00006060| 20 20 20 20 20 20 20 20 | 20 20 20 20 3e 3e 20 24 | | >> $|
|00006070| 6d 65 6e 75 0a 09 09 09 | 65 63 68 6f 20 2d 6e 20 |menu....|echo -n |
|00006080| 22 20 24 4b 49 57 49 5f | 4b 45 52 4e 45 4c 5f 4f |" $KIWI_|KERNEL_O|
|00006090| 50 54 49 4f 4e 53 22 20 | 20 20 20 20 20 20 20 20 |PTIONS" | |
|000060a0| 20 20 20 20 20 20 3e 3e | 20 24 6d 65 6e 75 0a 09 | >>| $menu..|
|000060b0| 09 09 65 63 68 6f 20 2d | 6e 20 22 20 4b 49 57 49 |..echo -|n " KIWI|
|000060c0| 5f 52 45 43 4f 56 45 52 | 59 3d 24 72 65 63 6f 69 |_RECOVER|Y=$recoi|
|000060d0| 64 20 52 45 53 54 4f 52 | 45 3d 31 22 20 20 20 20 |d RESTOR|E=1" |
|000060e0| 3e 3e 20 24 6d 65 6e 75 | 0a 09 09 09 65 63 68 6f |>> $menu|....echo|
|000060f0| 20 22 20 73 68 6f 77 6f | 70 74 73 22 20 20 20 20 | " showo|pts" |
|00006100| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006110| 20 20 20 20 20 20 20 20 | 20 20 3e 3e 20 24 6d 65 | | >> $me|
|00006120| 6e 75 0a 09 09 09 65 63 | 68 6f 20 22 20 69 6e 69 |nu....ec|ho " ini|
|00006130| 74 72 64 20 24 67 64 65 | 76 5f 72 65 63 6f 76 65 |trd $gde|v_recove|
|00006140| 72 79 2f 62 6f 6f 74 2f | 24 69 6e 69 74 72 64 22 |ry/boot/|$initrd"|
|00006150| 20 20 20 20 3e 3e 20 24 | 6d 65 6e 75 0a 09 09 66 | >> $|menu...f|
|00006160| 69 0a 09 09 23 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |i...#===|========|
|00006170| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006180| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0a 09 09 23 20 |========|===...# |
|00006190| 52 65 62 6f 6f 74 0a 09 | 09 23 2d 2d 2d 2d 2d 2d |Reboot..|.#------|
|000061a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000061b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000061c0| 0a 09 09 74 69 74 6c 65 | 3d 24 28 6d 61 6b 65 4c |...title|=$(makeL|
|000061d0| 61 62 65 6c 20 22 43 61 | 6e 63 65 6c 2f 52 65 62 |abel "Ca|ncel/Reb|
|000061e0| 6f 6f 74 22 29 0a 09 09 | 65 63 68 6f 20 22 74 69 |oot")...|echo "ti|
|000061f0| 74 6c 65 20 24 74 69 74 | 6c 65 22 20 20 20 20 20 |tle $tit|le" |
|00006200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006210| 20 20 20 20 20 20 20 20 | 20 20 3e 3e 20 24 6d 65 | | >> $me|
|00006220| 6e 75 0a 09 09 65 63 68 | 6f 20 22 20 72 65 62 6f |nu...ech|o " rebo|
|00006230| 6f 74 22 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ot" | |
|00006240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006250| 20 20 20 20 20 20 20 3e | 3e 20 24 6d 65 6e 75 0a | >|> $menu.|
|00006260| 09 66 69 0a 7d 0a 23 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.fi.}.#=|========|
|00006270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00006280| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 0a 23 20 |========|=====.# |
|00006290| 73 65 74 75 70 42 6f 6f | 74 4c 6f 61 64 65 72 53 |setupBoo|tLoaderS|
|000062a0| 79 73 6c 69 6e 75 78 0a | 23 2d 2d 2d 2d 2d 2d 2d |yslinux.|#-------|
|000062b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000062c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|000062d0| 66 75 6e 63 74 69 6f 6e | 20 73 65 74 75 70 42 6f |function| setupBo|
|000062e0| 6f 74 4c 6f 61 64 65 72 | 53 79 73 6c 69 6e 75 78 |otLoader|Syslinux|
|000062f0| 20 7b 0a 09 23 20 2f 2e | 2e 2e 2f 0a 09 23 20 63 | {..# /.|../..# c|
|00006300| 72 65 61 74 65 20 73 79 | 73 6c 69 6e 75 78 2e 63 |reate sy|slinux.c|
|00006310| 66 67 20 75 73 65 64 20 | 66 6f 72 20 74 68 65 0a |fg used |for the.|
|00006320| 09 23 20 73 79 73 6c 69 | 6e 75 78 20 62 6f 6f 74 |.# sysli|nux boot|
|00006330| 6c 6f 61 64 65 72 0a 09 | 23 20 2d 2d 2d 2d 0a 09 |loader..|# ----..|
|00006340| 6c 6f 63 61 6c 20 6d 6f | 75 6e 74 50 72 65 66 69 |local mo|untPrefi|
|00006350| 78 3d 24 31 20 20 23 20 | 6d 6f 75 6e 74 20 70 61 |x=$1 # |mount pa|
|00006360| 74 68 20 6f 66 20 74 68 | 65 20 69 6d 61 67 65 0a |th of th|e image.|
|00006370| 09 6c 6f 63 61 6c 20 64 | 65 73 74 73 50 72 65 66 |.local d|estsPref|
|00006380| 69 78 3d 24 32 20 20 23 | 20 62 61 73 65 20 64 69 |ix=$2 #| base di|
|00006390| 72 20 66 6f 72 20 74 68 | 65 20 63 6f 6e 66 69 67 |r for th|e config|
|000063a0| 20 66 69 6c 65 73 0a 09 | 6c 6f 63 61 6c 20 67 6e | files..|local gn|
|000063b0| 75 6d 3d 24 33 20 20 20 | 20 20 20 20 20 20 23 20 |um=$3 | # |
|000063c0| 62 6f 6f 74 20 70 61 72 | 74 69 74 69 6f 6e 20 49 |boot par|tition I|
|000063d0| 44 0a 09 6c 6f 63 61 6c | 20 72 64 65 76 3d 24 34 |D..local| rdev=$4|
|000063e0| 20 20 20 20 20 20 20 20 | 20 23 20 72 6f 6f 74 20 | | # root |
|000063f0| 70 61 72 74 69 74 69 6f | 6e 0a 09 6c 6f 63 61 6c |partitio|n..local|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.