DA: Modify DHCP request retries count
[platform/upstream/connman.git] / scripts / connman.in
old mode 100644 (file)
new mode 100755 (executable)
index a67f667..f3d438f
@@ -1,7 +1,6 @@
 #!/bin/sh
 
-DAEMON=@prefix@/sbin/connmand
-PIDFILE=@localstatedir@/run/connmand.pid
+DAEMON=@bindir@/connmand
 DESC="Connection Manager"
 
 . /lib/lsb/init-functions
@@ -10,16 +9,19 @@ if [ -f @sysconfdir@/default/connman ] ; then
        . @sysconfdir@/default/connman
 fi
 
+if [ "CONNMAN_RUNSTATEDIR_RESOLVCONF" != "no" ] ; then
+    mkdir -p @runstatedir@/connman
+    ln -sf @runstatedir@/connman/resolv.conf /etc/
+fi
+
 set -e
 
 do_start() {
-       start-stop-daemon --start --oknodo \
-               --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
+       start-stop-daemon --start --oknodo --exec $DAEMON -- $DAEMON_OPTS
 }
 
 do_stop() {
-       start-stop-daemon --stop --oknodo --quiet \
-               --pidfile $PIDFILE --exec $DAEMON
+       start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
 }
 
 case "$1" in