archboot/usr/lib/initcpio/install/archboot_init

44 lines
1.9 KiB
Text
Raw Normal View History

2023-02-09 11:58:17 +01:00
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
# created by Tobias Powalowski <tpowa@archlinux.org>
build() {
2023-02-10 07:06:24 +01:00
map add_module sd_mod? sr_mod? usb_storage? mmc_block? virtio_blk? vfat? \
btrfs? zram? iso9660? loop? zstd?
2023-02-10 07:01:43 +01:00
# pata, sata, scsi, nvme, usb, mmc, spi (for mmc mode), virtio
map add_checked_modules 'scsi/.*ata' '/(block|scsi|fusion|nvme)/' 'ata/[ps]ata_' \
'ata/(ahci|pdc_adma|ata_piix|ata_generic)' '(_cs|sl811_hcd|isp116x_hcd)' \
2023-02-10 08:59:31 +01:00
'/usb/host' '/drivers/usb/storage/' '/(drivers/mmc|tifm_)' \
'/drivers/spi/' 'virtio'
2023-02-10 07:30:45 +01:00
map add_binary bash sh blkid mount switch_root bsdcpio mkfs.btrfs setfont \
2023-02-12 16:04:19 +01:00
/usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \
2023-02-12 16:07:59 +01:00
gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod
2023-02-09 15:16:11 +01:00
add_file "/usr/share/kbd/consolefonts/ter-v16n.psf.gz" "/consolefont.psf.gz"
2023-02-09 11:58:17 +01:00
map add_udev_rule '50-udev-default.rules' '60-persistent-storage.rules' \
'64-btrfs.rules' '80-drivers.rules'
map add_file '/usr/lib/udev/ata_id' '/usr/lib/udev/scsi_id'
add_file "/usr/share/archboot/base/init" "/init"
2023-02-13 06:55:17 +01:00
map add_dir /mnt /cdrom
2023-02-13 07:03:26 +01:00
map add_file /etc/bash.bash_logout /etc/bash.bashrc /etc/profile /etc/shells
2023-02-13 06:55:17 +01:00
# add default bash setup
for i in .bashrc .bash_profile .bash_logout; do
add_file "/etc/skel/${i}" "/root/${i}"
done
# add custom bash options
echo ". /etc/profile.d/custom-bash-options.sh" >> "$BUILDROOT/root/.bashrc"
add_file "/usr/share/archboot/base/etc/profile.d/custom-bash-options.sh" \
"/etc/profile.d/custom-bash-options.sh"
basic_config="os-release hostname modprobe.d/modprobe.conf"
for i in $basic_config; do
add_file "/usr/share/archboot/base/etc/${i}" "/etc/${i}"
done
2023-02-09 11:58:17 +01:00
}
help() {
cat <<HELPEOF
Inital setup for archboot ISO booting.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et: