summaryrefslogtreecommitdiffstats
path: root/utils/petitboot/files/petitboot.init
blob: 336d47a2122f53ff81a7f8d6cc3366c4e66b206a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org

START=90

kill_discover() {
	killall -q -KILL pb-discover
	umount -f -d /var/petitboot/mnt/* 2>/dev/null
}

start() {
	kill_discover
	/usr/sbin/pb-discover 2>&- >&- &
}

stop() {
	# first signal pb-discover to exit
	killall -q -INT pb-discover
	sleep 3
	# now force it
	kill_discover
}