updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / smstools3 / sendsms.patch
blob2d697229ac26b663564d6a4c5b890e23ea4eb6c4
1 --- ./smstools3/scripts/sendsms.old 2010-07-08 16:41:13.000000000 +0400
2 +++ ./smstools3/scripts/sendsms 2010-10-30 13:37:44.000000000 +0400
3 @@ -18,7 +18,7 @@
4 # When creating keys, remember to use -n for echo:
5 # echo -n "key" | md5sum
7 -smsd_user="smsd"
8 +smsd_group="smsd"
10 # Will need echo which accepts -n argument:
11 ECHO=echo
12 @@ -85,10 +85,10 @@
16 -owner=""
17 -if [ -f /etc/passwd ]; then
18 - if grep $smsd_user: /etc/passwd >/dev/null; then
19 - owner=$smsd_user
20 +group=""
21 +if [ -f /etc/group ]; then
22 + if grep $smsd_group: /etc/group >/dev/null; then
23 + group=$smsd_group
27 @@ -107,8 +107,9 @@
28 $ECHO -n "$TEXT" | iconv -t UNICODEBIG >> $TMPFILE
31 - if [ "x$owner" != x ]; then
32 - chown $owner $TMPFILE
33 + if [ "x$group" != x ]; then
34 + chgrp $group $TMPFILE
35 + chmod 0660 $TMPFILE
38 FILE=`mktemp /var/spool/sms/outgoing/send_XXXXXX`