summaryrefslogtreecommitdiff
path: root/system/utmps/utmps.initd
blob: 1131ca1999260fb60f43a8fb521ae2cb112df2de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/sbin/openrc-run
# Copyright 2022-2023 Adélie Linux

description="boot script for the utmps utmp, wtmp and btmp services"

depend()
{
	need localmount
	after bootmisc
	before networking
}

stop()
{
	ebegin "Stopping the utmps services"
	s6-svc -D /run/service/btmpd
	s6-svc -D /run/service/wtmpd
	s6-svc -D /run/service/utmpd
	eend $?
}

start()
{
	ebegin "Starting the utmps services"
	s6-svlisten -U " /run/service/utmpd" " /run/service/wtmpd" " /run/service/btmpd" "" \
		foreground " s6-svc" " -U" " /run/service/utmpd" "" \
		foreground " s6-svc" " -U" " /run/service/wtmpd" "" \
		s6-svc -U /run/service/btmpd
	eend $?
}