mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-21 00:25:50 +00:00
- Modify startup script to let smsd change user by itself [1]
- Change the sample configuration file to have same behaviour as old startup script did by default While here: - Make strip command silent - Fix some staging glitches - Use new @sample directive PR: 191361 [1] Submitted by: timp87@gmail.com
This commit is contained in:
parent
275f89be81
commit
86239fe16a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=359425
12
UPDATING
12
UPDATING
@ -5,6 +5,18 @@ they are unavoidable.
|
||||
You should get into the habit of checking this file for changes each time
|
||||
you update your ports collection, before attempting any port upgrades.
|
||||
|
||||
20140626:
|
||||
AFFECTS: users of comms/smstools3
|
||||
AUTHOR: madpilot@FreeBSD.org
|
||||
|
||||
The smstools3 startup screen has been modified to allow smsd to
|
||||
change uid/gid by itself. The rc options smsd_logfile, smsd_user
|
||||
and smsd_group are not supported anymore, user, group and log
|
||||
filename should be specified in the configuration file.
|
||||
|
||||
The sample configuration file has been updated to have defaults
|
||||
equivalent to the old ones.
|
||||
|
||||
20140624:
|
||||
AFFECTS: users of databases/p5-Bucardo
|
||||
AUTHOR: mat@FreeBSD.org
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= smstools
|
||||
PORTVERSION= 3.1.15
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= comms
|
||||
MASTER_SITES= http://smstools3.kekekasvi.com/packages/
|
||||
DISTNAME= smstools3-${PORTVERSION}
|
||||
@ -56,7 +56,9 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
-e 's|%%STAGEDIR%%|${STAGEDIR}|g' \
|
||||
${WRKSRC}/Makefile ${WRKSRC}/install.sh ${WRKSRC}/src/smsd_cfg.h
|
||||
@${REINPLACE_CMD} 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \
|
||||
@${REINPLACE_CMD} -e 's|/dev/ttyS0|${SMSTOOLS_DEFAULT_COMPORT}|g' \
|
||||
-e 's|%%SMSD_USER%%|${SMSD_USER}|' \
|
||||
-e 's|%%SMSD_GROUP%%|${SMSD_GROUP}|' \
|
||||
${WRKSRC}/examples/smsd.conf.easy \
|
||||
${WRKSRC}/examples/smsd.conf.full \
|
||||
${WRKSRC}/examples/smsd.conf.non-root
|
||||
@ -64,7 +66,7 @@ post-patch:
|
||||
${WRKSRC}/scripts/*
|
||||
|
||||
post-install:
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd
|
||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/smsd
|
||||
@${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
@for file in `${FIND} ${WRKSRC}/scripts -type f ! -name 'README' ! -name '*.bak'`; do \
|
||||
${INSTALL_SCRIPT} $$file ${STAGEDIR}${DATADIR}/; \
|
||||
|
16
comms/smstools3/files/patch-examples-smsd.conf.easy
Normal file
16
comms/smstools3/files/patch-examples-smsd.conf.easy
Normal file
@ -0,0 +1,16 @@
|
||||
--- examples/smsd.conf.easy.orig 2006-02-04 20:52:06.000000000 +0100
|
||||
+++ examples/smsd.conf.easy 2014-06-26 15:07:50.021638337 +0200
|
||||
@@ -1,9 +1,12 @@
|
||||
# Example smsd.conf. Read the manual for a description
|
||||
|
||||
devices = GSM1
|
||||
-logfile = /var/log/smsd.log
|
||||
+logfile = /var/log/smsd/smsd.log
|
||||
loglevel = 7
|
||||
|
||||
+user = %%SMSD_USER%%
|
||||
+group = %%SMSD_GROUP%%
|
||||
+
|
||||
[GSM1]
|
||||
device = /dev/ttyS0
|
||||
incoming = yes
|
@ -10,12 +10,6 @@
|
||||
#
|
||||
# smsd_enable="YES"
|
||||
#
|
||||
# NOTE: to make smsd log to syslog specify:
|
||||
#
|
||||
# smsd_logfile="syslog"
|
||||
#
|
||||
# in rc.conf
|
||||
#
|
||||
. /etc/rc.subr
|
||||
|
||||
name=smsd
|
||||
@ -25,13 +19,10 @@ 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}
|
||||
|
||||
pidfile=${smsd_pidfile}
|
||||
command="%%PREFIX%%/bin/smsd"
|
||||
command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile} -l${smsd_logfile} -u${smsd_user} -g${smsd_group}"
|
||||
command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile}"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
@ -25,7 +25,14 @@ bin/unicode2sms
|
||||
%%DATADIR%%/smstest.php
|
||||
%%DATADIR%%/sql_demo
|
||||
%%DATADIR%%/unicode2sms
|
||||
@unexec if [ -f %D/etc/smsd.conf ] && cmp -s %D/etc/smsd.conf %D/etc/smsd.conf.sample; then rm -f %D/etc/smsd.conf; fi
|
||||
etc/smsd.conf.sample
|
||||
@exec if [ ! -f %D/etc/smsd.conf ] ; then cp -p %D/%F %B/smsd.conf; fi
|
||||
@sample etc/smsd.conf.sample
|
||||
@dirrm %%DATADIR%%
|
||||
@cwd /
|
||||
@owner %%SMSD_USER%%
|
||||
@group %%SMSD_GROUP%%
|
||||
@dirrmtry %%SPOOLDIR%%/incoming
|
||||
@dirrmtry %%SPOOLDIR%%/outgoing
|
||||
@dirrmtry %%SPOOLDIR%%/checked
|
||||
@dirrmtry %%LOGDIR%%
|
||||
@dirrmtry %%PIDDIR%%
|
||||
@dirrmtry %%SPOOLDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user