summarylogtreecommitdiffstats
path: root/linux-nitrous.install
blob: 081ad9811cc9dc6d1f8d9a569f4a897175077790 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
_kernel_version=5.3.8-nitrous+

_r="\033[00;31m"
_y="\033[00;33m"
_g="\033[00;32m"
_b="\033[00;34m"
_B="\033[01;34m"
_W="\033[01;37m"
_n="\033[00;0m"

post_install() {
	echo -e ""
	echo -e "$_B >$_W Kernel version:$_b $_kernel_version$_n"

	echo -e ""
	echo -e "$_B >$_W Updating module dependencies$_n"
	/sbin/depmod "$_kernel_version"

	echo -e ""
	echo -e "$_B >$_W Mkinitcpio setup"
	echo -e "$_n   If you use LVM2, encrypted root or software RAID,"
	echo -e "$_n   ensure you enable support in $_b/etc/mkinitcpio.d/linux-nitrous.conf"
	echo -e ""
	echo -e "$_n   More information about mkinitcpio setup can be found here:"
	echo -e "$_b   http://wiki.archlinux.org/index.php/Mkinitcpio"

	echo -e ""
	echo -e "$_B >$_W Generating initial ramdisks using mkinitcpio$_n"
	mkinitcpio -p linux-nitrous

	echo -e ""
}

post_upgrade() {
	post_install $@
}

post_remove() {
	dir="/usr/lib/modules/extramodules-$_kernel_version";
	
	if [ "$(ls -A $dir)" ]; then
             echo "Removing $dir - please note this removes any package files or extra modules you may have in there."
	fi
	rm -rf "/usr/lib/modules/$_kernel_version"
	rm -rf "/usr/lib/modules/extramodules-$_kernel_version"
}