~jon-raiford/mythbuntu/lirc

« back to all changes in this revision

Viewing changes to debian/lirc.init.d

  • Committer: Jon Raiford
  • Date: 2010-04-10 22:44:59 UTC
  • mfrom: (129.1.8 lirc)
  • Revision ID: jon@raiford.org-20100410224459-pf4qy9gtxlft2upn
updated to latest sources

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        echo $REMOTE_ARGS
60
60
}
61
61
 
 
62
<<<<<<< TREE
 
63
=======
 
64
build_transmitter_args ()
 
65
{
 
66
        TRANSMITTER_ARGS="$*"
 
67
 
 
68
        #Transmitters must be explicitly be defined
 
69
        if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
 
70
                if [ -n "$TRANSMITTER_DEVICE" ] && [ "$TRANSMITTER_DEVICE" != "none" ]; then
 
71
                        TRANSMITTER_ARGS="--device=$TRANSMITTER_DEVICE $TRANSMITTER_ARGS"
 
72
                fi
 
73
                if [ -n "$TRANSMITTER_DRIVER" ] && [ "$TRANSMITTER_DRIVER" != "none" ]; then
 
74
                        TRANSMITTER_ARGS="--driver=$TRANSMITTER_DRIVER $TRANSMITTER_ARGS"
 
75
                fi
 
76
 
 
77
                #Now, if we ALSO have a remote defined, add some args
 
78
                #To make the second lircd connect
 
79
                if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
 
80
                        TRANSMITTER_ARGS="$TRANSMITTER_ARGS --connect=localhost:8765 --pidfile=/var/run/lirc/lircd1.pid"
 
81
                fi
 
82
                TRANSMITTER_ARGS="--output=$TRANSMITTER_SOCKET $TRANSMITTER_ARGS"
 
83
        fi
 
84
        echo $TRANSMITTER_ARGS
 
85
}
 
86
 
 
87
>>>>>>> MERGE-SOURCE
62
88
. /lib/lsb/init-functions
63
89
 
64
90
test -f /usr/sbin/lircd || exit 0
94
120
fi
95
121
 
96
122
#We need default socket locations
 
123
<<<<<<< TREE
97
124
LEGACY_SOCKET="/dev/lircd"
98
125
DEFAULT_SOCKET="/var/run/lirc/lircd"
99
126
REMOTE_PID="/var/run/lirc/lircd.pid"
120
147
if [ $REMOTE_COUNT -eq 0 ] && [ -c $dev ]; then
121
148
        REMOTE_DEVICE="$dev"
122
149
        REMOTE_COUNT=1
 
150
=======
 
151
OLD_SOCKET="/dev/lircd"
 
152
if [ -z "$REMOTE_SOCKET" ]; then
 
153
        REMOTE_SOCKET="/var/run/lirc/lircd"
 
154
fi
 
155
if [ -z "$TRANSMITTER_SOCKET" ]; then
 
156
        TRANSMITTER_SOCKET="/var/run/lirc/lircd"
 
157
        #Now, if we ALSO have a remote defined,
 
158
        #change the default transmitter socket
 
159
        if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
 
160
                TRANSMITTER_SOCKET="${TRANSMITTER_SOCKET}1"
 
161
        fi
 
162
>>>>>>> MERGE-SOURCE
123
163
fi
124
164
 
125
165
case "$1" in