summaryrefslogtreecommitdiff
path: root/debian/librumpdev-pci0.postinst.linux
diff options
context:
space:
mode:
Diffstat (limited to 'debian/librumpdev-pci0.postinst.linux')
-rw-r--r--debian/librumpdev-pci0.postinst.linux41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/librumpdev-pci0.postinst.linux b/debian/librumpdev-pci0.postinst.linux
new file mode 100644
index 00000000..01b8c9de
--- /dev/null
+++ b/debian/librumpdev-pci0.postinst.linux
@@ -0,0 +1,41 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+ configure)
+ . /usr/share/debconf/confmodule
+
+ db_get librumpdev-pci0/hugepages
+ if [ "$RET" = "true" ] ; then
+ db_get librumpdev-pci0/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