summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/scripts')
-rw-r--r--hicn-plugin/scripts/post19
-rw-r--r--hicn-plugin/scripts/postinst18
-rw-r--r--hicn-plugin/scripts/postun5
3 files changed, 42 insertions, 0 deletions
diff --git a/hicn-plugin/scripts/post b/hicn-plugin/scripts/post
new file mode 100644
index 000000000..3cde599ca
--- /dev/null
+++ b/hicn-plugin/scripts/post
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ -e /etc/vpp/startup.conf ]; then
+ if ! grep -q "hicn" /etc/vpp/startup.conf; then
+ printf '\n hicn {
+ ## Set PIT size. Default is 131 072 entries
+ # pit-size 500000
+ #
+ ## Set CS size. Default is 4096
+ # cs-size 50000
+ #
+ ## Set maximum PIT entries lifetime in milliseconds. Assigned to a PIT entry in case an interest carries a bigger lifetime
+ # pit-lifetime-max 20
+ #
+ ## Percentage of CS to reserve for application producer faces
+ # cs-reserved-app 20\n}' >> /etc/vpp/startup.conf
+ fi;
+fi;
+ln -s /usr/lib64/vpp_plugins/hicn_plugin.so /usr/lib/vpp_plugins/hicn_plugin.so \ No newline at end of file
diff --git a/hicn-plugin/scripts/postinst b/hicn-plugin/scripts/postinst
new file mode 100644
index 000000000..012fc3571
--- /dev/null
+++ b/hicn-plugin/scripts/postinst
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ -e /etc/vpp/startup.conf ]; then
+ if ! grep -q "hicn" /etc/vpp/startup.conf; then
+ printf '\n hicn {
+ ## Set PIT size. Default is 131 072 entries
+ # pit-size 500000
+ #
+ ## Set CS size. Default is 4096
+ # cs-size 50000
+ #
+ ## Set maximum PIT entries lifetime in milliseconds. Assigned to a PIT entry in case an interest carries a bigger lifetime
+ # pit-lifetime-max 20
+ #
+ ## Percentage of CS to reserve for application producer faces
+ # cs-reserved-app 20\n}' >> /etc/vpp/startup.conf
+ fi;
+fi; \ No newline at end of file
diff --git a/hicn-plugin/scripts/postun b/hicn-plugin/scripts/postun
new file mode 100644
index 000000000..c319f014e
--- /dev/null
+++ b/hicn-plugin/scripts/postun
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+if [ -L /usr/lib/vpp_plugins/hicn_plugin.so ]; then
+ rm /usr/lib/vpp_plugins/hicn_plugin.so
+fi; \ No newline at end of file