summaryrefslogtreecommitdiff
path: root/repo/system/utmps.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-03-10 23:01:07 +0000
committerdavidovski <david@davidovski.xyz>2022-03-10 23:01:07 +0000
commit2bda0d54b37dd3ebf7917c3a58c0404d21afe7f6 (patch)
tree36a97971d0f9c6151f36b333383bb985289f23e3 /repo/system/utmps.xibuild
parent08c8891c20131576640f30cc40fcdbc57a497957 (diff)
shell will now default to dash asap
Diffstat (limited to 'repo/system/utmps.xibuild')
-rw-r--r--repo/system/utmps.xibuild8
1 files changed, 5 insertions, 3 deletions
diff --git a/repo/system/utmps.xibuild b/repo/system/utmps.xibuild
index c92c210..c5c5922 100644
--- a/repo/system/utmps.xibuild
+++ b/repo/system/utmps.xibuild
@@ -4,7 +4,7 @@ MAKEDEPS=""
DEPS="skalibs"
PKG_VER=0.1.1.0
-SOURCE=https://skarnet.org/software/utmps/utmps-0.1.1.0.tar.gz
+SOURCE=https://skarnet.org/software/utmps/utmps-$PKG_VER.tar.gz
DESC="Library implementing utmpx.h family of functions"
@@ -22,7 +22,6 @@ package () {
make DESTDIR=$PKG_DEST install
ln -s utmps/utmpx.h $PKG_DEST/usr/include/utmpx.h
install -d $PKG_DEST/usr/lib/pkgconfig
-
cat > $PKG_DEST/usr/lib/pkgconfig/utmps.pc << EOF
Name: utmps
Description: A secure implementation of the utmp mechanism.
@@ -37,9 +36,12 @@ EOF
}
postinstall () {
+ # check that shadow exists
+ command -v useradd || exit 1
+ command -v chown || exit 1
+
useradd -c "utmps user" -d /run/utmps \
-u 984 -g utmp -s /bin/false utmp
[ -d /var/log/utmps ] || mkdir -p /var/log/utmps
chown -R utmp:utmp /var/log/utmps
-
}