From 8ec107e165f2357fbf8b3d885ccf733e64af1973 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 19 Oct 2023 21:02:16 +0200 Subject: [PATCH] remove ? from _module --- usr/lib/archboot/cpio/cpio.sh | 3 - usr/lib/archboot/cpio/hooks/common_modules | 2 +- usr/lib/archboot/cpio/hooks/filesystems | 2 +- usr/lib/archboot/cpio/hooks/init | 2 +- usr/share/archboot/doc/archboot.html | 87 +++++++++++++++++++--- 5 files changed, 80 insertions(+), 16 deletions(-) diff --git a/usr/lib/archboot/cpio/cpio.sh b/usr/lib/archboot/cpio/cpio.sh index d9e67b99a..fd0afa205 100644 --- a/usr/lib/archboot/cpio/cpio.sh +++ b/usr/lib/archboot/cpio/cpio.sh @@ -95,9 +95,6 @@ _module() { # discovered and added. # $1: module name _CHECK="" _MOD="" _SOFT=() _DEPS=() _FIELD="" _VALUE="" _FW=() - if [[ "${1}" == *\? ]]; then - set -- "${1%?}" - fi _CHECK="${1%.ko*}" _CHECK="${_CHECK//-/_}" # skip expensive stuff if this module has already been added (( _INCLUDED_MODS["${_CHECK}"] == 1 )) && return diff --git a/usr/lib/archboot/cpio/hooks/common_modules b/usr/lib/archboot/cpio/hooks/common_modules index 5da65b01b..22dc34057 100644 --- a/usr/lib/archboot/cpio/hooks/common_modules +++ b/usr/lib/archboot/cpio/hooks/common_modules @@ -7,7 +7,7 @@ _run () ### add pcspkr _module pcspkr ### add init modules - _map _module zram? btrfs? zstd? libcrc32c? + _map _module zram btrfs zstd libcrc32c ### keyboard modules _all_modules -f '_cs|ssb-hcd' '/usb/host' _all_modules '/hid/hid-(alps|apple|asus|belkin|cherry|chicony|corsair|elan|hyperv|kensignton|lenovo|logitech|magicmouse|microsoft|razer|redragon|roccat|samsung|sony|speedlink|steelseries)' diff --git a/usr/lib/archboot/cpio/hooks/filesystems b/usr/lib/archboot/cpio/hooks/filesystems index e1d5189dc..a9dab2bec 100644 --- a/usr/lib/archboot/cpio/hooks/filesystems +++ b/usr/lib/archboot/cpio/hooks/filesystems @@ -6,7 +6,7 @@ _run () { _all_modules '/fs/(btrfs|cifs|exfat|ext4|f2fs|fat|hfs|hfsplus|isofs|jfs|nfs|nfsd|nilfs2|nls|ntfs3|udf|xfs|vboxsf)' _all_modules '/(lib/|kernel|arch/*)/crypto' - _map _module crypto-crc32c? crypto-crc32? libcrc32c? configfs? nls_cp437? nls_ascii? + _map _module crypto-crc32c crypto-crc32 libcrc32c configfs nls_cp437 nls_ascii _map _binary mkswap badblocks blkid debugfs dumpe2fs e2fsck \ e2image e2undo findfs fsck logsave mkfs.ext2 resize2fs chattr lsattr e2freefrag filefrag \ jfs_debugfs jfs_fsck jfs_fscklog jfs_logdump jfs_mkfs jfs_tune mkfs.xfs xfs_copy xfs_db xfs_estimate xfs_fsr xfs_io \ diff --git a/usr/lib/archboot/cpio/hooks/init b/usr/lib/archboot/cpio/hooks/init index cd95d21aa..ac9491b55 100644 --- a/usr/lib/archboot/cpio/hooks/init +++ b/usr/lib/archboot/cpio/hooks/init @@ -4,7 +4,7 @@ _run() { ### init modules - _map _module vfat? iso9660? nls_cp437? nls_ascii? cdrom? exfat? + _map _module vfat iso9660 nls_cp437 nls_ascii cdrom exfat _map _binary bash sh blkid mount mountpoint switch_root bsdcpio mkfs.btrfs setfont \ /usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \ gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod cut sed find mkdir dialog diff --git a/usr/share/archboot/doc/archboot.html b/usr/share/archboot/doc/archboot.html index 35db095b1..a454392e7 100644 --- a/usr/share/archboot/doc/archboot.html +++ b/usr/share/archboot/doc/archboot.html @@ -1061,17 +1061,84 @@ There are the following configuration files for ISO creation:

7.2.3.3 archboot-cpio.sh

+Options supported in /etc/archboot/<yourconfig>.conf files:
+ + + + + + + + + + + + + + + + + + + + + + + + +
OptionUsage
_KERNEL=""defines used kernel
_HOOKS=()Array that defines the used hooks
_COMP=""defines used compression method
_COMP_OPTS=()defines compression method options
+Functions supported in /usr/lib/archboot/cpio/hooks/<hook> files:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionUsage
_map <function> <args>redo <function> on <args>
_dir <directory>Only creates <directory> on <rootfs>
_full_dir <directory>Copies the <full directory> as is to <rootfs>
_binary <binary>Adds <binary> to rootfs, PATH is added,
libraries are detected
_file <file>Adds <file> as is to rootfs
_file_rename <file> <file_rootfs>Adds <file> as is to rootfs <file_rootfs>
_symlink <linkname> <linkedfile>Adds symlink <linkname> to <linkedfile> on <rootfs>
_module <module>Adds kernel <module> to <rootfs>
_all_modules -f <exlude_pattern> <pattern>Adds all kernel modules <pattern> to <rootfs>,
use -f flag to exclude modules

7.2.3.4 archboot-x86_64-iso.sh

Script for image creation from running system or for use in archboot container.