./REMOVE000755 000000 000000 00000001502 14367774543 010326 0ustar00000000 000000 #!/bin/sh # # Generic INSTALL/REMOVE script. Arguments passed to this script: # # $1 = ACTION [pre/post] # $2 = PKGNAME # $3 = VERSION # $4 = UPDATE [yes/no] # $5 = CONF_FILE (path to xbps.conf) # $6 = ARCH (uname -m) # # Note that paths must be relative to CWD, to avoid calling # host commands if /bin/sh (dash) is not installed and it's # not possible to chroot(2). # export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TRIGGERSDIR="./usr/libexec/xbps-triggers" ACTION="$1" PKGNAME="$2" VERSION="$3" UPDATE="$4" CONF_FILE="$5" ARCH="$6" # # The following code will run the triggers. # export make_dirs="/etc/runit/runsvdir/66 0750 root root" case "${ACTION}" in pre) ;; post) ${TRIGGERSDIR}/mkdirs run post-remove ${PKGNAME} ${VERSION} ${UPDATE} ${CONF_FILE} [ $? -ne 0 ] && exit $? ;; esac exit 0 ./INSTALL000755 000000 000000 00000001503 14367774543 010440 0ustar00000000 000000 #!/bin/sh # # Generic INSTALL/REMOVE script. Arguments passed to this script: # # $1 = ACTION [pre/post] # $2 = PKGNAME # $3 = VERSION # $4 = UPDATE [yes/no] # $5 = CONF_FILE (path to xbps.conf) # $6 = ARCH (uname -m) # # Note that paths must be relative to CWD, to avoid calling # host commands if /bin/sh (dash) is not installed and it's # not possible to chroot(2). # export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" TRIGGERSDIR="./usr/libexec/xbps-triggers" ACTION="$1" PKGNAME="$2" VERSION="$3" UPDATE="$4" CONF_FILE="$5" ARCH="$6" # # The following code will run the triggers. # export make_dirs="/etc/runit/runsvdir/66 0750 root root" case "${ACTION}" in pre) ;; post) ${TRIGGERSDIR}/mkdirs run post-install ${PKGNAME} ${VERSION} ${UPDATE} ${CONF_FILE} [ $? -ne 0 ] && exit $? ;; esac exit 0 ./props.plist000644 000000 000000 00000002311 00000000000 013347 0ustar00rootroot000000 000000 architecture aarch64 conf_files /etc/66/rc.local homepage https://git.obarun.org/obmods/boot-66serv install-msg UGxlYXNlIHJlLWVuYWJsZSB0aGUgYm9vdEBzeXN0ZW0gc2VydmljZSBhZnRlciBhbiB1cGRhdGUsCmJ5IHJ1bm5pbmcgJzY2LWVuYWJsZSAtdCBib290IC1GIGJvb3RAc3lzdGVtIi4K installed_size 101806 license 0BSD, BSD-2-Clause maintainer mobinmob <mobinmob@disroot.org> pkgname boot-66serv pkgver boot-66serv-2.4.1.20230205_1 run_depends 66-tools>=0 66>=0 awk>=0 s6-linux-utils>=0 s6-portable-utils>=0 short_desc Stage 1 boot for 66 version 2.4.1.20230205_1 ./files.plist000644 000000 000000 00000061102 00000000000 013311 0ustar00rootroot000000 000000 conf_files file /etc/66/rc.local mtime 1675622755 sha256 3dcfbb255b87daa65a8d19fbb0df4ee1b2f1f437cfc21b19c3a225a5fd79c6fa size 615 dirs file /etc file /etc/66 file /etc/runit file /etc/runit/core-services file /usr file /usr/bin file /usr/share file /usr/share/66 file /usr/share/66/module file /usr/share/66/module/boot@ file /usr/share/66/module/boot@/configure file /usr/share/66/module/boot@/service file /usr/share/66/module/boot@/service/local file /usr/share/66/module/boot@/service/local/firewall file /usr/share/66/module/boot@/service/mount file /usr/share/66/module/boot@/service/mount/populate file /usr/share/66/module/boot@/service/system file /usr/share/66/module/boot@/service/system/devices file /usr/share/66/module/boot@/service/system/modules file /usr/share/66/module/boot@/service/system/udev file /usr/share/66/module/boot@/service@ file /usr/share/66/script file /usr/share/66/service file /usr/share/doc file /usr/share/doc/boot-66serv file /usr/share/licenses file /usr/share/licenses/boot-66serv file /usr/share/man file /usr/share/man/man1 files file /etc/runit/core-services/99-switch-initutils.sh mtime 1675622755 sha256 a7212abeb506f6036df16b200effd32dfd4b97aa53f03cc09dfd8aec6b5359b6 size 537 file /usr/bin/66 mtime 1675622755 sha256 fe170ee59c4f9f0a86c46d091dd365b65a7b0af398ec1d08662ce2efa736325f size 59 file /usr/bin/66boot-initial-setup mtime 1675622755 sha256 eb9e72c7bc69370f858b12ce567c05e7931074626f47c4de0ac007974b2c56eb size 2522 file /usr/bin/66boot-rcdotconf mtime 1675622755 sha256 9119846326ebba9bb497b54bdb94ccb9261bd218027aa51dc77c47e5addc306d size 3050 file /usr/bin/66boot-storage-autoconf mtime 1675622755 sha256 8677619e1e2a0d5f9d0ab5c1bd34622435b90ae7b3c5c9618c4f99e61c9c4b90 size 6469 file /usr/share/66/module/boot@/configure/configure mtime 1675622755 sha256 56b6d61ff093066c7b8dd297831b58e5184a17d338d790d2c94b0bec09fdece3 size 16121 file /usr/share/66/module/boot@/service/All mtime 1675622755 sha256 13a01784cbe98ec56440a017d648480703b6a827a641ee3c90854832a6b06762 size 169 file /usr/share/66/module/boot@/service/all-Local mtime 1675622755 sha256 25fbffc8c163ce7a4aaa15a0d36c857d9bf269f2034115764e9ccdb4ec626761 size 305 file /usr/share/66/module/boot@/service/all-Mount mtime 1675622755 sha256 a8dc2b8fa2279639ebc0426a12b6466c15989fe397806b3fbd0abafa8bf5bab1 size 119 file /usr/share/66/module/boot@/service/all-Runtime mtime 1675622755 sha256 5c9f0ca071204d046d9894a3ee99539d2ac55a6d98ea4149bc9106501d838941 size 1080 file /usr/share/66/module/boot@/service/all-System mtime 1675622755 sha256 4688c07ac79baec38e7da8443f4976f44d73130f268981bbfa8e7676be68dd11 size 253 file /usr/share/66/module/boot@/service/local/firewall/local-arptables mtime 1675622755 sha256 a608a5967b9150463baf53fa0e8267bf0e8c0a26a537c56f10bbd48b73f8af42 size 621 file /usr/share/66/module/boot@/service/local/firewall/local-ebtables mtime 1675622755 sha256 4f565d440374ff8ad6ab4ea7c24673ea788870fd8032ac48fb5cc5da381d9061 size 613 file /usr/share/66/module/boot@/service/local/firewall/local-ip6tables mtime 1675622755 sha256 179bd694f4c88497f3b5021d0249b4d974b530a0f3911b5bbf4f24e01cfec33f size 718 file /usr/share/66/module/boot@/service/local/firewall/local-iptables mtime 1675622755 sha256 5c050e23c3836baf84cf84ca1715a85ecc4cd722c8492d3cec3e72a5679255f6 size 937 file /usr/share/66/module/boot@/service/local/firewall/local-nftables mtime 1675622755 sha256 0b596fa11fd27832d486d5d2c224b6f586700bfe58d8099e7794931f3ae0c23e size 604 file /usr/share/66/module/boot@/service/local/local-authfiles mtime 1675622755 sha256 f648645f85efcfb2dba3dfd4536bcbaac2a0dd2ac3c98ce65c1a688095838db5 size 793 file /usr/share/66/module/boot@/service/local/local-dmesg mtime 1675622755 sha256 2fc4440e793d7e8444b6aaf7a9b5dea47d14d500df6b5b3b712dcfb8f0b6be77 size 605 file /usr/share/66/module/boot@/service/local/local-loop mtime 1675622755 sha256 b2eba20ecba6ad426d33cad8a2db0451e09f5b7316f97624d63ef63b40f1ce2d size 412 file /usr/share/66/module/boot@/service/local/local-rc mtime 1675622755 sha256 7869458b598dcaa46d60a06026e017ae0c86aed831660321a1579715ea20e846 size 520 file /usr/share/66/module/boot@/service/local/local-sethostname mtime 1675622755 sha256 c7818ba781758537695bfa5eb48c32b038604092d91b1b381b1c475f33990e15 size 557 file /usr/share/66/module/boot@/service/local/local-time mtime 1675622755 sha256 c3586935b50dab7aa4760b5080b5603db8797ecb9e40393fe3f49db0a8ee6f83 size 430 file /usr/share/66/module/boot@/service/mount/00 mtime 1675622755 sha256 a9e62b31ebc1c3b880975dc2316f61a2b70f5b2f5b1a5bc95fbeb850d5d6a190 size 281 file /usr/share/66/module/boot@/service/mount/mount-cgroups mtime 1675622755 sha256 f26a5f3a99d1b99800257e997e37519921898160ac1f973de8b068f3af1bf707 size 956 file /usr/share/66/module/boot@/service/mount/mount-dev mtime 1675622755 sha256 45e8326a573152b7df13103c527f6b88dcfb181b215960aedbb88c19dbeec300 size 429 file /usr/share/66/module/boot@/service/mount/mount-fstab mtime 1675622755 sha256 83eb80736f7e3451a1cad76e0e262f8fb8ea340dd163cfef40dffa395982e04c size 341 file /usr/share/66/module/boot@/service/mount/mount-netfs mtime 1675622755 sha256 db9ccffa19bc9e49901f685ea6fde89ea0e085bf2e2f6207f04d2d7671cd692a size 382 file /usr/share/66/module/boot@/service/mount/mount-proc mtime 1675622755 sha256 d99f214733cc5ba49c81226d3e1c50325923beb8b9f0283f7b664058047f8f28 size 408 file /usr/share/66/module/boot@/service/mount/mount-pts mtime 1675622755 sha256 e42e15ad89b3fb05fe5671679f68e1402718b565b91e7ba934119cf787a773e7 size 663 file /usr/share/66/module/boot@/service/mount/mount-run mtime 1675622755 sha256 f05a60cf35ded766985809984a43483de6f053f406ea6bc6de86602d1de17dda size 407 file /usr/share/66/module/boot@/service/mount/mount-rw mtime 1675622755 sha256 beb955d7353bb600c7cf3b354e9b223ed72ef1d47a7ef50af1729067ce2b89df size 399 file /usr/share/66/module/boot@/service/mount/mount-shm mtime 1675622755 sha256 4b47ce0eaf5a88ac15ee067708aa40cd78939e0439be6f172b58014407d2c3d3 size 652 file /usr/share/66/module/boot@/service/mount/mount-swap mtime 1675622755 sha256 c946bdaed7decdddd9efa8a9eb6aab8e0d2eb2e224ee006c0dbec6735e6834c6 size 538 file /usr/share/66/module/boot@/service/mount/mount-sys mtime 1675622755 sha256 538554d5c1bea1e065fde4a9aa2d6c5d801962bfa59fa51e86af26558fea8412 size 430 file /usr/share/66/module/boot@/service/mount/mount-tmp mtime 1675622755 sha256 482d02b224058a19b0fb5cc2c30ec1aeb418a822a697f00f519e99ed860e8ea4 size 610 file /usr/share/66/module/boot@/service/mount/populate/populate-dev mtime 1675622755 sha256 b313b7e81f70ac5b6f339b4387b305cd10c763ec8b4263beefc19d3adf1fde95 size 1032 file /usr/share/66/module/boot@/service/mount/populate/populate-run mtime 1675622755 sha256 0304cb461dcc44c2dab7b0c6bf65d458d79bee855ddc90374ddfa8094a167b62 size 514 file /usr/share/66/module/boot@/service/mount/populate/populate-sys mtime 1675622755 sha256 d30dc38151fcc1818daa737358d155cce0d18f468f4616f83121aeb7b6b63196 size 1828 file /usr/share/66/module/boot@/service/mount/populate/populate-tmp mtime 1675622755 sha256 f9ac46b4ed6e236f349386b81beedd648ea84fa0b17b24b32f72e3b14b19f882 size 402 file /usr/share/66/module/boot@/service/system/devices/devices-btrfs mtime 1675622755 sha256 560ff6aa996bbb8ce5908b23a35e2da96955768f969c0ee82325c5854c91c14a size 666 file /usr/share/66/module/boot@/service/system/devices/devices-crypttab mtime 1675622755 sha256 36629c2f33d5975b6a59f269afff0a7b0932f9d7946e3436bd0be6a95e41db04 size 1297 file /usr/share/66/module/boot@/service/system/devices/devices-dmraid mtime 1675622755 sha256 3cbd0f09ee8c9f02060c5731351a3958859039bafb02effd4cc56dac1b8b198f size 500 file /usr/share/66/module/boot@/service/system/devices/devices-lvm mtime 1675622755 sha256 91388c5850d57aca46f771336f022ab4b0832b09b4a8de8f80495285f84bb710 size 698 file /usr/share/66/module/boot@/service/system/devices/devices-mdraid mtime 1675622755 sha256 48e373a6ff452e0e3ec2737303ae84d96d0fa9cee2062cbc1f54257231b44ded size 681 file /usr/share/66/module/boot@/service/system/devices/devices-zfs mtime 1675622755 sha256 d9979c4187316ca6be55e31e2d3631ab27eea3e6909d0d2443b90d8300aa457d size 834 file /usr/share/66/module/boot@/service/system/devices/devices-zfs-import-cache mtime 1675622755 sha256 3d0a55436da79ab0f9a7e79635cd0f07915661e2bb31bdaea90d9596a18d8150 size 471 file /usr/share/66/module/boot@/service/system/devices/devices-zfs-import-scan mtime 1675622755 sha256 530b6b6cb7dffdaa0e144387e6bc2f97399c02149875e271981df42d84b20ff2 size 422 file /usr/share/66/module/boot@/service/system/modules/modules-kernel mtime 1675622755 sha256 37abe9935f8c4d194681347b7b95b81e8db0903fe23f59343742b7f4d57cd037 size 492 file /usr/share/66/module/boot@/service/system/modules/modules-system mtime 1675622755 sha256 bed880a1346590a51a412d48c363ea8930d52132f8af3c2c96c8091e05ead5e1 size 351 file /usr/share/66/module/boot@/service/system/system-Devices mtime 1675622755 sha256 2e3633763a6fbce5c2baca6a0b230043ea45cd514f4990ecc09eaa5fe87076cf size 201 file /usr/share/66/module/boot@/service/system/system-fontnkey mtime 1675622755 sha256 5cc1d62b4c04ccfd66129dc8a5b41c058f585a9053f8453aafec4307366ea9d4 size 660 file /usr/share/66/module/boot@/service/system/system-fsck mtime 1675622755 sha256 18faa7540714bf5c650544748279651fb1860b5a54c63f4f19b0783b823edeea size 936 file /usr/share/66/module/boot@/service/system/system-hostname mtime 1675622755 sha256 0ead52204c48c2b1939be143e5dc98125b5e3eeed2cfe3382db5b0b98025c619 size 386 file /usr/share/66/module/boot@/service/system/system-hwclock mtime 1675622755 sha256 525a08dc1e90146b41bf5cc3f2adad3c1ae286b600e35aa3c586808b5643686c size 949 file /usr/share/66/module/boot@/service/system/system-random mtime 1675622755 sha256 20055741c7f43a17bff902971a776e8fceffbe914a344a68d7400b31addd90a9 size 824 file /usr/share/66/module/boot@/service/system/system-sysctl mtime 1675622755 sha256 6684274543c612d04635a9f2139d990289df2147aeda5eaf1e85f91f4c7b27ca size 353 file /usr/share/66/module/boot@/service/system/udev/udevadm mtime 1675622755 sha256 8ff18d5b25107a8531ec88f94cac867ecb478992211a4493e3bfc128aac83a7a size 472 file /usr/share/66/module/boot@/service/system/udev/udevd mtime 1675622755 sha256 78188c9de574777a9968594bca37bc6b18dc753694ff28add7474de0bbc3505f size 470 file /usr/share/66/module/boot@/service@/tty-earlier@ mtime 1675622755 sha256 37398c7fb132cd3b989c53f1455c65220990fc552740f9f127201d3cb69e9229 size 228 file /usr/share/66/module/boot@/service@/tty-rc@ mtime 1675622755 sha256 78b6d840dd52cd2f46bb0209eb3eac86615b9f22168577e484125afa0ba5673f size 225 file /usr/share/66/script/crypt.awk mtime 1675622755 sha256 098a3b34a18cde872b55087ae0766457944c9c41753ee90543b1132bd8befcab size 4029 file /usr/share/66/script/sysctl.sh mtime 1675622755 sha256 b0fb0ff62355539893baa0f0fcb64828d20ee400ee645cb7437f9817c87413d3 size 824 file /usr/share/66/service/boot@ mtime 1675622755 sha256 b91db63d90291c4941365522632297ed6b8f812b482c4ff00c9f03ec9a2551e7 size 5205 file /usr/share/66/service/runit mtime 1675622755 sha256 75818258f790878d2e5668e2b34f17b19e3847465e6f9fc8310dfef9e55c87ea size 609 file /usr/share/66/service/runit-wrapsv@ mtime 1675622755 sha256 f760ee0a08429e77418fea2859cc92809f694766dac5091974aad4b1f8b269e3 size 217 file /usr/share/66/service/switch-initutils mtime 1675622755 sha256 ca6e03c760d9f90d3fd0d38fc0e47c81b9b462dfd2edd9b508a80ad4fc4ab65b size 992 file /usr/share/doc/boot-66serv/boot@.html mtime 1675622755 sha256 8cafc992e096bfc68675e6b3626dc914534d0666f1f2600aec42c5962bd59089 size 14462 file /usr/share/licenses/boot-66serv/LICENSE mtime 1675622755 sha256 44d1da4ca17544ff552d01c0e1ece33ebc2c48476bf2d73f37eac14b6d713d13 size 682 file /usr/share/man/man1/boot@.1 mtime 1675622755 sha256 b14d13408d196d51c66f2e4447435cfa1ffde7a57d07c9a1b52c46c0496b39b8 size 14289 links file /etc/66rc.conf mtime 1675622755 target ../etc/66/conf/boot@system/version/boot@system file /usr/share/66/script/modules.sh mtime 1675622755 target /usr/bin/modules-load ./usr/share/man/man1/boot@.1000644 000000 000000 00000033721 14367774543 014062 0ustar00000000 000000 .\" -*- mode: troff; coding: utf-8 -*- .TH "The 66 Suite: boot@-66serv" "1" "" "" "General Commands Manual" .SH boot@ service .LP The boot@ instantiated service is a portable set of services to boot a machine in conjunction with the 66 API. .SS How to enable .LP Like any other instantiated service to enable it you need to specify the target of the service. The target can be a random name. .PP This is a specific service that handles the boot sequence of a machine, it is usually enabled on a tree build especially for it and contains only this service. .PP For example: .LP .EX # 66-tree -n boot # 66-enable -t boot boot@system .EE .PP The name of the tree need to match the name set at your \fCTREE=\fR \fIkey=value\fR pair defined in the \fC/etc/66/init.conf\fR file. .PP Do not mark this tree enabled with the \fC66-tree -E\fR option. The \fB66-init\fR <\fIhttps://web.obarun.org/software/66/66-tree.html\fR> will take care of this special tree and start it automatically. .PP Refer to the \fB66-tree\fR <\fIhttps://web.obarun.org/software/66/66-tree.html\fR> and \fB66-enable\fR <\fIhttps://web.obarun.org/software/66/66-tree.html\fR> for further information on these tools. .SS How to configure it .LP This service is declared as a \fCmodule\fR service and comes with its own configuration file. The configuration file can be seen and edited easily using the \fB66-env\fR <\fIhttps://web.obarun.org/software/66/66-env.html\fR> tool: .LP .EX # 66-env boot@system .EE .PP When you are done editing this file, you need to reenable the service to have changes applied by using the -F option: .LP .EX # 66-enable -t boot -F boot@system .EE .SS Configuration file key=value pair explanation .LP Two different kinds of variables are used: .IP "\(bu" 2 boolean: accepts \fCyes\fR or \fCno\fR as the only valid values, and nothing else. .IP "\(bu" 2 string: depends on the variable and is defined in the following documentation. .LP Variables need to be present in the environment section/file, unless otherwise noted below. .LP \l'2i' .IP "\(bu" 2 \fBHOSTNAME\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: anything you want. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: informs the kernel of the hostname to use and sets the /etc/hostname file with the value declared. .RE .IP "\(bu" 2 \fBTZ\fR (TimeZone): .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: any valid name found at /usr/share/zoneinfo. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: creates a symlink at \fC/etc/localtime\fR pointing to the \fC/usr/share/zoneinfo\fR directory definition. Usually the value contains a slash like Pacific/Noumea, America/New_york,\[u2026] .RE .IP "\(bu" 2 \fBKEYMAP\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: any valid name found at \fC/usr/share/kbd/keymaps\fR directory. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCloadkeys\fR program to set the keymap for the console to use. Usually a simple string like fr, us,\[u2026] .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 KEYMAP does not need to be present in the environment. .RE .IP "\(bu" 2 \fBFONT\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: any valid name found at \fC/usr/share/kbd/consolefonts\fR. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCsetfont\fR program to set the font for the console to use. Usually a simple string like lat9w-16, alt-8x14,\[u2026] .RE .IP "\(bu" 2 \fBFONT_MAP\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: any valid name found at \fC/usr/share/kbd/consoletrans\fR. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCsetfont\fR program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,\[u2026] .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 FONT_MAP does not need to be present in the environment. .RE .IP "\(bu" 2 \fBFONT_UNIMAP\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: any valid name found at \fC/usr/share/kbd/unimaps\fR. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCsetfont\fR program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 FONT_UNIMAP does not need to be present in the environment. .RE .IP "\(bu" 2 \fBFSTAB\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCmount -a\fR command to mount each filesystem set at \fC/etc/fstab\fR. .RE .IP "\(bu" 2 \fBSWAP\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCswapon -a\fR command to activate your swap partitions/files. .RE .IP "\(bu" 2 \fBLVM\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCvgchange\fR program to activate LVM volume groups and \fCcryptsetup\fR to open luks volumes in them. If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited. .RE .IP "\(bu" 2 \fBDMRAID\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCdmraid\fR program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited. .RE .IP "\(bu" 2 \fBMDRAID\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCmdadm\fR program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited. .RE .IP "\(bu" 2 \fBBTRFS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCbtrfs\fR program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited. .RE .IP "\(bu" 2 \fBZFS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: uses the \fCzfs\fR program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited. .RE .IP "\(bu" 2 \fBZFS_IMPORT\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: scan or zpoolcache. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the \fCZFS\fR variable. In case the \fCZFS\fR variable is set to no or commented, the \fCZFS_IMPORT\fR variable has no effect. .RE .LP \fILVM, DMRAID, MDRAID, BTRFS and ZFS rely on the \f(CIblkid\fI program from \f(CIutil-linux\fI for device descovery.\fR .IP "\(bu" 2 \fBSETUPCONSOLE\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: set it to no if you don\(cqt want to configure the console. In this case the \fCKEYMAP,FONT\fR, \fCFONT_MAP\fR, \fCFONT_UNIMAP\fR variable has no effect. .RE .IP "\(bu" 2 \fBHARDWARECLOCK\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: UTC or locatime. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: Restore the system clock to the given timezone set at \fCTZ\fR variable and set the hardware clock with timescale given (A.K.A. UTC or localtime). .RE .IP "\(bu" 2 \fBUDEV\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: use the udev program to detect the devices e.g. network card, external hard drive, \[u2026]. If it\(cqs set to no the \fCSETUPCONSOLE\fR, \fCKEYMAP\fR, \fCFONT\fR, \fCFONT_MAP\fR, \fCFONT_UNIMAP\fR, \fCCRYPTTAB\fR, \fCDMRAID\fR, \fCBTRFS\fR, \fCLVM\fR variable has no effect. .RE .IP "\(bu" 2 \fBSYSCTL\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: use the sysctl program to change the kernel parameters at runtime. The \fC/etc/sysctl.conf\fR \f(BImust\fR exist on your system and be correctly written. .RE .IP "\(bu" 2 \fBFORCECHCK\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: force the check of all mounted file systems. .RE .IP "\(bu" 2 \fBLOCAL\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: use the \fC/etc/66/rc.local\fR script. This script is launched at the end of the boot procedure. The file \f(BImust\fR exist on your system and be set as executable, with correct definition of the shebang at the start of the script. .RE .IP "\(bu" 2 \fBCONTAINER\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the \fCHARDWARECLOCK\fR, \fCSETUPCONSOLE\fR, \fCKEYMAP\fR, \fCFONT\fR, \fCFONT_MAP\fR, \fCFONT_UNIMAP\fR, \fCCRYPTTAB\fR, \fCSWAP\fR, \fCLVM\fR, \fCDMRAID\fR, \fCBTRFS\fR, \fCZFS\fR, \fCUDEV\fR, \fCSYSCTL\fR, \fCFORCECHCK\fR, \fCCGROUPS\fR, \fCMODULE_SYSTEM\fR, \fCRANDOMSEED\fR, \fCMNT_NETFS\fR variables have no effect. .RE .IP "\(bu" 2 \fBMODULE_KERNEL\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: load the kernel modules returned by the \fCkmod static-nodes\fR command. .RE .IP "\(bu" 2 \fBMODULE_SYSTEM\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: read, parse and load the modules found at \fC/etc/modules-load.d\fR, \fC/run/modules-load.d\fR, \fC/usr/lib/modules-load.d\fR. .RE .IP "\(bu" 2 \fBRANDOMSEED\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: generates random numbers and saves them in \fC/var/lib/random-seed\fR if it doesn\(cqt already exist. .RE .IP "\(bu" 2 \fBCRYPTTAB\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: use the file \fC/etc/crypttab\fR to decrypt encrypted devices. The file \fC/etc/crypttab\fR \f(BImust\fR exist on your system. .RE .LP \fICRYPTTAB relies on the \f(CIblkid\fI program from \f(CIutil-linux\fI for device descovery.\fR .IP "\(bu" 2 \fBFIREWALL\fR: .RS .IP "\(bu" 2 type: string. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 valid value: iptables,ip6tables,nftables,ebtables,arptables. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the \fC/etc//.rules\fR file \f(BImust\fR exist on your system. In other cases the \fC/etc/.conf\fR \f(BImust\fR exist on your system. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 FIREWALL does not need to be present in the environment. .RE .IP "\(bu" 2 \fBCGROUPS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: read and parse the \fC/proc/cgroups\fR file and mount the corresponding \fC/sys/fs/cgroup/\fR directory. The \fC/sys/fs/cgroup/unified\fR is also mounted. .RE .IP "\(bu" 2 \fBMNT_PROC\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/proc\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_SYS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/sys\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_DEV\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/dev\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_RUN\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/run\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_TMP\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/tmp\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_PTS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/dev/pts\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_SHM\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: check and mount the \fC/dev/shm\fR directory if it is not mounted yet. .RE .IP "\(bu" 2 \fBMNT_NETFS\fR: .RS .IP "\(bu" 2 type: boolean. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: mount all file systems with the command \fCmount -a -t nosysfs,nonfs,nonfs4,nosmbfs,nocifs -O no_netdev\fR. .RE .IP "\(bu" 2 \fBPOPULATE_SYS\fR: .RS .IP "\(bu" 2 type: boolean .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 decription: mount the \fC/sys/firmware/efi/efivars\fR, \fC/sys/fs/fuse/connections\fR, \fC/sys/kernel/config\fR, \fC/sys/kernel/debug\fR and \fC/sys/kernel/security\fR directories. .RE .IP "\(bu" 2 \fBPOPULATE_DEV\fR: .RS .IP "\(bu" 2 type: boolean .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: mount the \fC/dev/hugepages\fR and \fC/dev/mqueue\fR directories. .RE .IP "\(bu" 2 \fBPOPULATE_RUN\fR: .RS .IP "\(bu" 2 type: boolean .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: mount the \fC/run/lvm\fR, \fC/run/user\fR and \fC/run/lock\fR directories. .RE .IP "\(bu" 2 \fBPOPULATE_TMP\fR: .RS .IP "\(bu" 2 type: boolean .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: create the \fC/tmp/.X11-unix\fR and \fC/tmp/.ICE-unix\fR directories. .RE .IP "\(bu" 2 \fBCHECK_CONFIGURATION\fR: .RS .IP "\(bu" 2 type: boolean .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 description: run configuration checks when enabling the boot@ service .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 2 CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled. .RE ./usr/share/licenses/boot-66serv/LICENSE000644 000000 000000 00000001252 14367774543 016226 0ustar00000000 000000 Copyright (c) 2018-2021 Eric Vidal All rights reserved. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ./usr/share/doc/boot-66serv/boot@.html000644 000000 000000 00000034176 14367774543 016125 0ustar00000000 000000 The 66 Suite: boot@-66serv

