mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add safety grep to cleanup hooks
This commit is contained in:
parent
0715961835
commit
98eb9ab21a
8 changed files with 9 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
_APPS="head id cksum tail test uptime w who whoami xargs \
|
||||
swapon uniq seq fdisk sfdisk cfdisk parted free less \
|
||||
chgrp dmesg egrep fgrep stty hdparm sync bsdcpio\
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
### remove conflicting grub, man-db, mkinitcpio and rpcbind files
|
||||
### remove conflicting grub, man-db, mkinitcpio,rpcbind and ukify files
|
||||
tar -C / --exclude=/etc/systemd/system/multi-user.target.wants/remote-fs.target \
|
||||
--exclude=usr/share/bash-completion/completions/{grub,lsinitcpio,mkinitcpio} \
|
||||
--exclude=usr/lib/{modules-load.d/cdrecord.conf,systemd/system/{"man-db*","rpcbind*",\
|
||||
|
@ -15,7 +15,6 @@ etc/{ca-certificates/extracted,default,pam.d,pinentry,profile.d,security,skel,ss
|
|||
usr/lib/{coreutils,cryptsetup,gconv,modules-load.d,p11-kit,pam.d,pkcs11,security,sysctl.d,systemd,sysusers.d,tmpfiles.d,udev} \
|
||||
usr/share/{bash-completion,dbus-1,factory,hwdata,i18n/locales,makepkg,nano,pacman/keyrings,polkit-1,readline,systemd,terminfo} \
|
||||
| tar -C "${_ROOTFS}" -xpf -
|
||||
|
||||
if grep -qw 'archboot' /etc/hostname; then
|
||||
_map _binary locale-gen localedef
|
||||
_map _file /etc/locale.gen /usr/share/locale/locale.alias
|
||||
|
@ -89,6 +88,7 @@ var/lib/pacman/local \
|
|||
done
|
||||
# add custom bash options
|
||||
echo ". /etc/profile.d/custom-bash-options.sh" >> "${_ROOTFS}/root/.bashrc"
|
||||
|
||||
### add kmod related config file(s)
|
||||
_file /usr/lib/depmod.d/search.conf
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
# 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
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
rm -rf /var/cache/pacman/pkg
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
_APPS="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 \
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
rm -r /lib/firmware
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
# save RAM with deleting already copied content
|
||||
rm -rf /var/cache/pacman/pkg
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
_run ()
|
||||
{
|
||||
! grep -qw 'archboot' /etc/hostname && return
|
||||
_APPS="arping clockdiff tracepath ssh arpd \
|
||||
genl ifstat ctstat rtstat lnstat nstat rtacct rtmon ss tc \
|
||||
bridge dcb devlink rdma tipc vdpa ethtool elinks brctl"
|
||||
|
|
Loading…
Reference in a new issue