pacman-hooks
This commit is contained in:
parent
4b18f9f424
commit
568d0f8881
7 changed files with 61 additions and 5 deletions
|
@ -423,13 +423,13 @@ then
|
|||
mkdir -p /etc/systemd/system/getty\@tty1.service.d
|
||||
echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=-/sbin/agetty --noclear -a root %I 38400 linux" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=-/usr/bin/agetty --autologin root -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
systemctl enable getty@tty1
|
||||
else
|
||||
mkdir -p /etc/systemd/system/getty\@tty1.service.d
|
||||
echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=-/sbin/agetty -a "$username" %I $TERM" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
echo "ExecStart=-/usr/bin/agetty --autologin $username -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf
|
||||
systemctl enable getty@tty1
|
||||
fi
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ function minimalinstallation() {
|
|||
cp -v /opt/${repo}/install/cow_device ${mountpoint}/usr/lib/initcpio/install/
|
||||
cp -v /opt/${repo}/hooks/cow_device ${mountpoint}/usr/lib/initcpio/hooks/
|
||||
|
||||
cp -v /opt/${repo}/pacman-hooks/* ${mountpoint}/etc/pacman.d/hooks/
|
||||
|
||||
# scripts
|
||||
cp /opt/${repo}/arch-graphical-install-auto ${mountpoint}/usr/bin/arch-graphical-install-auto
|
||||
chmod +x ${mountpoint}/usr/bin/arch-graphical-install-auto
|
||||
|
@ -789,7 +791,7 @@ function systemdboot() {
|
|||
echo "linux /${linuz}" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
|
||||
echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
|
||||
echo "initrd /${kernelback}" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
|
||||
echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
|
||||
echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf
|
||||
|
||||
echo "default arch-uefi" > ${mountpoint}/boot/loader/loader.conf
|
||||
echo "timeout 1" >> ${mountpoint}/boot/loader/loader.conf
|
||||
|
@ -799,7 +801,7 @@ function systemdboot() {
|
|||
echo "linux /%LINUZ%" >> ${mountpoint}/boot/arch-uefi.conf.example
|
||||
echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/arch-uefi.conf.example
|
||||
echo "initrd /%KERNEL%" >> ${mountpoint}/boot/arch-uefi.conf.example
|
||||
echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/arch-uefi.conf.example
|
||||
echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/arch-uefi.conf.example
|
||||
|
||||
if [ "${booteintraege}" != "n" ]; then
|
||||
|
||||
|
@ -807,7 +809,7 @@ function systemdboot() {
|
|||
|
||||
arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l /EFI/systemd/systemd-bootx64.efi -L "Linux Boot Manager"
|
||||
|
||||
arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \\${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}quiet splash"
|
||||
arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \\${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash"
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -131,6 +131,8 @@ function system() {
|
|||
cp -v install/cow_device ${work_dir}/${arch}/airootfs/usr/lib/initcpio/install/
|
||||
cp -v hooks/cow_device ${work_dir}/${arch}/airootfs/usr/lib/initcpio/hooks/
|
||||
|
||||
cp -v pacman-hooks/* ${work_dir}/${arch}/airootfs/etc/pacman.d/hooks/
|
||||
|
||||
# modprobe.d
|
||||
mkdir -p ${work_dir}/${arch}/airootfs/etc/modprobe.d/
|
||||
echo "blacklist floppy" > ${work_dir}/${arch}/airootfs/etc/modprobe.d/blacklist-floppy.conf
|
||||
|
|
13
pacman-hooks/backup-modules-post.hook
Normal file
13
pacman-hooks/backup-modules-post.hook
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Trigger]
|
||||
Operation = Remove
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = linux
|
||||
Target = linux-hardened
|
||||
Target = linux-mainline
|
||||
|
||||
[Action]
|
||||
Depends = coreutils
|
||||
Depends = bash
|
||||
When = PostTransaction
|
||||
Exec = /usr/bin/bash -c '[[ -d /usr/lib/modules/$(uname -r) ]] || ln -s /tmp/$(uname -r) /usr/lib/modules/$(uname -r)'
|
13
pacman-hooks/backup-modules-pre.hook
Normal file
13
pacman-hooks/backup-modules-pre.hook
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Trigger]
|
||||
Operation = Upgrade
|
||||
Operation = Remove
|
||||
Type = Package
|
||||
Target = linux
|
||||
Target = linux-hardened
|
||||
Target = linux-mainline
|
||||
|
||||
[Action]
|
||||
Depends = coreutils
|
||||
Depends = bash
|
||||
When = PreTransaction
|
||||
Exec = /usr/bin/bash -c 'find /usr/lib/modules -maxdepth 1 -type l -delete; cp -a /usr/lib/modules/$(uname -r) /tmp 2>/dev/null || :'
|
10
pacman-hooks/mirrorupgrade.hook
Normal file
10
pacman-hooks/mirrorupgrade.hook
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Trigger]
|
||||
Operation = Upgrade
|
||||
Type = Package
|
||||
Target = pacman-mirrorlist
|
||||
|
||||
[Action]
|
||||
Description = Updating pacman-mirrorlist with reflector and removing pacnew, this can take a few minutes...
|
||||
When = PostTransaction
|
||||
Depends = reflector
|
||||
Exec = /bin/bash -c "reflector --sort rate --save /etc/pacman.d/mirrorlist; rm -f /etc/pacman.d/mirrorlist.pacnew"
|
16
pacman-hooks/nvidia.hook
Normal file
16
pacman-hooks/nvidia.hook
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
[Trigger]
|
||||
Operation=Install
|
||||
Operation=Upgrade
|
||||
Operation=Remove
|
||||
Type=Package
|
||||
Target=nvidia
|
||||
Target=linux
|
||||
# Change the linux part above and in the Exec line if a different kernel is used
|
||||
|
||||
[Action]
|
||||
Description=Update Nvidia module in initcpio
|
||||
Depends=mkinitcpio
|
||||
When=PostTransaction
|
||||
NeedsTargets
|
||||
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'
|
Loading…
Reference in a new issue