reliant-system/dracut/99reliant/module-setup.sh

49 lines
1.4 KiB
Bash
Executable file

#!/usr/bin/bash
check() {
return 0
}
depends() {
echo "systemd plymouth"
return 0
}
install() {
# Interactive script
inst_script "$moddir/scripts/reliant-initramfs.sh" "/usr/local/share/scripts/reliant-initramfs.sh"
# Main service
inst "$moddir/reliant.service" "/etc/systemd/system/reliant.service"
systemctl --root="$initdir" enable reliant.service
# Shufflecake
inst_binary /usr/local/sbin/shufflecake
# Patched create-snapshot script necessary for the system to function
inst_simple "$moddir/patches/create-snapshot.sh" "/usr/local/share/scripts/create-snapshot.sh"
# Early hook to set all block devices readonly before they're mounted
inst_hook cmdline 01 "$moddir/scripts/readonly.sh"
# TODO: Do we need udev rules to --setro newly attached devices?
# Reliant
inst_script /usr/local/share/scripts/reliant-common.sh
inst_script /usr/local/sbin/reliant-security
inst_script /usr/local/sbin/surgeon-suture
inst_script /usr/local/sbin/reliant-mount
inst_script /usr/local/sbin/reliant-hash
inst_script /usr/local/sbin/reliant-seal
inst /etc/reliant.conf
# Other binaries
inst_multiple dmesg e2fsck lsblk blockdev mount dd wc sed sort sleep md5sum find findmnt modprobe cut grep mkdir rm rmdir tail
return 0
}
installkernel() {
# Shufflecake kernel module
hostonly='' instmods -c dm-sflc
return 0
}