summaryrefslogtreecommitdiff
path: root/debian/librumpdev-pci0.postinst.linux
blob: dc77589a4df24c94969598131f48cd870bb1e213 (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
#!/bin/sh
set -e

case "$1" in
	configure)
		. /usr/share/debconf/confmodule

		db_get librumpdev-pci/hugepages
		if [ "$RET" = "true" ] ; then
			db_get librumpdev-pci/nr_hugepages
			NR_HUGEPAGES="$RET"
			cat > /etc/sysfs.d/rump_hugepages.conf <<EOF
#
# AUTOMATICALLY GENERATED BY librumpdev-pci0 postinst. DO NOT EDIT.
#
# This setting can be changed with:
#
#   dpkg-reconfigure librumpdev-pci0
#
kernel/mm/hugepages/hugepages-2048kB/nr_hugepages = $NR_HUGEPAGES
EOF
		else
			rm -f /etc/sysfs.d/rump_hugepages.conf
		fi
	;;

	abort-upgrade|abort-remove|abort-deconfigure)
	;;

	*)
		echo "postinst called with unknown argument \`$1'" >&2
		exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0