aboutsummaryrefslogtreecommitdiff
path: root/sysutils/swapd/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/swapd/files')
-rw-r--r--sysutils/swapd/files/patch-Makefile.in11
-rw-r--r--sysutils/swapd/files/swapd.in23
2 files changed, 34 insertions, 0 deletions
diff --git a/sysutils/swapd/files/patch-Makefile.in b/sysutils/swapd/files/patch-Makefile.in
new file mode 100644
index 000000000000..97ed304d9153
--- /dev/null
+++ b/sysutils/swapd/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig 2004-10-17 22:05:24.000000000 -0700
++++ Makefile.in 2007-08-24 09:08:55.000000000 -0700
+@@ -35,6 +35,7 @@
+ -$(INSTALL) -d $(mandir)/man8
+ -$(INSTALL) -d $(mandir)/man5
+ $(INSTALL) -m 755 swapd$(EXEEXT) $(sbindir)/swapd$(EXEEXT)
+- $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf
++ $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf.sample
++ if [ ! -f "$(sysconfdir)/swapd.conf" ]; then $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf; fi
+ $(INSTALL) -m 644 swapd.8 $(mandir)/man8/swapd.8
+ $(INSTALL) -m 644 swapd.conf.5 $(mandir)/man5/swapd.conf.5
diff --git a/sysutils/swapd/files/swapd.in b/sysutils/swapd/files/swapd.in
new file mode 100644
index 000000000000..231ebc36f36a
--- /dev/null
+++ b/sysutils/swapd/files/swapd.in
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# PROVIDE: swapd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable swapd:
+#
+# swapd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=swapd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/swapd
+
+load_rc_config $name
+
+swapd_enable=${swapd_enable:-"NO"}
+
+run_rc_command "$1"