From aca54b6e9fe7d8667dc770a3baaf7750d2f0f629 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sat, 16 May 2009 17:19:03 -0400 Subject: [PATCH] runit: removed forced_{reboot,poweroff} --- base/runit/forced_reboot.patch | 81 ---------------------------------- base/runit/runit.conf | 2 - 2 files changed, 83 deletions(-) delete mode 100644 base/runit/forced_reboot.patch diff --git a/base/runit/forced_reboot.patch b/base/runit/forced_reboot.patch deleted file mode 100644 index 32173ad05..000000000 --- a/base/runit/forced_reboot.patch +++ /dev/null @@ -1,81 +0,0 @@ -# --- SDE-COPYRIGHT-NOTE-BEGIN --- -# This copyright note is auto-generated by ./scripts/Create-CopyPatch. -# -# Filename: package/.../runit/forced_reboot.patch -# Copyright (C) 2006 The T2 SDE Project -# -# More information can be found in the files COPYING and README. -# -# This patch file is dual-licensed. It is available under the license the -# patched project is licensed under, as long as it is an OpenSource license -# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms -# of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. -# --- SDE-COPYRIGHT-NOTE-END --- - ---- runit-1.3.1/package/commands 2005-08-24 22:14:39.000000000 +0200 -+++ runit-1.3.1/package/commands 2006-04-09 00:47:27.000000000 +0200 -@@ -11,3 +11,4 @@ - svwaitdown - svwaitup - utmpset -+forced_reboot -diff -Nudr admin.orig/runit-1.3.1/src/forced.c admin/runit-1.3.1/src/forced.c ---- runit-1.3.1/src/forced_reboot.c 1970-01-01 01:00:00.000000000 +0100 -+++ runit-1.3.1/src/forced_reboot.c 2006-04-09 00:45:35.000000000 +0200 -@@ -0,0 +1,38 @@ -+#include -+#include "reboot_system.h" -+#include "strerr.h" -+ -+#ifndef RB_AUTOBOOT -+#error "RB_AUTOBOOT undefined" -+#endif -+ -+int r =0; -+ -+int main(int argc, char **argv) { -+ char *progname; -+ sync(); -+ if ((progname = strrchr(argv[0], '/')) == NULL) -+ progname = argv[0]; -+ else -+ progname++; -+ -+ if (strcmp(progname,"forced_reboot")==0) -+ r =reboot_system(RB_AUTOBOOT); -+ else { -+#ifdef RB_POWER_OFF -+ r =reboot_system(RB_POWER_OFF); -+ if (r) strerr_die2sys(100, *argv, ": fatal: "); -+#endif -+#ifdef RB_HALT_SYSTEM -+ r =reboot_system(RB_HALT_SYSTEM); -+#else -+# ifdef RB_HALT -+ r =reboot_system(RB_HALT); -+# else -+ r =reboot_system(RB_AUTOBOOT); -+# endif -+#endif -+ } -+ if (r) strerr_die2sys(100, *argv, ": fatal: "); -+ _exit(0); -+ } ---- runit-1.3.1/src/Makefile 2005-08-24 22:14:39.000000000 +0200 -+++ runit-1.3.1/src/Makefile 2006-04-09 00:50:04.000000000 +0200 -@@ -1,4 +1,4 @@ --IT=chpst runit runit-init runsv runsvchdir runsvdir sv svlogd utmpset -+IT=chpst runit runit-init runsv runsvchdir runsvdir sv svlogd utmpset forced_reboot - - default: sysdeps $(IT) - -@@ -466,3 +466,7 @@ - wait_pid.o: compile error.h haswaitp.h wait_pid.c - ./compile wait_pid.c - -+forced_reboot: load forced_reboot.o unix.a byte.a -+ ./load forced_reboot unix.a byte.a -static -+forced_reboot.o: compile forced_reboot.c reboot_system.h -+ ./compile forced_reboot.c diff --git a/base/runit/runit.conf b/base/runit/runit.conf index 6329234a8..279bd274c 100644 --- a/base/runit/runit.conf +++ b/base/runit/runit.conf @@ -94,8 +94,6 @@ EOT fi - ln -sfv forced_reboot $pkg_djb_commanddir/forced_poweroff - # Emulate daemontools if not present using chpst if ! pkginstalled daemontools; then echo "Emulate functionality of daemontools with chpst."