#!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0-only # Created by Tobias Powalowski build () { # remove initrd-release rm -f /tmp/etc/initrd-release # remove pacman-init.service rm -f /tmp/etc/systemd/system/multi-user.target.wants/pacman-init.service rm -f /tmp/etc/systemd/system/pacman-init.service # add created gpg keyring cp -ar /etc/pacman.d/gnupg /tmp/etc/pacman.d apps="login nologin" for i in $apps; do rm /usr/bin/"$i" done apps="mount.nfs4 umount.nfs umount.nfs4 mount.nfs setfont loadkeys mkfs.btrfs rmmod mountpoint gzip" for i in $apps; do rm /usr/bin/"$i" done #dbus files apps="dbus-cleanup-sockets dbus-daemon dbus-launch dbus-monitor dbus-run-session dbus-send dbus-test-tool \ dbus-update-activation-environment dbus-uuidgen" for i in $apps; do rm /usr/bin/"$i" done #systemd files apps="systemd-umount busctl bootctl coredumpctl hostnamectl journalctl kernel-install localectl \ loginctl machinectl networkctl systemctl systemd-analyze systemd-ask-password \ systemd-cat systemd-cgls systemd-cgtop \ systemd-delta systemd-detect-virt systemd-escape systemd-firstboot systemd-hwdb systemd-inhibit systemd-machine-id-setup \ systemd-mount systemd-notify systemd-nspawn systemd-path systemd-resolve \ systemd-run systemd-socket-activate systemd-stdio-bridge systemd-sysusers \ systemd-tty-ask-password-agent timedatectl systemd-repart userdbctl homectl oomctl portablectl systemd-creds \ systemd-cryptenroll systemd-dissect systemd-id128 systemd-sysext" for i in $apps; do rm /usr/bin/"$i" done } help () { cat <