--- /dev/null
+diff -uNr smstools3.ORIG/scripts/hex2bin smstools3/scripts/hex2bin
+--- smstools3.ORIG/scripts/hex2bin 2017-09-11 14:11:48.040928533 +0100
++++ smstools3/scripts/hex2bin 2017-09-11 14:12:00.925927820 +0100
+@@ -1,4 +1,4 @@
+-#!/bin/gawk -f
++#!/usr/bin/gawk -f
+
+ # This script reads a hex-dump and converts it to a binary file.
+ # The hex-dump must contain one or more hexadecimal numbers separated
--- /dev/null
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ checkpath -q -d -m 0770 -o smsd:sms /run/smsd || return 1
+ checkpath -q -f -o smsd:sms /var/log/smsd.log || return 1
+ ebegin "Starting smsd"
+ start-stop-daemon -b -u smsd:sms --start --exec /usr/bin/smsd -- \
+ -c /etc/smsd.conf -p /run/smsd/smsd.pid \
+ -i /run/smsd/smsd.working
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping smsd"
+ start-stop-daemon --stop -n smsd
+ eend ${?}
+}
RDEPEND="sys-process/procps
stats? ( >=dev-libs/mm-1.4.0 )"
+PATCHES="${FILESDIR}/${PV}-gawk-location.patch"
S="${WORKDIR}/${PN}3"
pkg_setup() {
fowners -R smsd:sms /var/spool/sms
fperms g+s /var/spool/sms/incoming
- newinitd "${FILESDIR}"/smsd.initd3 smsd
+ newinitd "${FILESDIR}"/smsd.initd4 smsd
insopts -o smsd -g sms -m0644
insinto /etc
newins examples/smsd.conf.easy smsd.conf