The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / tftpd / S80tftpd-hpa
1 #! /bin/sh
2
3 OPTIONS="-c -l -s /var/lib/tftpboot"
4
5 set -e
6
7 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
8 DESC="HPA's tftpd"
9 NAME=in.tftpd
10 DAEMON=/usr/sbin/$NAME
11 PIDFILE=/var/run/$NAME.pid
12 SCRIPTNAME=/etc/init.d/S80tftpd-hpa
13
14 #
15 #       Function that starts the daemon/service.
16 #
17 d_start() {
18         mkdir -p /var/lib/tftpboot
19         chmod 1777 /var/lib/tftpboot
20         $DAEMON $OPTIONS
21 }
22
23 #
24 #       Function that stops the daemon/service.
25 #
26 d_stop() {
27         killall -q $NAME
28 }
29
30 #
31 #       Function that sends a SIGHUP to the daemon/service.
32 #
33 d_reload() {
34         d_start
35         d_stop
36 }
37
38 case "$1" in
39   start)
40         echo -n "Starting $DESC: "
41         d_start
42         echo "done"
43         ;;
44   stop)
45         echo -n "Stopping $DESC: "
46         d_stop
47         echo "done"
48         ;;
49   #reload)
50         #
51         #       If the daemon can reload its configuration without
52         #       restarting (for example, when it is sent a SIGHUP),
53         #       then implement that here.
54         #
55         #       If the daemon responds to changes in its config file
56         #       directly anyway, make this an "exit 0".
57         #
58         # echo -n "Reloading $DESC configuration..."
59         # d_reload
60         # echo "done."
61   #;;
62   restart|force-reload)
63         #
64         #       If the "reload" option is implemented, move the "force-reload"
65         #       option to the "reload" entry above. If not, "force-reload" is
66         #       just the same as "restart".
67         #
68         echo -n "Restarting $DESC: "
69         d_stop
70         sleep 1
71         d_start
72         echo "done"
73         ;;
74   *)
75         # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
76         echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
77         exit 1
78         ;;
79 esac
80
81 exit 0