Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lemmy04
smstools3
smstools3.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File smstools3.dif of Package smstools3
--- examples/smsd.conf.easy +++ examples/smsd.conf.easy 2010/09/09 09:27:58 @@ -1,8 +1,10 @@ # Example smsd.conf. Read the manual for a description devices = GSM1 -logfile = /var/log/smsd.log -loglevel = 7 +loglevel = 5 +#stats = /var/lib/smsd +#sent = /var/spool/sms/sent +umask = 027 [GSM1] device = /dev/ttyS0 --- scripts/sendsms +++ scripts/sendsms 2010/09/09 09:27:58 @@ -5,7 +5,7 @@ # $1 is the destination phone number. # $2 is the message text. # If you leave $2 or both empty, the script will ask you. -# If you give more than 2 arguments, last is taken as a text and +# If you give more than 2 arguments, last is taken as a text and # all other are taken as destination numbers. # If a destination is asked, you can type multiple numbers # delimited with spaces. @@ -18,7 +18,7 @@ # When creating keys, remember to use -n for echo: # echo -n "key" | md5sum -smsd_user="smsd" +SENDSMS_GROUP="sendsms" # Will need echo which accepts -n argument: ECHO=echo @@ -63,7 +63,10 @@ fi fi -if [ $# -gt 2 ]; then +if [ $# -eq 3 -a X"$TEXT" = X-f ]; then + TEXT=`cat $3` + destinations=$DEST +elif [ $# -gt 2 ]; then n=$# while [ $n -gt 1 ]; do destinations="$destinations $1" @@ -85,13 +88,6 @@ fi fi -owner="" -if [ -f /etc/passwd ]; then - if grep $smsd_user: /etc/passwd >/dev/null; then - owner=$smsd_user - fi -fi - for destination in $destinations do echo "To: $destination" @@ -107,9 +103,8 @@ $ECHO -n "$TEXT" | iconv -t UNICODEBIG >> $TMPFILE fi - if [ "x$owner" != x ]; then - chown $owner $TMPFILE - fi + chgrp $SENDSMS_GROUP $TMPFILE + chmod 640 $TMPFILE FILE=`mktemp /var/spool/sms/outgoing/send_XXXXXX` mv $TMPFILE $FILE --- src/Makefile +++ src/Makefile 2010/09/09 09:27:58 @@ -9,10 +9,10 @@ # CC=gcc # Comment this out, to enable statistics -CFLAGS += -D NOSTATS +# CFLAGS += -D NOSTATS # Comment this out if iconv is not available on the system -#CFLAGS += -D USE_ICONV +CFLAGS += -D USE_ICONV # Uncomment this is iconv is used and it's not included in libc: #LFLAGS += -liconv --- src/smsd_cfg.c +++ src/smsd_cfg.c 2010/09/09 09:27:58 @@ -805,7 +805,7 @@ else if (!strcasecmp(name, "umask")) { - conf_umask = (mode_t) strtol(ask_value(0, name, value), NULL, 0); + conf_umask = (mode_t) strtol(ask_value(0, name, value), NULL, 0) & 0777; if (errno == EINVAL) startuperror("Invalid value for umask: %s\n", value); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor