summarylogtreecommitdiffstats
path: root/linux.install
diff options
context:
space:
mode:
authorJames Bunton2016-08-14 22:16:38 +1000
committerJames Bunton2016-08-15 08:32:42 +1000
commit10922098c89127e8d79c490dfc504afb850b9c90 (patch)
treeaafe5f7d0d923c095a09589dbb447680a7a12872 /linux.install
downloadaur-10922098c89127e8d79c490dfc504afb850b9c90.tar.gz
Initial commit with 3.16.36
Diffstat (limited to 'linux.install')
-rw-r--r--linux.install38
1 files changed, 38 insertions, 0 deletions
diff --git a/linux.install b/linux.install
new file mode 100644
index 000000000000..69a5c492f9c9
--- /dev/null
+++ b/linux.install
@@ -0,0 +1,38 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+KERNEL_NAME=
+KERNEL_VERSION=
+
+note() {
+ printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
+}
+
+post_install () {
+ # updating module dependencies
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod ${KERNEL_VERSION}
+ echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
+ mkinitcpio -p linux${KERNEL_NAME}
+
+ note "If you saw an error above you can try adding this to your mkinitcpio.conf"
+ note " _addedmodules["dm_cache_smq"]=1"
+}
+
+post_upgrade() {
+ if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
+ echo "WARNING: /boot appears to be a separate partition but is not mounted."
+ fi
+
+ # updating module dependencies
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod ${KERNEL_VERSION}
+ echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
+ mkinitcpio -p linux${KERNEL_NAME}
+}
+
+post_remove() {
+ # also remove the compat symlinks
+ rm -f boot/initramfs-linux${KERNEL_NAME}.img
+ rm -f boot/initramfs-linux${KERNEL_NAME}-fallback.img
+}