summaryrefslogtreecommitdiff
path: root/comms/smstools3/files
diff options
context:
space:
mode:
Diffstat (limited to 'comms/smstools3/files')
-rw-r--r--comms/smstools3/files/patch-src-Makefile20
-rw-r--r--comms/smstools3/files/smsd.in31
2 files changed, 34 insertions, 17 deletions
diff --git a/comms/smstools3/files/patch-src-Makefile b/comms/smstools3/files/patch-src-Makefile
new file mode 100644
index 000000000000..6f6d7ab1fd2f
--- /dev/null
+++ b/comms/smstools3/files/patch-src-Makefile
@@ -0,0 +1,20 @@
+--- src/Makefile.orig 2008-11-21 11:41:21.000000000 +0100
++++ src/Makefile 2008-11-21 11:42:39.000000000 +0100
+@@ -6,7 +6,7 @@
+ # CC=gcc
+
+ # Comment this out, to enable statistics
+-CFLAGS += -D NOSTATS
++#CFLAGS += -D NOSTATS
+
+ # Uncomment this to force smsd to run in terminal mode
+ #CFLAGS += -D TERMINAL
+@@ -24,7 +24,7 @@
+ ifneq (,$(findstring NOSTATS,$(CFLAGS)))
+ $(CC) $(CFLAGS) -o $@ $^
+ else
+- $(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs`
++ $(CC) `$(LOCALBASE)/bin/mm-config --cflags` $(CFLAGS) -o $@ $^ `$(LOCALBASE)/bin/mm-config --ldflags --libs`
+ @echo "(Please ignore warning about tempnam -- it is used in a safe way)"
+ endif
+
diff --git a/comms/smstools3/files/smsd.in b/comms/smstools3/files/smsd.in
index 2dec3b9ad417..b1d7d1fcda02 100644
--- a/comms/smstools3/files/smsd.in
+++ b/comms/smstools3/files/smsd.in
@@ -10,25 +10,22 @@
#
# smsd_enable="YES"
#
-smsd_enable=${smsd_enable-"NO"}
-
-. %%RC_SUBR%%
+. "%%RC_SUBR%%"
name="smsd"
+
+load_rc_config ${name}
+: ${smsd_enable="NO"}
+: ${smsd_pidfile="%%PIDDIR%%/smsd.pid"}
+: ${smsd_infofile="%%PIDDIR%%/smsd.working"}
+: ${smsd_logfile="%%LOGDIR%%/smsd.log"}
+: ${smsd_config="%%PREFIX%%/etc/smsd.conf"}
+: ${smsd_user="uucp"}
+: ${smsd_group="dialer"}
+
rcvar=`set_rcvar`
-load_rc_config $name
-pidfile="/var/run/smsd.pid"
+pidfile=${smsd_pidfile}
command="%%PREFIX%%/bin/smsd"
-command_args='&'
-
-# Unfortunally we need to this because as the program won't
-# exit cleanly and the terminal will be stuck forever in waitpid.
-case "$1" in
- stop)
- pkill smsd
- ;;
- *)
- run_rc_command "$1"
- ;;
-esac
+command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile} -l${smsd_logfile} -u${smsd_user} -g${smsd_group}"
+run_rc_command "$1"