openbsd.{reboot,shutdown,wall}: init (#381531)

This commit is contained in:
John Ericson
2025-02-12 20:28:36 -05:00
committed by GitHub
3 changed files with 25 additions and 3 deletions
@@ -0,0 +1,4 @@
{ mkDerivation }:
mkDerivation {
path = "sbin/reboot";
}
+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
'';
}
@@ -0,0 +1,9 @@
{ mkDerivation }:
mkDerivation {
path = "usr.bin/wall";
postPatch = ''
sed -i /BINMODE/d $BSDSRCDIR/usr.bin/wall/Makefile
sed -i /BINGRP/d $BSDSRCDIR/usr.bin/wall/Makefile
'';
}