openbsd.shutdown: Set paths for halt, reboot, wall

This commit is contained in:
Artemis Tosini
2025-02-12 12:14:15 -07:00
committed by Audrey Dutcher
parent f3f5493bce
commit cd0f063702
+12 -3
View File
@@ -1,8 +1,17 @@
{ mkDerivation }:
{
mkDerivation,
reboot,
wall,
}:
mkDerivation {
path = "sbin/shutdown";
preBuild = ''
sed -i 's/4550/0550/' Makefile
postPatch = ''
sed -i 's/4550/0550/' $BSDSRCDIR/sbin/shutdown/Makefile
substituteInPlace $BSDSRCDIR/sbin/shutdown/pathnames.h \
--replace-fail /sbin/halt ${reboot}/bin/halt \
--replace-fail /sbin/reboot ${reboot}/bin/reboot \
--replace-fail /usr/bin/wall ${wall}/bin/wall
'';
}