arch/pkg/de-p1st-mkinitcpio/.install

38 lines
923 B
Plaintext
Raw Normal View History

2021-05-03 13:26:54 +02:00
## arg 1: the new package version
pre_install() {
# Check if system is SSE4.2 capable
# lscpu is part of util-linux which is a dependency of mkinitcpio
2021-05-03 16:12:27 +02:00
if ! lscpu | grep sse4_2 >/dev/null 2>&1; then
echo "Warning: mkinitcpio.conf has module 'crc32c_intel' enabled but this system is not SSE4.2 capable!"
return 1
fi
2021-05-03 13:26:54 +02:00
}
## arg 1: the new package version
post_install() {
holo apply
2021-05-03 13:34:00 +02:00
if ! mkinitcpio -P; then
2021-05-03 16:12:27 +02:00
echo "Failed to generate initramfs. Please run 'mkinitcpio -P' manually. (This is normal during initial system installation).";
2021-05-03 13:34:00 +02:00
return 1;
fi
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
holo apply
2021-05-03 16:12:27 +02:00
if ! mkinitcpio -P; then
echo "Failed to generate initramfs."
return 1
fi
}
## arg 1: the old package version
post_remove() {
holo apply
2021-05-03 16:12:27 +02:00
if ! mkinitcpio -P; then
echo "Failed to generate initramfs."
return 1
fi
}