boot@ service

The boot@ instantiated service is a portable set of services to boot a machine in conjunction with the 66 API.

How to enable

Like any other instantiated service to enable it you need to specify the target of the service. The target can be a random name.

This is a specific service that handles the boot sequence of a machine, it is usually enabled on a tree build especially for it and contains only this service.

For example:

# 66-tree -n boot
# 66-enable -t boot boot@system

The name of the tree need to match the name set at your TREE= key=value pair defined in the /etc/66/init.conf file.

Do not mark this tree enabled with the 66-tree -E option. The 66-init will take care of this special tree and start it automatically.

Refer to the 66-tree and 66-enable for further information on these tools.

How to configure it

This service is declared as a module service and comes with its own configuration file. The configuration file can be seen and edited easily using the 66-env tool:

# 66-env boot@system

When you are done editing this file, you need to reenable the service to have changes applied by using the -F option:

# 66-enable -t boot -F boot@system

Configuration file key=value pair explanation

Two different kinds of variables are used:

  • boolean: accepts yes or no as the only valid values, and nothing else.

  • string: depends on the variable and is defined in the following documentation.

Variables need to be present in the environment section/file, unless otherwise noted below.


  • HOSTNAME:

    • type: string.
    • valid value: anything you want.
    • description: informs the kernel of the hostname to use and sets the /etc/hostname file with the value declared.
  • TZ (TimeZone):

    • type: string.
    • valid value: any valid name found at /usr/share/zoneinfo.
    • description: creates a symlink at /etc/localtime pointing to the /usr/share/zoneinfo directory definition. Usually the value contains a slash like Pacific/Noumea, America/New_york,…
  • KEYMAP:

    • type: string.
    • valid value: any valid name found at /usr/share/kbd/keymaps directory.
    • description: uses the loadkeys program to set the keymap for the console to use. Usually a simple string like fr, us,…
    • KEYMAP does not need to be present in the environment.
  • FONT:

    • type: string.
    • valid value: any valid name found at /usr/share/kbd/consolefonts.
    • description: uses the setfont program to set the font for the console to use. Usually a simple string like lat9w-16, alt-8x14,…
  • FONT_MAP:

    • type: string.
    • valid value: any valid name found at /usr/share/kbd/consoletrans.
    • description: uses the setfont program to indicate the mapping to use. Usually a simple string like 8859-1, 8859-2,…
    • FONT_MAP does not need to be present in the environment.
  • FONT_UNIMAP:

    • type: string.
    • valid value: any valid name found at /usr/share/kbd/unimaps.
    • description: uses the setfont program to indicate the unicode mapping table to use. Usually no mapping table is needed, and a Unicode mapping table is already contained in the font.
    • FONT_UNIMAP does not need to be present in the environment.
  • FSTAB:

    • type: boolean.
    • description: uses the mount -a command to mount each filesystem set at /etc/fstab.
  • SWAP:

    • type: boolean.
    • description: uses the swapon -a command to activate your swap partitions/files.
  • LVM:

    • type: boolean.
    • description: uses the vgchange program to activate LVM volume groups and cryptsetup to open luks volumes in them. If the programs are not installed in the system, or if lvm devices are not discovered, a warning is emmited.
  • DMRAID:

    • type: boolean.
    • description: uses the dmraid program to activate dmraid disks. If the program is not installed in the system, or if dmraid devices are not discovered, a warning is emmited.
  • MDRAID:

    • type: boolean.
    • description: uses the mdadm program to activate software raid (mdraid) arrays. If the program is not installed in the system, or if mdraid devices are not discovered, a warning is emmited.
  • BTRFS:

    • type: boolean.
    • description: uses the btrfs program to activate BTRFS devices. If the program is not installed in the system, or if btrfs devices are not discovered, a warning is emmited.
  • ZFS:

    • type: boolean.
    • description: uses the zfs program to mount ZFS filesystems. If the program is not installed in the system, or if zfs devices are not discovered, a warning is emmited.
  • ZFS_IMPORT:

    • type: string.
    • valid value: scan or zpoolcache.
    • description: select the import method to use to detect the ZFS devices. This variable works in conjunction with the ZFS variable. In case the ZFS variable is set to no or commented, the ZFS_IMPORT variable has no effect.

