summaryrefslogtreecommitdiffstats
path: root/projectroot/etc/rc.once.d/prelink
diff options
context:
space:
mode:
Diffstat (limited to 'projectroot/etc/rc.once.d/prelink')
-rw-r--r--projectroot/etc/rc.once.d/prelink17
1 files changed, 17 insertions, 0 deletions
diff --git a/projectroot/etc/rc.once.d/prelink b/projectroot/etc/rc.once.d/prelink
new file mode 100644
index 000000000..52682a55f
--- /dev/null
+++ b/projectroot/etc/rc.once.d/prelink
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+SKIP_ON_NFSROOT=@NFSSKIP@
+
+if [ "$SKIP_ON_NFSROOT" = "yes" ]; then
+ if cat /proc/cmdline | grep -q 'root=/dev/nfs'; then
+ echo "Skipping prelink on nfsroot"
+ exit 0
+ fi
+fi
+
+echo "running prelink..."
+
+cat /etc/prelink.conf /etc/prelink.conf.d/* > /tmp/prelink.conf 2>/dev/null
+
+prelink -afR -c /tmp/prelink.conf
+