summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/utmps/APKBUILD16
-rw-r--r--system/utmps/utmps.initd10
2 files changed, 14 insertions, 12 deletions
diff --git a/system/utmps/APKBUILD b/system/utmps/APKBUILD
index 1410cee65..8ad477089 100644
--- a/system/utmps/APKBUILD
+++ b/system/utmps/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=utmps
pkgver=0.1.2.1
-pkgrel=0
+pkgrel=1
pkgdesc="A secure utmp/wtmp implementation"
url="https://skarnet.org/software/$pkgname/"
arch="all"
@@ -35,11 +35,8 @@ build() {
package() {
make DESTDIR="$pkgdir" install
runimage="$pkgdir/etc/s6-linux-init/current/run-image"
- mkdir -p -m 0755 "$runimage/utmps" "$runimage/service/utmpd"
+ mkdir -p -m 0755 "$runimage/utmps"
chown utmp:utmp "$runimage/utmps"
- cp -f "$srcdir/utmpd.run" "$runimage/service/utmpd/run"
- echo 3 > "$runimage/service/utmpd/notification-fd"
- chmod 0755 "$runimage/service/utmpd/run"
install -D -m755 "$srcdir/utmps.initd" "$pkgdir/etc/init.d/utmps"
}
@@ -47,14 +44,17 @@ openrc() {
rldir="$subpkgdir"/etc/runlevels/boot
subrunimage="$subpkgdir/etc/s6-linux-init/current/run-image"
default_openrc
- mkdir -p -m 0755 "$rldir" "$subpkgdir/var/log/wtmpd" "$subrunimage/service/wtmpd" "$subrunimage/service/btmpd"
+ mkdir -p -m 0755 "$rldir" "$subpkgdir/var/log/wtmpd" "$subrunimage/service/utmpd" "$subrunimage/service/wtmpd" "$subrunimage/service/btmpd"
+ cp -f "$srcdir/utmpd.run" "$subrunimage/service/utmpd/run"
+ echo 3 > "$subrunimage/service/utmpd/notification-fd"
+ touch "$subrunimage/service/utmpd/down"
cp -f "$srcdir/wtmpd.run" "$subrunimage/service/wtmpd/run"
echo 3 > "$subrunimage/service/wtmpd/notification-fd"
touch "$subrunimage/service/wtmpd/down"
cp -f "$srcdir/btmpd.run" "$subrunimage/service/btmpd/run"
echo 3 > "$subrunimage/service/btmpd/notification-fd"
touch "$subrunimage/service/btmpd/down"
- chmod 0755 "$subrunimage/service/wtmpd/run" "$subrunimage/service/btmpd/run"
+ chmod 0755 "$subrunimage/service/utmpd/run" "$subrunimage/service/wtmpd/run" "$subrunimage/service/btmpd/run"
chown utmp:utmp "$subpkgdir/var/log/wtmpd"
ln -s wtmpd/wtmp "$subpkgdir/var/log/wtmp"
ln -s wtmpd/btmp "$subpkgdir/var/log/btmp"
@@ -95,4 +95,4 @@ sha512sums="20bf9bfabfdd390377ca86d85da4a263a027ee5bdf5b7305bc6fb44d4aea7b4af886
0ec30284c64c6ea9f25142c5f4a643bd48b137fe85781b650104f5137ffa4dfc35ca7be3e41e3acd3403ebe1d8c5378073afa4e2f3607d3d794fcd9f98ed51c4 utmpd.run
9e875a5cd37be531320a8e582afed2c980dd0a1bdfc2f6f3d826d5e5389fc6ab93f973ed1506edb23f4c73cf24a2357aefe856148eaacff86c2aafe376c575e2 wtmpd.run
503bdbb3d244243934b9b4e3deea0bf92a95f88417c822ad9cf6202584d4724d5e182a0d88d7f09069e435a8a97230b85d2b264736c85c893da193fd5ec34c71 btmpd.run
-a14ab7527fa7a4c182a1f938452acf3ff9b578d39a3e9eb81d1dad6ad558cf41a870ccac614790d75d91879d063cf64ab5456d6b6916d28fb2a829c83ae45f62 utmps.initd"
+89fb24ab5759b3a1162044895efbe01c7a17d505a29df0cd7141654783b7ada8e934a1ce5981218af41812cfb517263bbd608948102af40b7a41a843b7aaf6ca utmps.initd"
diff --git a/system/utmps/utmps.initd b/system/utmps/utmps.initd
index 6091bbb10..1131ca199 100644
--- a/system/utmps/utmps.initd
+++ b/system/utmps/utmps.initd
@@ -1,7 +1,7 @@
#!/sbin/openrc-run
# Copyright 2022-2023 Adélie Linux
-description="boot script for the utmps wtmp and btmp services"
+description="boot script for the utmps utmp, wtmp and btmp services"
depend()
{
@@ -12,16 +12,18 @@ depend()
stop()
{
- ebegin "Stopping the utmps wtmp and btmp services"
+ 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 wtmp and btmp services"
- s6-svlisten -U " /run/service/wtmpd" " /run/service/btmpd" "" \
+ 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 $?