LVM, DMRAID, MDRAID, BTRFS and ZFS rely on the blkid program from util-linux for device descovery.

  • SETUPCONSOLE:

    • type: boolean.
    • description: set it to no if you don’t want to configure the console. In this case the KEYMAP,FONT, FONT_MAP, FONT_UNIMAP variable has no effect.
  • HARDWARECLOCK:

    • type: string.
    • valid value: UTC or locatime.
    • description: Restore the system clock to the given timezone set at TZ variable and set the hardware clock with timescale given (A.K.A. UTC or localtime).
  • UDEV:

    • type: boolean.
    • description: use the udev program to detect the devices e.g. network card, external hard drive, …. If it’s set to no the SETUPCONSOLE, KEYMAP, FONT, FONT_MAP, FONT_UNIMAP, CRYPTTAB, DMRAID, BTRFS, LVM variable has no effect.
  • SYSCTL:

    • type: boolean.
    • description: use the sysctl program to change the kernel parameters at runtime. The /etc/sysctl.conf must exist on your system and be correctly written.
  • FORCECHCK:

    • type: boolean.
    • description: force the check of all mounted file systems.
  • LOCAL:

    • type: boolean.
    • description: use the /etc/66/rc.local script. This script is launched at the end of the boot procedure. The file must exist on your system and be set as executable, with correct definition of the shebang at the start of the script.
  • CONTAINER:

    • type: boolean.
    • description: convenient variable used to boot inside a container. Some services will not work or be unnecessary when you boot inside a container. This variable provides you a safe default for this purpose. If set to yes the HARDWARECLOCK, SETUPCONSOLE, KEYMAP, FONT, FONT_MAP, FONT_UNIMAP, CRYPTTAB, SWAP, LVM, DMRAID, BTRFS, ZFS, UDEV, SYSCTL, FORCECHCK, CGROUPS, MODULE_SYSTEM, RANDOMSEED, MNT_NETFS variables have no effect.
  • MODULE_KERNEL:

    • type: boolean.
    • description: load the kernel modules returned by the kmod static-nodes command.
  • MODULE_SYSTEM:

    • type: boolean.
    • description: read, parse and load the modules found at /etc/modules-load.d, /run/modules-load.d, /usr/lib/modules-load.d.
  • RANDOMSEED:

    • type: boolean.
    • description: generates random numbers and saves them in /var/lib/random-seed if it doesn’t already exist.
  • CRYPTTAB:

    • type: boolean.
    • description: use the file /etc/crypttab to decrypt encrypted devices. The file /etc/crypttab must exist on your system.

CRYPTTAB relies on the blkid program from util-linux for device descovery.

  • FIREWALL:

    • type: string.
    • valid value: iptables,ip6tables,nftables,ebtables,arptables.
    • description: use the given program to set a firewall applying the corresponding configuration files. In case of iptables and ip6tables the /etc/<program>/<program>.rules file must exist on your system. In other cases the /etc/<program>.conf must exist on your system.
    • FIREWALL does not need to be present in the environment.
  • CGROUPS:

    • type: boolean.
    • description: read and parse the /proc/cgroups file and mount the corresponding /sys/fs/cgroup/<groups> directory. The /sys/fs/cgroup/unified is also mounted.
  • MNT_PROC:

    • type: boolean.
    • description: check and mount the /proc directory if it is not mounted yet.
  • MNT_SYS:

    • type: boolean.
    • description: check and mount the /sys directory if it is not mounted yet.
  • MNT_DEV:

    • type: boolean.
    • description: check and mount the /dev directory if it is not mounted yet.
  • MNT_RUN:

    • type: boolean.
    • description: check and mount the /run directory if it is not mounted yet.
  • MNT_TMP:

    • type: boolean.
    • description: check and mount the /tmp directory if it is not mounted yet.
  • MNT_PTS:

    • type: boolean.
    • description: check and mount the /dev/pts directory if it is not mounted yet.
  • MNT_SHM:

    • type: boolean.
    • description: check and mount the /dev/shm directory if it is not mounted yet.
  • MNT_NETFS:

    • type: boolean.
    • description: mount all file systems with the command mount -a -t nosysfs,nonfs,nonfs4,nosmbfs,nocifs -O no_netdev.
  • POPULATE_SYS:

    • type: boolean
    • decription: mount the /sys/firmware/efi/efivars, /sys/fs/fuse/connections, /sys/kernel/config, /sys/kernel/debug and /sys/kernel/security directories.
  • POPULATE_DEV:

    • type: boolean
    • description: mount the /dev/hugepages and /dev/mqueue directories.
  • POPULATE_RUN:

    • type: boolean
    • description: mount the /run/lvm, /run/user and /run/lock directories.
  • POPULATE_TMP:

    • type: boolean
    • description: create the /tmp/.X11-unix and /tmp/.ICE-unix directories.
  • CHECK_CONFIGURATION:

    • type: boolean
    • description: run configuration checks when enabling the boot@ service
    • CHECK_CONFIGURATION does not need to present in the environment. If it is not, checks are disabled.
./usr/share/66/service/switch-initutils000644 000000 000000 00000001740 14367774543 016463 0ustar00000000 000000 # This oneshot service checks for /usr/bin/{reboot,poweroff,halt,shutdown} # and if they are part of runit-void it renames them and copies the 66 # utilities in their place. It must be enabled, especially if one # changes between the two init systems. There is a similar script for # runit core-services that does the opposite and runs by default with runit. # The service makes sure that the user has the proper utilities for the # init system they are currently running. [main] @type = oneshot @version = 0.0.3 @description = "Switch initutils" @user = ( root ) [start] @build = custom @shebang = "/bin/sh -c" @execute = ( poweroff_util=$(readlink -f /usr/bin/poweroff) if grep -q "s6-svscan" /proc/1/cmdline && [ $(pgrep -u root 66-shutdownd) ]; then if [ "$poweroff_util" != /usr/bin/poweroff ]; then for i in reboot poweroff halt shutdown; do mv /usr/bin/${i} /usr/bin/${i}.runit cp /etc/66/${i} /usr/bin/${i} done fi fi ) ./usr/share/66/service/runit-wrapsv@000644 000000 000000 00000000331 14367774543 015714 0ustar00000000 000000 # The service takes the runit service name as @I - e.g. runit-wrapsv@cupsd [main] @type = classic @version = 0.0.1 @description = "wrapper for @I runit service" @user = ( root ) [start] @execute = ( /etc/sv/@I/run ) ./usr/share/66/service/runit000644 000000 000000 00000001141 14367774543 014274 0ustar00000000 000000 [main] @type = classic @version = 0.0.1 @description = "runit" @user = (root) [start] @build = custom @shebang = "/bin/sh" @execute = ( exec 2>&1 PATH=/usr/bin:/usr/sbin runlevel=66 runsvchdir "${runlevel}" s6-mkdir -v -p /run/runit/runsvdir ln -s /etc/runit/runsvdir/current /run/runit/runsvdir/current s6-rmrf /var/service/current s6-rmrf /var/service/supervise exec s6-env -i PATH=$PATH \ runsvdir -P /run/runit/runsvdir/current ) [stop] @build = custom @shebang = "/bin/sh -c" @execute = ( sv force-stop /var/service/* && sv exit /var/service/* ) [logger] @backup = 3 @maxsize = 1000000./usr/share/66/service/boot@000644 000000 000000 00000012125 14367774543 014202 0ustar00000000 000000 [main] @type = module @version = 2.4.1 @description = "Set of services to boot a machine" @user = (root) [regex] @infiles = ( ::@bootconf@=/etc/66/conf/boot@@I/version ::@scripts@=/usr/share/66/script ::@initconf@=/etc/66/init.conf ::@skeldir@=/etc/66 ::@live_dir@=/run/66 ::@tmpfiles@=@tmpfiles_path@ ::@modules@=/usr/bin ::@vers@=2.4.1 ) [environment] # Copyright (c) 2015-2021 Eric Vidal # All rights reserved. # # This file is part of Obarun. It is subject to the license terms in # the LICENSE file found in the top-level directory of this # distribution. # This file may not be copied, modified, propagated, or distributed # except according to the terms contained in the LICENSE file. # # System configuration file for a boot process running s6/s6-rc # supervision suite and handled by 66 suite program. # # Do not use quotes or double-quotes on this file # # The '!' is used to not export the variable on the environment. # If you want to keep it, remove the exclamation mark '!'. # #========================== WARNING ==================================== # # Do not forget to enable again the boot@ module after editing # this file to apply your changes at the next reboot e.g: # 66-enable -F -t boot boot@system # #======================= Global Settings =============================== ## Set your HOSTNAME. HOSTNAME=!voidlinux ## Set your timezone, available timezones can be found at /usr/share/zoneinfo. TZ=!Europe/Madrid ## Set the number of tty(s) to start. ## 0 means no tty. Maximum is 11. TTY=!4 ## Console keymap to load, see loadkeys(8). KEYMAP=!us ## Console font to load, see setfont(8). FONT=!lat9w-16 ## Console map to load, see setfont(8). #FONT_MAP= ## Console unimap to load, see setfont(8). #FONT_UNIMAP= #========================== Devices ==================================== ## Mount devices from FSTAB file [yes|no]. FSTAB=!yes ## Activate swap [yes|no]. SWAP=!no ## Activate lvm volume groups [yes|no]. LVM=!no ## Activate dmraid disks [yes|no]. DMRAID=!no ## Activate btrfs devices [yes|no]. BTRFS=!no ## Mount zfs filesystems [yes|no]. ZFS=!no ## Zpool Import method [scan|zpoolcache] ## It has no effects if ZFS is set to no or commented. ZFS_IMPORT=!zpoolcache ## Activate mdraid arrays MDRAID=!no #======================================================================= #=================== Advanced user configuration ======================= # # If you don't know what the following variables do, you # don't need to change them. The machine will still boot # with the default values # #======================================================================= #====================== System configuration =========================== ## Setup the console ## If set to no, KEYMAP,FONT,FONT_MAP,FONT_UNIMAP has no effects SETUPCONSOLE=!yes ## Set RTC [UTC|localtime]. HARDWARECLOCK=UTC ## Use udev [yes|no] ## If set to no the following variables has no effects or set to no: ## SETUPCONSOLE, KEYMAP, FONT, FONT_MAP, FONT_UNIMAP, CRYPTTAB, DMRAID, ## BTRFS, LVM UDEV=!yes ## Kernel configuration with sysctl [yes|no]. SYSCTL=!yes ## Force a check of filesystem partition [yes|no]. FORCECHCK=!no ## Use rc.local script [yes|no]. LOCAL=!no ## Boot inside a container [yes|no]. ## If set to yes the following variables have no effect or are set to no: ## HARDWARECLOCK, SETUPCONSOLE, KEYMAP, FONT, FONT_MAP, FONT_UNIMAP, CRYPTTAB ## SWAP, LVM, DMRAID, BTRFS, ZFS, UDEV, SYSCTL, FORCECHCK, CGROUPS ## MODULE_SYSTEM, RANDOMSEED, MNT_NETFS CONTAINER=!no ## Load kernel modules [yes|no]. MODULE_KERNEL=!yes ## Load modules from modules.d files MODULE_SYSTEM=!yes ## Populate ramdom seed RANDOMSEED=!yes #========================== Security =================================== ## Activate encrypted devices [yes|no]. CRYPTTAB=!no ## Firewall program to use [iptables|ip6tables|nftables|ebtables|arptables] ## Comment to not use any firewall at all. #FIREWALL= #========================== Pseudo filesystem ========================== ## Mount cgroups [yes|no]. CGROUPS=!yes ## Mount /proc directory [yes|no]. MNT_PROC=!yes ## Mount /sys directory [yes|no]. MNT_SYS=!yes ## Mount /dev directory [yes|no]. MNT_DEV=!yes ## Mount /run directory [yes|no]. MNT_RUN=!yes ## Mount /tmp directory [yes|no]. MNT_TMP=!yes ## Mount /dev/pts directory [yes|no]. ## Only valuable if MNT_DEV is set to yes. MNT_PTS=!yes ## Mount /dev/shm directory [yes|no]. ## Only valuable if MNT_DEV is set to yes. MNT_SHM=!yes ## Mount no-network filesystem [yes|no]. ## Fstype mounted is: nosysfs,nonfs,nonfs4,nosmbfs,nocifs MNT_NETFS=!yes ## Create and mount /sys/firmware/efi/efivars, /sys/fs/fuse/connections, ## /sys/kernel/{config,debug,security} and /sys/kernel/debug/tracing ## if exist at /proc/filesystems POPULATE_SYS=!yes ## Create and mount /dev/{hugepages,mqueue} ## if exist at /proc/filesystems POPULATE_DEV=!yes ## Create /run/{lvm,user,lock,utmp} directories POPULATE_RUN=!yes ## Create /tmp/{.X11-unix,.ICE-unix} files POPULATE_TMP=!yes #========================== Configuration checks ========================== ## Check the configuration for errors CHECK_CONFIGURATION=!yes ./usr/share/66/script/sysctl.sh000755 000000 000000 00000001470 14367774543 014741 0ustar00000000 000000 #!/bin/sh # Copy of the 08-syctl.sh script of the void-runit project, # that is in the public domain. # Latest version of the upstream script is in: # https://github.com/void-linux/void-runit/blob/master/core-services/08-sysctl.sh # Licence information is available in the README.md: # https://github.com/void-linux/void-runit#readme if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then mkdir -p /run/vsysctl.d for i in /run/sysctl.d/*.conf \ /etc/sysctl.d/*.conf \ /usr/local/lib/sysctl.d/*.conf \ /usr/lib/sysctl.d/*.conf; do if [ -e "$i" ] && [ ! -e "/run/vsysctl.d/${i##*/}" ]; then ln -s "$i" "/run/vsysctl.d/${i##*/}" fi done for i in /run/vsysctl.d/*.conf; do sysctl -p "$i" done rm -rf -- /run/vsysctl.d sysctl -p /etc/sysctl.conf fi ./usr/share/66/script/modules.sh000777 000000 000000 00000000000 14367774543 021030 2/usr/bin/modules-loadustar00000000 000000 ./usr/share/66/script/crypt.awk000755 000000 000000 00000007675 14367774543 014746 0ustar00000000 000000 /^#/ || /^$/ { next } # This file come from Void distribution (https://github.com/void-linux/void-runit/blob/master/crypt.awk) # All credits goes to this team. # Many thanks at them to provide this good awk program. NF>4 { print "a valid crypttab has max 4 cols not " NF >"/dev/stderr"; next } { # decode the src variants split($2, o_src, "=") if (o_src[1] == "UUID") ("blkid -l -o device -t " $2) | getline src; else src=o_src[1]; # no password or none is given, ask fo it if ( NF == 2 ) { ccmd="cryptsetup luksOpen " src " " $1; system(ccmd); ccmd=""; } else if (NF == 3 ) { dest=$1 key=$3 split($3, po, "="); if ( po[1] == "none") ccmd="cryptsetup luksOpen " src " " dest; else ccmd="cryptsetup luksOpen -d " key " " src" " dest; system(ccmd); ccmd=""; } else { # the option field is not empty parse the options dest=$1 key=$3 split($4, opts, ","); commonopts=""; swapopts=""; luksopts=""; for(i in opts) { split(opts[i], para, "="); par=para[1]; val=para[2]; if ( par == "readonly" || par == "read-only") commonopts=commonopts "-r "; else if ( par == "discard" ) commonopts=commonopts "--allow-discards "; else if ( par == "tries" ) commonopts=commonopts "-T " val " "; else if ( par == "swap" ) makeswap="y"; else if ( par == "cipher" ) swapopts=swapopts "-c " val " "; else if ( par == "size" ) swapopts=swapopts "-s " val " "; else if ( par == "hash" ) swapopts=swapopts "-h " val " "; else if ( par == "offset" ) swapopts=swapopts "-o " val " "; else if ( par == "skip" ) swapopts=swapopts "-p " val " "; else if ( par == "verify" ) swapopts=swapopts "-y "; #else if ( par == "noauto" ) #else if ( par == "nofail" ) #else if ( par == "plain" ) #else if ( par == "timeout" ) #else if ( par == "tmp" ) else if ( par == "luks" ) use_luks="y"; else if ( par == "keyscript" ) {use_keyscript="y"; keyscript=val;} else if ( par == "keyslot" || par == "key-slot" ) luksopts=luksopts "-S " val " "; else if ( par == "keyfile-size" ) luksopts=luksopts "-l " val " "; else if ( par == "keyfile-offset" ) luksopts=luksopts "-keyfile-offset=" val " "; else if ( par == "header" ) luksopts=luksopts "--header=" val " "; else { print "option: " par " not supported " >"/dev/stderr"; makeswap=""; use_luks=""; use_keyscript=""; next; } } if ( makeswap == "y" && use_luks != "y" ) { ccmd="cryptsetup " swapopts commonopts "-d " key " create " dest " " src; ccmd_2="mkswap /dev/mapper/" dest; makeswap=""; use_luks=""; use_keyscript=""; system(ccmd); system(ccmd_2); ccmd=""; ccmd_2=""; next; } if ( use_luks == "y" && makeswap != "y" ){ if ( use_keyscript == "y") { ccmd=keyscript " | cryptsetup " luksopts commonopts "luksOpen -d - " src " " dest; use_keyscript=""; } else { if ( key == "none" ){ ccmd="cryptsetup " luksopts commonopts "luksOpen " src " " dest; } else { ccmd="cryptsetup " luksopts commonopts "luksOpen -d " key " " src " " dest; } } } else { print "use swap OR luks as option" >"/dev/stderr"; ccmd=""; } makeswap=""; use_luks=""; use_keyscript=""; if ( ccmd != ""){ system(ccmd); ccmd="" } } } ./usr/share/66/module/boot@/service@/tty-rc@000644 000000 000000 00000000341 14367774543 017106 0ustar00000000 000000 [main] @type = longrun @version = @vers@ @description = "Launch @I" @user = ( root ) @options = ( !log ) @depends = ( All ) [start] @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } ) [environment] cmd_args=!-J 38400 ./usr/share/66/module/boot@/service@/tty-earlier@000644 000000 000000 00000000344 14367774543 020130 0ustar00000000 000000 [main] @type = classic @version = @vers@ @description = "Launch earlier @I" @user = ( root ) @options = ( !log ) [start] @build = auto @execute = ( execl-cmdline -s { agetty ${cmd_args} @I } ) [environment] cmd_args=!-J 38400 ./usr/share/66/module/boot@/service/system/udev/udevd000644 000000 000000 00000000726 14367774543 021071 0ustar00000000 000000 [main] @type = longrun @version = @vers@ @description = "Launch udevd daemon" @user = ( root ) @notify = 3 @depends=( 00 modules-kernel ) [start] @execute = ( if { 66-yeller -cdp udevd -1 /dev/console starts... } background -d { fdmove 1 3 loopwhilex -x 0 if { sleep 1 } if { udevadm control --start-exec-queue } 66-echo } unexport ! fdclose 3 udevd -D ) [logger] @destination = @live_dir@/log/udevd ./usr/share/66/module/boot@/service/system/udev/udevadm000644 000000 000000 00000000730 14367774543 021402 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Launch udevadm" @user = ( root ) @depends=( udevd ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp udevadm -1 /dev/console starts... } if -nt { if { udevadm info --cleanup-db } if { udevadm trigger --action=add --type=subsystems } if { udevadm trigger --action=add --type=devices } udevadm settle } 66-yeller -fcdp udevadm -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/system/system-sysctl000644 000000 000000 00000000541 14367774543 021655 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Apply sysctl configuration file" @user = ( root ) @depends = ( 00 ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp system-sysctl -1 /dev/console starts... } if -nt { /usr/share/66/script/sysctl.sh } 66-yeller -Wcdp system-sysctl -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/system/system-random000644 000000 000000 00000001470 14367774543 021616 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Create random seed" @user = ( root ) @depends = ( 00 ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp system-random -1 /dev/console starts... } if -nt { if -t { execl-toc -X -r /var/lib/random-seed } redirfd -w 1 /dev/urandom cat /var/lib/random-seed } 66-yeller -fcdp system-random -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp system-random -1 /dev/console stops... } if -nt { umask 0077 backtick -nD "512" -- bytes { cat /proc/sys/kernel/random/poolsize } importas -iu bytes bytes dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=${bytes} status=none } 66-yeller -fcdp system-random -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/system/system-hwclock000644 000000 000000 00000001665 14367774543 021776 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Configure the hardware clock" @user = ( root ) @options = ( !log ) @depends = ( 00 ) [start] @execute = ( if { 66-yeller -cdp system-hwclock -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} pipeline -d { echo ${HARDWARECLOCK} } pipeline { tr A-Z a-z } forstdin -- clock importas -iu clock clock hwclock --systz --${clock} --noadjfile } 66-yeller -fcdp system-hwclock -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp system-hwclock -1 /dev/console stops... } if -nt { execl-envfile ${conf_file} pipeline -d { echo ${HARDWARECLOCK} } pipeline { tr A-Z a-z } forstdin -- clock importas -iu clock clock hwclock --systohc --${clock} } 66-yeller -fcdp system-hwclock -1 /dev/console crashed! ) [environment] conf_file=!@bootconf@ ./usr/share/66/module/boot@/service/system/system-hostname000644 000000 000000 00000000602 14367774543 022150 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Set hostname" @user = ( root ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp system-hostname -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} s6-hostname ${HOSTNAME} } 66-yeller -fcdp system-hostname -1 /dev/console crashed! ) [environment] conf_file=!@bootconf@ ./usr/share/66/module/boot@/service/system/system-fsck000644 000000 000000 00000001650 14367774543 021264 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Check filesystem partition" @user = ( root ) @options = ( !log ) @depends = ( all-Mount system-Devices system-fontnkey ) [start] @execute = ( if { 66-yeller -cdp system-fsck -1 /dev/console starts... } execl-envfile ${conf_file} ifelse -X { s6-test ${FORCECHCK} = yes } { if { 66-yeller -cdp system-fsck -1 /dev/console FORCECHCK was asked... } execl-cmdline -s { pipeline { fsck -f ${cmd_args} } 66-yeller -Scdp system-fsck -1 /dev/console } } foreground { pipeline { execl-cmdline -s { fsck ${cmd_args} } } 66-yeller -Scdp system-fsck -1 /dev/console } importas ? ? ifelse { test $? -gt 1 } { 66-yeller -Wcdp system-fsck -1 /dev/console fsck reports errors -- at least system should be rebooted } true ) [environment] cmd_args=!-A -T -a noopts=_netdev conf_file=!@bootconf@ ./usr/share/66/module/boot@/service/system/system-fontnkey000644 000000 000000 00000001224 14367774543 022170 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Set font and keymap for tty" @user = ( root ) @options = ( !log ) @depends = ( udevadm ) [start] @execute = ( if { 66-yeller -cdp system-fontnkey -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} background { forbacktickx index { seq 12 } importas -u -D "" index index sh -c "setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} $FONT -C /dev/tty${index}" } loadkeys -q -u ${KEYMAP} } 66-yeller -fcdp system-fontnkey -1 /dev/console crashed! ) [environment] conf_file=!@bootconf@ ./usr/share/66/module/boot@/service/system/system-Devices000644 000000 000000 00000000311 14367774543 021711 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "Activate specific devices" @user = ( root ) @contents = ( devices-dmraid devices-btrfs devices-crypttab devices-lvm devices-zfs devices-mdraid ) ./usr/share/66/module/boot@/service/system/modules/modules-system000644 000000 000000 00000000537 14367774543 023461 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Load modules from modules-load directories" @user = ( root ) @options = ( !log ) @depends = ( 00 ) [start] @execute = ( if { 66-yeller -cdp modules-system -1 /dev/console starts... } if -nt { modules-load -v } 66-yeller -Wcdp modules-system -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/system/modules/modules-kernel000644 000000 000000 00000000754 14367774543 023416 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Load kernel modules" @user = ( root ) @depends = ( 00 ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp modules-kernel -1 /dev/console starts... } if -nt { pipeline -d { kmod static-nodes --format=devname } pipeline { s6-cut -d" " -f1 } forstdin -pd "\n" -- mod importas -iu -D "" mod mod modprobe $mod } 66-yeller -fcdp modules-kernel -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/system/devices/devices-zfs-import-scan000644 000000 000000 00000000646 14367774543 025116 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Import ZFS pools by device scanning" @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp devices-zfs-import-scan -1 /dev/console starts... } if -nt { execl-cmdline -s { zpool import ${cmd_args} } } 66-yeller -fcdp devices-zfs-import-scan -1 /dev/console crashed! ) [environment] cmd_args=!-aN -o cachefile=none ./usr/share/66/module/boot@/service/system/devices/devices-zfs-import-cache000644 000000 000000 00000000727 14367774543 025235 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Import ZFS pools by cache file" @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp devices-zfs-import-cache -1 /dev/console starts... } if -nt { execl-cmdline -s { zpool import -c ${conf_dir}/${conf_file} ${cmd_args} } } 66-yeller -fcdp devices-zfs-import-cache -1 /dev/console crashed! ) [environment] conf_dir=!/etc/zfs conf_file=!zpool.cache cmd_args=!-aN ./usr/share/66/module/boot@/service/system/devices/devices-zfs000644 000000 000000 00000001502 14367774543 022654 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount ZFS datasets" @optsdepends = ( devices-zfs-import-scan devices-zfs-import-cache ) @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp devices-zfs -1 /dev/console starts... } ifelse { blkid -c /dev/null --match-token=TYPE="zfs_member" } { ifelse -n { 66-which -q zfs } { if { 66-yeller -cdp device-zfs -1 /dev/console No zfs program available, check your configuration! } exit 0 } if -nt { if { execl-cmdline -s { zfs mount ${mount_args} } } execl-cmdline -s { zfs share ${share_args} } } 66-yeller -fcdp devices-zfs -1 /dev/console crashed! } 66-yeller -cdp device-zfs -1 /dev/console no zfs volumes available!! ) [environment] mount_args=!-a -l share_args=!-a ./usr/share/66/module/boot@/service/system/devices/devices-mdraid000644 000000 000000 00000001251 14367774543 023313 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Activate software raid devices" @user = ( root ) @depends = ( udevadm ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp devices-mdraid -1 /dev/console starts... } ifelse { blkid -c /dev/null --match-token=TYPE="linux_raid_member" } { ifelse -n { 66-which -q mdadm } { if { 66-yeller -cdp device-mdraid -1 /dev/console No mdadm program available, check your configuration! } exit 0 } if -nt { mdadm -As } 66-yeller -fcdp devices-mdraid -1 /dev/console crashed! } 66-yeller -cdp device-mdraid -1 /dev/console no mdraid arrays available! ) ./usr/share/66/module/boot@/service/system/devices/devices-lvm000644 000000 000000 00000001272 14367774543 022654 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Activate lvm devices" @user = ( root ) @depends = ( udevadm devices-dmraid devices-mdraid ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp devices-lvm -1 /dev/console starts... } ifelse { blkid -c /dev/null --match-token=TYPE="LVM2_member" } { ifelse -n { 66-which -q vgchange } { if { 66-yeller -cdp device-lvm -1 /dev/console No vgchange program available, check your configuration! } exit 0 } if -nt { vgchange --sysinit -a ay } 66-yeller -fcdp devices-lvm -1 /dev/console crashed! } 66-yeller -cdp device-lvm -1 /dev/console no lvm volumes available! ) ./usr/share/66/module/boot@/service/system/devices/devices-dmraid000644 000000 000000 00000000764 14367774543 023323 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Active dmraid devices" @user = ( root ) @depends = ( udevadm ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp devices-dmraid -1 /dev/console starts... } ifelse -n { 66-which -q dmraid } { if { 66-yeller -cdp device-dmraid -1 /dev/console No dmraid program available, check your configuration! } exit 0 } if -nt { dmraid -vv -i -ay } 66-yeller -Wcdp devices-dmraid -1 /dev/console crached - no raid volumes found! ) ./usr/share/66/module/boot@/service/system/devices/devices-crypttab000644 000000 000000 00000002421 14367774543 023703 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Activate encrypted devices" @user = ( root ) @options = ( !log ) @depends = ( udevadm devices-dmraid devices-lvm devices-mdraid ) [start] @execute = ( if { 66-yeller -cdp devices-crypttab -1 /dev/console starts... } ifelse { blkid -c /dev/null --match-token=TYPE="crypto_LUKS" } { ifelse { execl-toc -X -e ${script_conf} } { if -nt { if { execl-cmdline -s { 66-olexec awk -f ${script_file} ${script_conf} } } foreground { if { blkid --match-token=TYPE="LVM2_member" } if { 66-which -q vgchange } if { 66-yeller -cdp devices-crypttab -1 /dev/console Activating LVM devices for dm-crypt... } if -nt { vgchange --sysinit -a ay } 66-yeller -cdp devices-crypttab -1 /dev/console unable to activate LVM devices } } 66-yeller -fcdp devices-crypttab -1 /dev/console crashed! } if { 66-yeller -cdp device-crypttab -1 /dev/console no ${script_conf} available, check your installation and configuration! } exit 0 } 66-yeller -cdp device-crypttab -1 /dev/console no encrypted volumes available! ) [environment] script_file=!@scripts@/crypt.awk script_conf=!/etc/crypttab ./usr/share/66/module/boot@/service/system/devices/devices-btrfs000644 000000 000000 00000001232 14367774543 023172 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Activate btrfs devices" @user = ( root ) @depends = ( udevadm ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp devices-btrfs -1 /dev/console starts... } ifelse { blkid -c /dev/null --match-token=TYPE="btrfs" } { ifelse -n { 66-which -q btrfs } { if { 66-yeller -cdp device-btrfs -1 /dev/console No btrfs program available, check your configuration! } exit 0 } if -nt { btrfs device scan } 66-yeller -fcdp devices-btrfs -1 /dev/console crashed! } 66-yeller -cdp device-btrfs -1 /dev/console no btrfs volumes available! ) ./usr/share/66/module/boot@/service/mount/populate/populate-tmp000644 000000 000000 00000000622 14367774543 023110 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Populate /tmp directory" @user = ( root ) @depends = ( mount-tmp ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp populate-tmp -1 /dev/console starts... } if -nt { execl-toc -d /tmp/.X11-unix -m 1777 execl-toc -X -d /tmp/.ICE-unix -m 1777 } 66-yeller -fcdp populate-tmp -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/populate/populate-sys000644 000000 000000 00000003444 14367774543 023133 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Populate /sys directory" @user = ( root ) @depends = ( mount-proc mount-sys ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp populate-sys -1 /dev/console starts... } if -nt { foreground { if -t { grep -Fq efivarfs /proc/filesystems } execl-toc -tX -m /sys/firmware/efi/efivars -o noatime,nodev,noexec,nosuid,rw -t efivarfs -d efivars } foreground { if -t { grep -Fq fusectl /proc/filesystems } execl-toc -tX -m /sys/fs/fuse/connections -o noatime,nodev,noexec,nosuid -t fusectl -d fusectl } foreground { if -t { grep -Fq configfs /proc/filesystems } execl-toc -tX -m /sys/kernel/config -o noatime,nodev,noexec,nosuid -t configfs -d configfs } foreground { if -t { grep -Fq debugfs /proc/filesystems } execl-toc -tX -m /sys/kernel/debug -o noatime,nodev,noexec,nosuid -t debugfs -d debugfs } foreground { if -t { grep -Fq securityfs /proc/filesystems } execl-toc -tX -m /sys/kernel/security -o noatime,nodev,noexec,nosuid -t securityfs -d securityfs } } 66-yeller -fcdp populate-sys -1 /dev/console crashed! ) [stop] @execute = ( if { 66-yeller -cdp populate-sys -1 /dev/console stops... } if -nt { foreground { forx -p dir { /sys/firmware/efi/efivars /sys/fs/fuse/connections /sys/kernel/config /sys/kernel/debug /sys/kernel/tracing /sys/kernel/security } importas -ui dir dir foreground { execl-toc -Dt -m ${dir} umount -l ${dir} } } } 66-yeller -fcdp populate-sys -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/populate/populate-run000644 000000 000000 00000001002 14367774543 023105 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Populate /run directory" @user = ( root ) @depends = ( mount-run ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp populate-run -1 /dev/console starts... } if -nt { if { forx -o 0 -p dir { lvm user lock } importas -ui dir dir execl-toc -X -d /run/${dir} } install -m0664 -o root -g utmp /dev/null /run/utmp } 66-yeller -fcdp populate-run -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/populate/populate-dev000644 000000 000000 00000002010 14367774543 023057 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Populate /dev directory" @user = ( root ) @depends = ( mount-dev ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp populate-dev -1 /dev/console starts... } if -nt { foreground { if -t { grep -Fq hugetlbfs /proc/filesystems } execl-toc -tX -m /dev/hugepages -o noatime,nodev,noexec,nosuid -t hugetlbfs -d hugepages } foreground { if -t { grep -Fq mqueue /proc/filesystems } execl-toc -tX -m /dev/mqueue -o noatime,nodev,noexec,nosuid -t mqueue -d mqueue } } 66-yeller -fcdp populate-dev -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp populate-dev -1 /dev/console stops... } if -nt { forx -p dir { /dev/hugepages /dev/mqueue } importas -ui dir dir foreground { execl-toc -tD -m ${dir} umount -l ${dir} } } 66-yeller -fcdp populate-dev -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/mount-tmp000644 000000 000000 00000001142 14367774543 020566 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /tmp directory" @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp mount-tmp -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /tmp ${cmd_args} } } 66-yeller -fcdp mount-tmp -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp mount-tmp -1 /dev/console stops... } if -nt { execl-toc -tD -m /tmp umount -lR /tmp } 66-yeller -fcdp mount-tmp -1 /dev/console crashed! ) [environment] cmd_args=!-o noatime,nodev,nosuid -t tmpfs -d tmp ./usr/share/66/module/boot@/service/mount/mount-sys000644 000000 000000 00000000656 14367774543 020615 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /sys directory" @options = ( !log ) @user = ( root ) @depends = ( mount-proc ) [start] @execute = ( if { 66-yeller -cdp mount-sys -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /sys ${cmd_args} } } 66-yeller -fcdp mount-sys -1 /dev/console crashed! ) [environment] cmd_args=!-o nosuid,noexec,nodev -t sysfs -d sys ./usr/share/66/module/boot@/service/mount/mount-swap000644 000000 000000 00000001032 14367774543 020736 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount swap partition" @user = ( root ) @depends=( mount-rw ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp mount-swap -1 /dev/console starts... } if -nt { swapon -a } 66-yeller -fcdp mount-swap -1 /dev/console unable to activate the swap! ) [stop] @execute = ( if { 66-yeller -cdp mount-swap -1 /dev/console stops... } if -nt { swapoff -a } 66-yeller -Wcdp mount-swap -1 /dev/console failed! ) ./usr/share/66/module/boot@/service/mount/mount-shm000644 000000 000000 00000001214 14367774543 020555 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /dev/shm directory" @options = ( !log ) @user = ( root ) @depends =( mount-dev ) [start] @execute = ( if { 66-yeller -cdp mount-shm -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /dev/shm ${cmd_args} } } 66-yeller -fcdp mount-shm -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp mount-shm -1 /dev/console stops... } if -nt { execl-toc -tD -m /dev/shm umount -lR /dev/shm } 66-yeller -fcdp mount-shm -1 /dev/console crashed! ) [environment] cmd_args=!-o mode=1777,nosuid,nodev -t tmpfs -d shm ./usr/share/66/module/boot@/service/mount/mount-rw000644 000000 000000 00000000617 14367774543 020424 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "remount rw '/' directory" @options = ( !log ) @user = ( root ) @depends = ( all-System ) [start] @execute = ( if { 66-yeller -cdp mount-rw -1 /dev/console starts... } if -nt { execl-cmdline -s { s6-mount ${cmd_args} } } 66-yeller -fcdp mount-rw -1 /dev/console crashed! ) [environment] cmd_args=!-o remount,rw / / ./usr/share/66/module/boot@/service/mount/mount-run000644 000000 000000 00000000627 14367774543 020601 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /run directory" @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp mount-run -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /run ${cmd_args} } } 66-yeller -fcdp mount-run -1 /dev/console crashed! ) [environment] cmd_args=!-o mode=0755,nosuid,nodev -t tmpfs -d run ./usr/share/66/module/boot@/service/mount/mount-pts000644 000000 000000 00000001227 14367774543 020600 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /dev/pts directory" @options = ( !log ) @user = ( root ) @depends =( mount-dev ) [start] @execute = ( if { 66-yeller -cdp mount-pts -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /dev/pts ${cmd_args} } } 66-yeller -fcdp mount-pts -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp mount-pts -1 /dev/console stops... } if -nt { execl-toc -tD -m /dev/pts umount -lR /dev/pts } 66-yeller -fcdp mount-pts -1 /dev/console crashed! ) [environment] cmd_args=!-o mode=0620,gid=5,nosuid,noexec -t devpts -d devpts ./usr/share/66/module/boot@/service/mount/mount-proc000644 000000 000000 00000000630 14367774543 020732 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /proc directory" @options = ( !log ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp mount-proc -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /proc ${cmd_args} } } 66-yeller -fcdp mount-proc -1 /dev/console crashed! ) [environment] cmd_args=!-o nosuid,noexec,nodev -t proc -d proc ./usr/share/66/module/boot@/service/mount/mount-netfs000644 000000 000000 00000000576 14367774543 021117 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount no-network filesystem" @user = ( root ) @depends=( mount-rw ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp mount-netfs -1 /dev/console starts... } if -nt { mount -a -t "nosysfs,nonfs,nonfs4,nosmbfs,nocifs" -O no_netdev } 66-yeller -fcdp mount-netfs -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/mount-fstab000644 000000 000000 00000000525 14367774543 021071 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount partition from /etc/fstab file" @user = ( root ) @depends =( system-fsck ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp mount-fstab -1 /dev/console starts... } if -nt { mount -a } 66-yeller -fcdp mount-fstab -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/mount-dev000644 000000 000000 00000000655 14367774543 020554 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Mount /dev directory" @options = ( !log ) @user = ( root ) @depends = ( mount-sys ) [start] @execute = ( if { 66-yeller -cdp mount-dev -1 /dev/console starts... } if -nt { execl-cmdline -s { execl-toc -X -m /dev ${cmd_args} } } 66-yeller -fcdp mount-dev -1 /dev/console crashed! ) [environment] cmd_args=!-o mode=0755,nosuid -t devtmpfs -d dev ./usr/share/66/module/boot@/service/mount/mount-cgroups000644 000000 000000 00000001674 14367774543 021462 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "mount cgroups hierarchy" @user = ( root ) @depends = ( mount-dev ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp mount-cgroups -1 /dev/console starts... } if -nt { execl-toc -m /sys/fs/cgroup -t tmpfs -d cgroup execl-toc -m /sys/fs/cgroup/unified -t cgroup2 -o rw,nosuid,nodev,noexec,relatime,nsdelegate -d cgroup2 redirfd -r 0 /proc/cgroups pipeline { s6-tail -n +2 } pipeline { s6-cut -d"\t" -f1 } forstdin -d"\n" -- i importas -iu i i execl-toc -X -m /sys/fs/cgroup/${i} -t cgroup -o rw,nosuid,nodev,noexec,relatime,${i} -d cgroup } 66-yeller -fcdp mount-cgroups -1 /dev/console crashed! ) [stop] @execute= ( if { 66-yeller -cdp mount-cgroups -1 /dev/console stops... } if -nt { if { umount -lR /sys/fs/cgroup } } 66-yeller -fcdp mount-cgroups -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/mount/00000644 000000 000000 00000000431 14367774543 017045 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "Set the hostname and mount filesystem" @user = ( root ) @contents = ( system-hostname mount-run populate-run mount-tmp populate-tmp mount-proc mount-sys populate-sys mount-dev mount-pts mount-shm populate-dev mount-cgroups ) ./usr/share/66/module/boot@/service/local/local-time000644 000000 000000 00000000656 14367774543 020615 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Set localtime" @options = ( !log ) @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-time -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} s6-ln -nsf /usr/share/zoneinfo/${TZ} /etc/localtime } 66-yeller -fcdp local-time -1 /dev/console crashed! ) [environment] conf_file=!@bootconf@ ./usr/share/66/module/boot@/service/local/local-sethostname000644 000000 000000 00000001055 14367774543 022203 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Set hostname on /etc/hostname file" @options = ( !log ) @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-sethostname -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} execl-cmdline -s { redirfd -w 1 ${conf_file_hostname} 66-echo -- ${HOSTNAME} } } 66-yeller -fcdp local-sethostname -1 /dev/console crashed! ) [environment] conf_file=!@bootconf@ conf_file_hostname=!/etc/hostname ./usr/share/66/module/boot@/service/local/local-rc000644 000000 000000 00000001010 14367774543 020244 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Run rc.local script" @options = ( !log ) @user = ( root ) @depends = ( mount-rw local-iptables local-ip6tables local-nftables local-ebtables local-arptables local-loop local-time local-authfiles ) [start] @execute = ( if { 66-yeller -cdp local-rc -1 /dev/console starts... } if -nt { ${script_file} } 66-yeller -fcdp local-rc -1 /dev/console crashed! ) [environment] script_file=!@skeldir@/rc.local ./usr/share/66/module/boot@/service/local/local-loop000644 000000 000000 00000000634 14367774543 020624 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Active loop devices" @depends = ( mount-rw local-iptables local-ip6tables local-nftables local-ebtables local-arptables ) @user = ( root ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp local-loop -1 /dev/console starts... } if -nt { ip link set up dev lo } 66-yeller -fcdp local-loop -1 /dev/console crashed! ) ./usr/share/66/module/boot@/service/local/local-dmesg000644 000000 000000 00000001135 14367774543 020747 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Save logs of dmesg" @options = ( !log ) @depends = ( mount-rw local-iptables local-ip6tables local-nftables local-ebtables local-arptables local-loop local-sethostname local-time local-authfiles local-rc ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-dmesg -1 /dev/console starts... } if -nt { execl-cmdline -s { redirfd -w 1 ${cmd_log} dmesg ${cmd_args} } } 66-yeller -fcdp local-dmesg -1 /dev/console crashed! ) [environment] cmd_args=!-T cmd_log=!/var/log/dmesg.log ./usr/share/66/module/boot@/service/local/local-authfiles000644 000000 000000 00000001431 14367774543 021633 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Create tempory authentification files" @depends = ( mount-rw ) @user = ( root ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp local-authfiles -1 /dev/console starts... } if -nt { if -t { execl-toc -nt -e ${script_file_wtmp} foreground { install -m0664 -o root -g utmp /dev/null ${script_file_wtmp} } } if -t { execl-toc -nt -e ${script_file_btmp} foreground { install -m0600 -o root -g utmp /dev/null ${script_file_btmp} } } } 66-yeller -fcdp local-authfiles -1 /dev/console crashed! ) [environment] script_file_wtmp=!/var/log/wtmp script_file_btmp=!/var/log/btmp ./usr/share/66/module/boot@/service/local/firewall/local-nftables000644 000000 000000 00000001134 14367774543 023252 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Restore nftables rules" @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-nftables -1 /dev/console starts... } if -nt { execl-toc -e ${script_conf} nft -f ${script_conf} } 66-yeller -fcdp local-nftables -1 /dev/console crashed! ) [stop] @execute = ( if { 66-yeller -cdp local-nftables -1 /dev/console stops... } if -nt { nft flush ruleset } 66-yeller -fcdp local-nftables -1 /dev/console crashed! ) [environment] script_conf=!/etc/nftables.conf ./usr/share/66/module/boot@/service/local/firewall/local-iptables000644 000000 000000 00000001651 14367774543 023263 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Restore iptables rules" @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-iptables -1 /dev/console starts... } if -nt { execl-toc -e ${script_conf} iptables-restore ${script_conf} } 66-yeller -fcdp local-iptables -1 /dev/console crashed! ) [stop] @build = custom @shebang = "/usr/bin/bash -c" @execute = ( exec 2>&1 66-yeller -cdp local-iptables -1 /dev/console stops... if ! type -p iptables &>/dev/null; then 66-yeller -fcdp local-iptables -1 /dev/console unable to find iptables program exit 111 fi while read -r table; do tables+=("/usr/share/iptables/empty-$table.rules") done <"/proc/net/ip_tables_names" if (( ${#tables[*]} )); then cat "${tables[@]}" | iptables-restore fi ) [environment] script_conf=!/etc/iptables/iptables.rules ./usr/share/66/module/boot@/service/local/firewall/local-ip6tables000644 000000 000000 00000001316 14367774543 023347 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Restore ip6tables rules" @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-ip6tables -1 /dev/console starts... } if -nt { execl-toc -e ${script_conf} ip6tables-restore ${script_conf} } 66-yeller -fcdp local-ip6tables -1 /dev/console crashed! ) [stop] @execute = ( if { 66-yeller -cdp local-ip6tables -1 /dev/console stops... } if -nt { execl-toc -x ${script_file} ${script_file} } 66-yeller -fcdp local-ip6tables -1 /dev/console crashed! ) [environment] script_conf=!/etc/iptables/ip6tables.rules script_file=!/usr/lib/iptables/scripts/ip6tables-flush ./usr/share/66/module/boot@/service/local/firewall/local-ebtables000644 000000 000000 00000001145 14367774543 023237 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Restore ebtables rules" @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-ebtables -1 /dev/console starts... } if -nt { execl-toc -e ${script_conf} ebtables-restore ${script_conf} } 66-yeller -fcdp local-ebtables -1 /dev/console crashed! ) [stop] @execute = ( if { 66-yeller -cdp local-ebtables -1 /dev/console stops... } if -nt { ebtables-restore } 66-yeller -fcdp local-ebtables -1 /dev/console crashed! ) [environment] script_conf=!/etc/ebtables.conf ./usr/share/66/module/boot@/service/local/firewall/local-arptables000644 000000 000000 00000001155 14367774543 023434 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Restore arptables rules" @depends = ( mount-rw ) @user = ( root ) [start] @execute = ( if { 66-yeller -cdp local-arptables -1 /dev/console starts... } if -nt { execl-toc -e ${script_conf} arptables-restore ${script_conf} } 66-yeller -fcdp local-arptables -1 /dev/console crashed! ) [stop] @execute = ( if { 66-yeller -cdp local-arptables -1 /dev/console stops... } if -nt { arptables-restore } 66-yeller -fcdp local-arptables -1 /dev/console crashed! ) [environment] script_conf=!/etc/arptables.conf ./usr/share/66/module/boot@/service/all-System000644 000000 000000 00000000375 14367774543 017525 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "System configuration" @user = ( root ) @contents = ( system-hwclock modules-kernel system-random modules-system system-sysctl udevd udevadm system-fontnkey system-Devices system-fsck mount-fstab ) ./usr/share/66/module/boot@/service/all-Runtime000644 000000 000000 00000002070 14367774543 017656 0ustar00000000 000000 [main] @type = oneshot @version = @vers@ @description = "Launch all tree enabled of root user" @user = ( root ) @depends = ( all-Mount all-System all-Local ) @options = ( !log ) [start] @execute = ( if { 66-yeller -cdp all-Runtime -1 /dev/console starts... } if -nt { execl-envfile ${conf_file} 66-all -v${VERBOSITY} -l ${LIVE} up } execl-envfile ${conf_file} 66-yeller -Fcdp all-Runtime -1 /dev/console crashed! -- Your machine is operational but some runtime service failed to start correctly. Please see the complete boot log at ${LIVE}/log/0/current for further information. ) [stop] @execute = ( if { 66-yeller -cdp all-Runtime -1 /dev/console stops... } if -nt { execl-envfile ${conf_file} 66-all -v${VERBOSITY} -T ${timeout} -l ${LIVE} down } ## use -F here, we don't want to crash to avoid to ## not bring down properly the rest of the service 66-yeller -Fcdp all-Runtime -1 /dev/console crashed! ) [environment] conf_file=!@initconf@ ## Time to wait to bring down services timeout=!3000 ./usr/share/66/module/boot@/service/all-Mount000644 000000 000000 00000000167 14367774543 017342 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "Mount devices directories" @user = ( root ) @contents = ( 00 ) ./usr/share/66/module/boot@/service/all-Local000644 000000 000000 00000000461 14367774543 017267 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "Runtime system configuration" @user = ( root ) @contents = ( mount-rw mount-swap mount-netfs local-iptables local-ip6tables local-nftables local-ebtables local-arptables local-loop local-sethostname local-time local-authfiles local-rc local-dmesg ) ./usr/share/66/module/boot@/service/All000644 000000 000000 00000000251 14367774543 016174 0ustar00000000 000000 [main] @type = bundle @version = @vers@ @description = "Starting point of the boot sequence" @user = ( root ) @contents = ( all-Mount all-System all-Local all-Runtime ) ./usr/share/66/module/boot@/configure/configure000755 000000 000000 00000037371 14367774543 020006 0ustar00000000 000000 #!/usr/bin/sh ## 66-yeller variable export PROG="${MOD_NAME}" export VERBOSITY="${MOD_VERBOSITY}" export CLOCK_ENABLED=0 export COLOR_ENABLED="${MOD_COLOR}" ## script variable service_dir="${MOD_MODULE_DIR}/service" SV_REAL= ## sv_boolean_list contain keys that take yes or no as values sv_boolean_list="CRYPTTAB SETUPCONSOLE FSTAB SWAP LVM \ DMRAID MDRAID BTRFS ZFS UDEV SYSCTL LOCAL CONTAINER MODULE_KERNEL \ MODULE_SYSTEM RANDOMSEED MNT_PROC MNT_SYS MNT_DEV MNT_RUN MNT_TMP CGROUPS \ MNT_PTS MNT_SHM MNT_NETFS POPULATE_SYS POPULATE_DEV POPULATE_RUN POPULATE_TMP" ## sv_container_list contained keys for options that are disabled in a container sv_container_list="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \ ZFS UDEV UDEV_ADM SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS" ## sv_container_list is used by the check funtions and has the same contents as the ## sv_container_list, minus UDEV_ADM sv_container_list_check="HARDWARECLOCK SETUPCONSOLE CRYPTTAB SWAP LVM DMRAID MDRAID BTRFS \ ZFS UDEV SYSCTL FORCECHCK CGROUPS MODULE_SYSTEM RANDOMSEED MNT_NETFS" ## sv_extra_list_check is used by the check functions and contains keys that need ## to be present but are not in the previous lists sv_extra_list_check="HOSTNAME TZ TTY KEYMAP FONT" ## Message functions. They use 66-yeller to provide three different levels of ## messages for the script. Colors are available if 66-enabled is invoked with ## the -z option. die(){ # Prints a fatal error message, in red color and exits the script. fatal_error_message="$( printf '%s' "${@}" )" 66-yeller -f "%r $fatal_error_message %n" exit 111 } warn() { # Print a warning message, non-fatal, always visible in yellow color. warn_message="$( printf '%s' "${@}" )" 66-yeller -W "%y $warn_message %n" && warning_counter=$((warning_counter+1)) } emit_trace() { # Prints a tracing message in blue color, visible only when the 66-enable is # invoced with a verbosity (-v) level of 3 or above. trace_message="$( printf '%s' "${@}" )" 66-yeller -t "%b $trace_message %n" } ## Detect functions. They use blkid(8) from util-linux to detect volume types ## and 66-which to detect the needed utilities for the volume types detect_fs() { # Uses blkid to detect partition TYPEs. The result is the number # of detected partitions. export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )" } detect_swapfile() { # Finds swap references in /etc/fstab. swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )" export swapfile_detected } detect_util() { # Uses 66-which to determine if a utility exists. # Output is $fs_util_exitst=0 (or 1) # ${1} is the variable for the utility, in the form of "$fs_util" # ${2} is the name of the executable export "${1}"_exists="$(66-which "${2}" | wc -l)" } detect_fs btrfs detect_fs zfs_member detect_fs crypto_LUKS detect_fs LVM2_member detect_fs linux_raid_member # dmraid supports multiple TYPEs of *-raid-member devices. # find them first and add the sum of the *_detected values to # dmraid_detected. detect_fs ddf_raid_member detect_fs isw_raid_member detect_fs lsi_mega_raid_member detect_fs via_raid_member detect_fs silicon_medley_raid_member detect_fs nvidia_raid_member detect_fs promise_fasttrack_raid_member detect_fs hpt45x_raid_member detect_fs hpt37x_raid_member detect_fs adaptec_raid_member detect_fs jmicron_raid_member dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\ +lsi_mega_raid_member_detected+via_raid_member_detected\ +silicon_medley_raid_member_detected+nvidia_raid_member_detected\ +promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\ +hpt45x_raid_member_detected+adaptec_raid_member_detected\ +jmicron_raid_member_detected)) # swap can be detected by blkid if it is a partition or it can be a swapfile # declared in fstab detect_fs swap detect_swapfile swap_detected=$((swap_detected+swapfile_detected)) detect_util btrfs_util btrfs detect_util zfs_util zfs detect_util luks_util cryptsetup detect_util lvm_util lvchange detect_util dmraid_util dmraid detect_util swap_util swapon detect_util mdraid_util mdadm ## Check functions. check_var_existance() { # ${1} is a list with key names for key in ${1} do eval key_value="\$${key}" key_value="$key_value" if [ -z "$key_value" ]; then die "$key is not present or misconfigured. The process cannot continue, please fix yout configuration and try again!" fi done } check_boolean_var_values() { # ${1} is a list of key names # ${2} and ${3} are valid values for these keys for key in ${1} do eval key_value="\$${key}" key_value="$key_value" if [ "$key_value" = "${2}" ]; then emit_trace "$key has a correct value of [$key_value]" elif [ "$key_value" = "${3}" ]; then emit_trace "$key has a correct value of [$key_value]" else die " [${key_value}] is not a valid value for ${key}. The process cannot continue, please fix your configuration and try again!" fi done } check_volume_sanity() { # ${1} is the configuration key for the volume type # ${2} is the value of the relevant detect_fs function # ${3} is the value of the relevant detect_util_exists function # ${4} is the name of the relevant utility # Check if volumes of a certain type (${2}) exist, if the utility # needed for the type exists and if that volume type is enabled # in the environment file. eval key_value="\$${1}" key_value="$key_value" [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 1 ] && \ emit_trace "${1} is enabled and configured correctly." [ "$key_value" = "yes" ] && [ "${2}" -eq 0 ] && warn "${1} is set to [ $key_value ] but there are no relevant volumes present. This is\ a non-fatal warning, you may want to check your configuration!" [ "$key_value" = "yes" ] && [ "${2}" -gt 0 ] && [ "${3}" -eq 0 ] && \ die "${1} is set to [$key_value], relevant volumes exist but the [${4}] program is not present in the system. \ The process cannot continue, please check your configuration and try again." [ "$key_value" = "no" ] && [ "${2}" -gt 0 ] && \ warn "${1} is set to [$key_value], but relevant volumes exist. \ This is a non-fatal warning but you should check your configuration!" } check_tty_number() { # TTY should between 1 and 11. Warn if it is 0, abort with an error # if it is outside of this range. key_value="$TTY" if [ "${key_value}" -gt 11 ]; then die "TTY should have a value between 1 and 11. The current value\ of [$key_value] is not valid. The process cannot continue, please fix\ your configuration and try again" elif [ "$key_value" -lt 0 ]; then die "TTY should have a value between 1 and 11. The process cannot\ continue, please fix your configuration and try again" elif [ "$key_value" -eq 0 ]; then warn "TTY has a value of [0]. That is valid, but means that the\ system will not have a configured tty." else emit_trace "TTY has a valid value. [$key_value] ttys will be\ configured. " fi } check_tz() { # TZ should have a timezone that exists as a value execl-toc -n -X -e /usr/share/zoneinfo/"$TZ" && die "[ ${TZ} ] is not \ a valid value for TZ. The process cannot continue, please check your configuration and try again." execl-toc -X -e /usr/share/zoneinfo/"$TZ" && emit_trace "TZ is correctly configured, with a\ value of [${TZ}]." } check_keymap() { # KEYMAP value is checked against a generated list of keymaps in the system keymap_list="" keymap_list="$(find /usr/share/kbd/keymaps/ -type f -iname "*.map.gz" -printf "%f " | sed 's|.map.gz||g')" keymap_exists= for keymap in $keymap_list; do [ "$keymap" = "${KEYMAP}" ] && export keymap_exists=1 ; done if [ "$keymap_exists" = "1" ] ; then emit_trace "KEYMAP is correctly configured with a value of [${KEYMAP}]." else die "[${KEYMAP}] is not a valid value for KEYMAP. The process cannot continue,\ please check your configuration and try again." fi } check_consolefont() { # FONT value is checked against a generated list of console fonts that # exist in the system. Currently psf and psfu types are listed, compressed # with gz. We will see if that is enough. console_fontlist="" console_fontlist="$(find /usr/share/kbd/consolefonts/ -type f -iname "*.psf.gz" -printf "%f " | sed 's|.psf.gz||g')" console_fontlist="$console_fontlist $(find /usr/share/kbd/consolefonts/ -type f -iname "*.psfu.gz" -printf "%f " | sed 's|.psfu.gz||g')" font_exists= for font in $console_fontlist; do [ "$font" = "${FONT}" ] && export font_exists=1 ; done if [ "$font_exists" = "1" ] ; then emit_trace "FONT is correctly configured with a value of [${FONT}]." else die " [${FONT}] is not a valid value for FONT. The process cannot continue,\ please check your configuration and try again." fi } retrieve_sv_name(){ # Matches the configuration key of the environment section/file to the name # of the corresponding service frontend. sv=${1} case ${sv} in HARDWARECLOCK) SV_REAL="system-hwclock" ;; CRYPTTAB) SV_REAL="devices-crypttab" ;; SETUPCONSOLE) SV_REAL="system-fontnkey" ;; FSTAB) SV_REAL="mount-fstab" ;; SWAP) SV_REAL="mount-swap" ;; LVM) SV_REAL="devices-lvm" ;; DMRAID) SV_REAL="devices-dmraid" ;; MDRAID) SV_REAL="devices-mdraid" ;; BTRFS) SV_REAL="devices-btrfs" ;; ZFS) SV_REAL="devices-zfs" ;; UDEV) SV_REAL="udevd" ;; SYSCTL) SV_REAL="system-sysctl" ;; FORCECHCK) SV_REAL="system-fsck" ;; LOCAL) SV_REAL="local-rc" ;; MODULE_KERNEL) SV_REAL="modules-kernel" ;; MODULE_SYSTEM) SV_REAL="modules-system" ;; RANDOMSEED) SV_REAL="system-random" ;; MNT_PROC) SV_REAL="mount-proc" ;; MNT_SYS) SV_REAL="mount-sys" ;; MNT_DEV) SV_REAL="mount-dev" ;; MNT_RUN) SV_REAL="mount-run" ;; MNT_TMP) SV_REAL="mount-tmp" ;; CGROUPS) SV_REAL="mount-cgroups" ;; MNT_PTS) SV_REAL="mount-pts" ;; MNT_SHM) SV_REAL="mount-shm" ;; MNT_NETFS) SV_REAL="mount-netfs" ;; POPULATE_SYS) SV_REAL="populate-sys" ;; POPULATE_DEV) SV_REAL="populate-dev" ;; POPULATE_RUN) SV_REAL="populate-run" ;; POPULATE_TMP) SV_REAL="populate-tmp" ;; TTY) SV_REAL="tty-rc@" ;; ## extra service not set by the environment section UDEV_ADM) SV_REAL="udevadm" ;; esac unset sv } sv_uncomment_list() { name=${1} list="$(find "${service_dir}" -mindepth 1 -type f)" retrieve_sv_name "${name}" 66-yeller %benable%n service: "${SV_REAL}" for sv in ${list}; do sed -i "s:#*${SV_REAL}:${SV_REAL}:g" "${sv}" || die "unable to sed ${sv}" done unset list } sv_comment_list() { name=${1} list="$(find "${service_dir}" -mindepth 1 -type f)" file= retrieve_sv_name "${name}" 66-yeller %rdisable%n service: "${SV_REAL}" for sv in ${list}; do sv_name=${sv##*/} if [ "${SV_REAL}" = "${sv_name}" ];then file="${sv}" fi sed -i "s:${SV_REAL}:#${SV_REAL}:g" "${sv}" || die "unable to sed ${sv}" done if [ -n "${file}" ];then rm -f "${file}" || die "unable to remove ${file}" fi unset list } sv_uncomment_real() { name=${1} list="$(find "${service_dir}" -mindepth 1 -type f)" 66-yeller %benable%n service: "${name}" for sv in ${list}; do sed -i "s:#*${name}:${name}:g" "${sv}" || die "unable to sed ${sv}" done unset list } sv_comment_real() { name=${1} list="$(find "${service_dir}" -mindepth 1 -type f)" 66-yeller %rdisable%n service: "${name}" file= for sv in ${list}; do sv_name=${sv##*/} if [ "${name}" = "${sv_name}" ];then file="${sv}" fi sed -i "s:${name}:#${name}:g" "${sv}" || die "unable to sed ${sv}" done if [ -n "${file}" ];then rm -f "${file}" || die "unable to remove ${file}" fi } # Check the configuration if CHECK_CONFIGURATION is set to "yes" in the # environment section/file if [ "${CHECK_CONFIGURATION}" = "yes" ]; then warning_counter=0 check_var_existance "$sv_boolean_list" check_var_existance "$sv_container_list_check" check_var_existance "$sv_extra_list_check" check_boolean_var_values "$sv_boolean_list" "yes" "no" check_tty_number check_tz check_keymap check_consolefont check_volume_sanity BTRFS "$btrfs_detected" "$btrfs_util_exists" btrfs check_volume_sanity ZFS "$zfs_member_detected" "$zfs_util_exists" zfs check_volume_sanity CRYPTTAB "$crypto_LUKS_detected" "$luks_util_exists" cryptsetup check_volume_sanity LVM "$LVM2_member_detected" "$lvm_util_exists" lvchange check_volume_sanity DMRAID "$dmraid_detected" "$dmraid_util_exists" dmraid check_volume_sanity SWAP "$swap_detected" "$swap_util_exists" swapon check_volume_sanity MDRAID "$linux_raid_member_detected" "$mdraid_util_exists" mdadm if [ "${ZFS}" = "yes" ]; then check_boolean_var_values "ZFS_IMPORT" zpoolcache devices-zfs-import-scan fi # If there are warnings, display a message and wait for a time relative # to the number of warnings. if [ $warning_counter -gt 0 ]; then 66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n 66-yeller %g Please see above for warnings. The proccess will continue shortly... %n 66-yeller %g ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %n wait_timer=$((warning_counter*3)) sleep "$wait_timer" fi fi 66-yeller %benable%n service: "tty-earlier@tty12" touch "${service_dir}/tty-earlier@tty12" || die "unable to create ${service_dir}/tty-earlier@tty12" for sv in ${sv_boolean_list}; do if [ "${sv}" = "CONTAINER" ]; then continue fi eval val="\$${sv}" val="${val}" if [ "${val}" = "yes" ]; then sv_uncomment_list "${sv}" else sv_comment_list "${sv}" fi done comment_udev() { for sv in "udevd" "udevadm" "system-fontnkey" "devices-crypttab" \ "devices-dmraid" "devices-mdraid" "devices-btrfs" "devices-lvm" ; do sv_comment_real ${sv} done } comment_zfs() { for sv in "devices-zfs-import-cache" "devices-zfs-import-scan"; do sv_comment_real "${sv}" done } if [ "${UDEV}" = "no" ]; then comment_udev fi if [ "${CONTAINER}" = "yes" ]; then for sv in ${sv_container_list}; do sv_comment_list "${sv}" done fi if [ "${ZFS}" = "yes" ]; then if [ "${ZFS_IMPORT}" = "zpoolcache" ]; then sv_comment_real "devices-zfs-import-scan" else # set default to scan sv_comment_real "devices-zfs-import-cache" fi else comment_zfs fi if [ "${LVM}" = "no" ] && \ [ "${DMRAID}" = "no" ] && \ [ "${BTRFS}" = "no" ] && \ [ "${ZFS}" = "no" ] && \ [ "${MDRAID}" = "no" ] && \ [ "${CRYPTTAB}" = "no" ]; then sv_comment_real "system-Devices" fi if [ "${TTY}" -gt 0 ]; then for i in $(seq "${TTY}"); do [ "${i}" -lt 12 ] || break 66-yeller %benable%n service: "tty-rc@tty${i}" touch "${service_dir}/tty-rc@tty${i}" || die "unable to create ${service_dir}/tty-rc@tty${i}" done fi if execl-toc -X -V FIREWALL; then check_var_existance "FIREWALL" for sv in "iptables" "ip6tables" "nftables" "ebtables" "arptables"; do if [ "${FIREWALL}" = "${sv}" ]; then sv_uncomment_real "local-${sv}" else sv_comment_real "local-${sv}" fi done else for sv in "local-iptables" "local-ip6tables" "local-nftables" "local-ebtables" "local-arptables"; do sv_comment_real "${sv}" done fi 66-yeller "%bsuccessfully%n configured"./usr/bin/66boot-storage-autoconf000755 000000 000000 00000014505 14367774543 015316 0ustar00000000 000000 #!/bin/sh # Copyright 2021 mobinmob # Use of this source code is governed by the 2-Clause BSD License # that can be found in the LICENSE file at the root project directory. # SPDX short identifier: BSD-2-Clause # This script determines if the system has dmraid, luks, zfs, btrfs, # volumes, a swap partition or swapfile and configures the environment # file of the boot@system service accordingly. # Excluding the common posix userland commands, the script needs 66-which and 66-yeller # (from 66-tools), 66-env (from 66) and blkid (from util-linux). # Variables for 66-yeller export PROG="66boot-storage-autoconf" export COLOR_ENABLED="1" export CLOCK_ENABLED="0" # Script must run as root. user=$(id -u) [ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n && exit 1 # blkid(8) from util-linux should be available for the script to function. [ "$(blkid -v | grep util-linux -c)" != "1" ] && \ 66-yeller -F %r You need blkid from util-linux to run this program! %n && exit 1 detect_fs() { # Uses blkid to detect partition TYPEs. The result is the number # of detected partitions. TYPEs are available with `blkid -k`. export "${1}"_detected="$(blkid -c /dev/null --match-token=TYPE="${1}" | wc -l )" } detect_swapfile() { # Finds swap references in /etc/fstab. swapfile_detected="$(awk '!/^(#)/' /etc/fstab | awk '$3=="swap" ' | wc -l )" export swapfile_detected } detect_util() { # Uses 66-which to determine if a utility exists. # Output is $fs_util_exitst=0 (or 1) # ${1} is the variable for the utility, in the form of "$fs_util" # ${2} is the name of the executable export "${1}"_exists="$(66-which "${2}" | wc -l)" } check_and_apply_conf() { # Checks for partition types and the existance of the relevant utilities. # Outputs user information # ${1} is in the form of $fs_detected # ${2} is in the form of $fs_name_exists # ${3} is the name of the configuration variable # ${4} is the user-friendly name for the configuration option # ${5} name of the utility needed for the block device type # ${6} is the name of the package that contains the program # ${6} is **distribution-dependent** if [ "${1}" != "0" ] && [ "${2}" = "1" ] then 66-env -t boot -r "${3}"=!yes boot@system 66-yeller %g "${4} detected and enabled!" %n elif [ "${1}" != "0" ] && [ "${2}" = "0" ] then 66-env -t boot -r "${3}"=!no boot@system 66-yeller -W %y "${4} detected but cannot be enabled,\n because the ${5} program is not installed. Please install the ${6} \n package and run this script again!" %n elif [ "${1}" = "0" ] then 66-env -t boot -r "${3}"=!no boot@system 66-yeller %b "${4} not detected!" %n fi } check_and_apply_conf_zpool() { # Checks for the zfs pool import method if ZFS is enabled. # Outputs user information # ${1} is in the form of $fs_detected # ${2} is in the form of $fs_name_exists if [ "${1}" != "0" ] && [ "${2}" = "1" ] then 66-env -t boot -r "ZFS"=!yes boot@system if [ -e /etc/zfs/zpool.cache ] then 66-env -t boot -r ZFS_IMPORT=!zpoolcache boot@system 66-yeller %g "ZFS import method configured as zpoolcache." %n else 66-env -t boot -r ZFS_IMPORT=!scan boot@system 66-yeller %g "ZFS import method configured as scan." %n fi fi } # devices_to_detect is a list of some device TYPEs we want to detect devices_to_detect="btrfs zfs_member crypto_LUKS linux_raid_member LVM2_member swap" # Use detect fs for all members of devices_to_detect we want for key in $devices_to_detect; do detect_fs "$key" ; done # dmraid supports multiple TYPEs of *-raid-member devices. # find them first and add the sum of the *_detected values to # dmraid_detected. # dmraid_TYPEs holds the device TYPEs dmraid handles dmraid_TYPEs="ddf_raid_member isw_raid_member lsi_mega_raid_member \ via_raid_member silicon_medley_raid_member nvidia_raid_member \ promise_fasttrack_raid_member hpt45x_raid_member hpt37x_raid_member \ adaptec_raid_member jmicron_raid_member" for TYPE in $dmraid_TYPEs; do detect_fs "$TYPE" ; done # shellcheck disable=SC2154 dmraid_detected=$((ddf_raid_member_detected+isw_raid_member_detected\ +lsi_mega_raid_member_detected+via_raid_member_detected\ +silicon_medley_raid_member_detected+nvidia_raid_member_detected\ +promise_fasttrack_raid_member_detected+hpt37x_raid_member_detecter\ +hpt45x_raid_member_detected+adaptec_raid_member_detected\ +jmicron_raid_member_detected)) # swap can be detected by blkid if it is a partition or it can be a swapfile # declared in fstab detect_swapfile swap_detected=$((swap_detected+swapfile_detected)) # Use detect_util for all utilities detect_util btrfs_util btrfs detect_util zfs_util zfs detect_util luks_util cryptsetup detect_util lvm_util lvchange detect_util dmraid_util dmraid detect_util swap_util swapon detect_util mdraid_util mdadm # Finally detect and apply the configuration # shellcheck disable=SC2154 check_and_apply_conf "$btrfs_detected" "$btrfs_util_exists" BTRFS BTRFS btrfs "[btrfs_progs]" # shellcheck disable=SC2154 check_and_apply_conf "$zfs_member_detected" "$zfs_util_exists" ZFS ZFS zfs "[zfs]" # shellcheck disable=SC2154 check_and_apply_conf_zpool "$zfs_member_detected" "$zfs_util_exists" ZFS # shellcheck disable=SC2154 check_and_apply_conf "$crypto_LUKS_detected" "$luks_util_exists" CRYPTTAB LUKS cryptsetup "[cryptsetup]" # shellcheck disable=SC2154 check_and_apply_conf "$LVM2_member_detected" "$lvm_util_exists" LVM LVM lvchange "[lvm2]" # shellcheck disable=SC2154 check_and_apply_conf "$dmraid_detected" "$dmraid_util_exists" DMRAID DMRAID dmraid "[dmraid]" # shellcheck disable=SC2154 check_and_apply_conf "$swap_detected" "$swap_util_exists" SWAP SWAP swapon "[util-linux]" # shellcheck disable=SC2154 check_and_apply_conf "$linux_raid_member_detected" "$mdraid_util_exists" MDRAID MDRAID mdadm "[mdadm]" 66-yeller %g "Please re-enable the boot@system service for the changes to take effect by running (as root): '66-enable -F -t boot boot@system'" %n ./usr/bin/66boot-rcdotconf000755 000000 000000 00000005752 14367774543 014023 0ustar00000000 000000 #!/bin/sh # Copyright 2021 mobinmob # Use of this source code is governed by the 2-Clause BSD License # that can be found in the LICENSE file at the root project directory. # SPDX short identifier: BSD-2-Clause # This script reads a **valid** rc.conf and writes the values to the # corresponding configuration options in the boot@system environment file. # Excluding the common posix userland commands, the script needs 66-yeller # (from 66-tools) and 66-env (from 66). # Variables for 66-yeller export PROG="66boot-rcdotconf" export COLOR_ENABLED="1" export CLOCK_ENABLED="0" # Script must run as root. user=$(id -u) [ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n && exit 1 HOSTNAME= HOSTNAME1= HARDWARECLOCK= TIMEZONE= KEYMAP= FONT= FONT_MAP= FONT_UNIMAP= TTYS= apply_conf_from_to(){ # Set configuration value ${3} from ${1} to ${2} # ${1} is the conf option from /etc/rc.conf # ${2} is the conf option from the boot@ conf file # ${3} is the value from the /etc/rc.conf option/var if [ -n "${3}" ] then 66-env -t boot -r "${2}"=!"${3}" boot@system 66-yeller %g "${2} set to [${3}]." %n fi } set_hostname() { # ${1} HOSTNAME value [ -r /etc/hostname ] && HOSTNAME1="$( cat /etc/hostname )" && export HOSTNAME1 if [ -n "${1}" ] then 66-env -t boot -r HOSTNAME=!"${1}" boot@system 66-yeller %g "HOSTNAME set to [${1}]." %n elif [ -n "$HOSTNAME1" ] then 66-env -t boot -r HOSTNAME=!"$HOSTNAME1" boot@system 66-yeller %g "HOSTNAME set to [$HOSTNAME1]." %n elif [ -z "${1}" ] && [ -z "$HOSTNAME1" ] then 66-env -t boot -r HOSTNAME=!void-live boot@system 66-yeller -W %b "No HOSTNAME set, reverting to the default [void-live]." %n fi } set_ttys() { # Same positional args as apply_conf_from_to if [ -n "${3}" ] then if [ "${3}" -lt 11 ] && [ "${3}" -gt 0 ] then apply_conf_from_to "${1}" "${2}" "${3}" else 66-env -t boot -r TTY=!4 boot@system 66-yeller -W %b "${3} TTYS is not valid as a tty number, reverting to the default [4]." %n exit 1 fi else 66-env -t boot -r TTY=!4 boot@system 66-yeller -W %b "TTY number not set, reverting to the default [4]." %n fi } check_tz() { # On installation timezone can be set by symlink and not by the # TIMEZONE key in rc.conf. In that case follow the symlink. if [ "$(realpath /etc/localtime | cut -d / -f 1,2,3,4)" = "/usr/share/zoneinfo" ]; then TIMEZONE="$(realpath /etc/localtime | cut -d / -f 5,6)" export TIMEZONE fi } # shellcheck disable=SC1091 . /etc/rc.conf check_tz set_hostname "$HOSTNAME" apply_conf_from_to TIMEZONE TZ "$TIMEZONE" apply_conf_from_to HARDWARECLOCK HARDWARECLOCK "$HARDWARECLOCK" apply_conf_from_to KEYMAP KEYMAP "$KEYMAP" apply_conf_from_to FONT_MAP FONT_MAP "$FONT_MAP" apply_conf_from_to FONT FONT "$FONT" apply_conf_from_to FONT_UNIMAP FONT_UNIMAP "$FONT_UNIMAP" set_ttys TTYS TTY "$TTYS" 66-yeller %g "Please re-enable the boot@system service for the changes to take effect by running (as root): '66-enable -F -t boot boot@system' " %n./usr/bin/66boot-initial-setup000755 000000 000000 00000004732 14367774543 014626 0ustar00000000 000000 #!/bin/sh # Copyright 2021 mobinmob # Use of this source code is governed by the 2-Clause BSD License # that can be found in the LICENSE file at the root project directory. # SPDX short identifier: BSD-2-Clause # This scripts create basic trees and enables services. # Excluding the common posix userland commands, the script needs 66-yeller # (from 66-tools), 66-env, 66-tree and 66-enable (from 66). # Variables for 66-yeller export PROG="66boot-initial-setup" export COLOR_ENABLED="1" export CLOCK_ENABLED="0" # Script must run as root, otherwise it creates trees # as the user. user=$(id -u) [ "$user" != "0" ] && 66-yeller -F %r You need to run this script as root! %n && exit 1 # Information for the user, in case of failure. 66 output is informative, this # is just a pointer to the docs. msg_trees() { # ${1} is the name of the tree 66-yeller -W %b "An action for the [${1}] tree failed. Check the output before this message for a possibe cause and consult the 66-tree documentation." %n } msg_services() { # ${1} is the name of a service 66-yeller -F %r "Enabling the [${1}] service failed. Check the output before this message for a possibe cause and consult the 66-enable documentation." %n exit 1 } # Create the mandatory boot tree. 66-tree -nz boot || msg_trees boot # Enable the boot@system service in the boot tree. 66-enable -z -F -t boot boot@system || msg_services boot@system # Copy the default boot@conf so that it will survive updates and be accesible # though /etc/66rc.conf. Also, remove the warning in the first lines of the file. new_conf="/etc/66/conf/boot@system/version/boot@system" [ ! -f "$new_conf" ] && cp /etc/66/conf/boot@system/version/.boot@system "$new_conf" && \ warn=$( sed -n -e "/##\ \[STARTWARN\]/p" /etc/66rc.conf | tr -d '[:space:]') && \ [ "$warn" = "##[STARTWARN]" ] && sed -i '1,5d' "$new_conf" # Create default tree, enable it and make it current. 66-tree -z -nEc default || msg_trees default # Enable switch-initutils oneshot service in the default tree. 66-enable -z switch-initutils || msg_services switch-initutils # Create and enable runit tree. 66-tree -z -nE runit || msg_trees runit # Enable the runit service in the runit tree. 66-enable -z -t runit runit || msg_services runit # Start runit tree after the default tree. 66-tree -z -S default runit || msg_trees runit # Print on succesfull completion # shellcheck disable=SC2181 if [ "$?" = 0 ]; then 66-yeller %g "Basic trees created and services enabled succesfully!"; fi ./usr/bin/66000755 000000 000000 00000000073 14367774543 011147 0ustar00000000 000000 #!/usr/bin/execlineb -P 66-boot -b "Booting Void Linux" -m ./etc/runit/core-services/99-switch-initutils.sh000644 000000 000000 00000001031 14367774543 020203 0ustar00000000 000000 # This core service checks for /usr/bin/{reboot,poweroff,halt,shutdown} # and if they are part of 66 it deletes them and moves the runit # utilities in their place. It runs by default. There is a similar # oneshot service for 66 that does the opposite and should be enabled. # The script make sure that the user has the proper utilities for the # init system they are currently running. for i in reboot poweroff halt shutdown; do if test -e /usr/bin/${i}.runit; then rm /usr/bin/${i} mv /usr/bin/${i}.runit /usr/bin/${i} fi done ./etc/66rc.conf000777 000000 000000 00000000000 14367774543 022202 2../etc/66/conf/boot@system/version/boot@systemustar00000000 000000 ./etc/66/rc.local000755 000000 000000 00000001147 14367774543 012041 0ustar00000000 000000 # Copyright (c) 2015-2021 Eric Vidal # All rights reserved. # # This file is part of Obarun. It is subject to the license terms in # the LICENSE file found in the top-level directory of this # distribution. # This file may not be copied, modified, propagated, or distributed # except according to the terms contained in the LICENSE file. # # Default rc.local for Obarun; add your custom commands here. # # This is run at the end of the boot sequence. # This file is declared as oneshot service on 66, do not try to launch # any daemon with this file. # WARNING: Do not forget to set the shebang.