From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/315 Path: main.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit-1.0.0 release Date: Thu, 12 Feb 2004 20:46:20 +0000 Message-ID: <20040212204520.26049.qmail@c032e53e4f6f05.315fe32.mid.smarden.org> References: <20040210153548.16191.qmail@56dafcc887170f.315fe32.mid.smarden.org> <20040211192355.17755561@rad1.109bean.org.uk> <20040211204212.12241.qmail@771d3fc1654724.315fe32.mid.smarden.org> <20040212174120.26bcb697@rad1.109bean.org.uk> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Kj7319i9nmIyA2yE" X-Trace: sea.gmane.org 1076618704 2167 80.91.224.253 (12 Feb 2004 20:45:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2004 20:45:04 +0000 (UTC) Original-X-From: supervision-return-553-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Feb 12 21:44:56 2004 Return-path: Original-Received: from antah.skarnet.org ([212.43.221.114]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1ArNhg-0006hF-00 for ; Thu, 12 Feb 2004 21:44:56 +0100 Original-Received: (qmail 1651 invoked by uid 76); 12 Feb 2004 20:45:17 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 1646 invoked from network); 12 Feb 2004 20:45:17 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20040212174120.26bcb697@rad1.109bean.org.uk> Xref: main.gmane.org gmane.comp.sysutils.supervision.general:315 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:315 --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 12, 2004 at 05:41:20PM +0000, Richard A Downing FBCS wrote: > I have made progress and now run a standard shell in the recovery > situation, modelling my script on the openbsd example. I would have > liked to use sulogin, which is more secure, but as I was planning not > to install sysVinit, and sulogin is part of that package, it's out for > the moment, but see below. Yes, you're right, sulogin is part of sysvinit. > I'm beginning to think that I'm going to have to install SysVinit > after all. (I may need wall, halt, poweroff, reboot, shutdown, and > sulogin, these are all part of sysVinit) I still have the sysvinit package on my systems, and use some of its tools. It's very difficult to remove the 'essential' package sysvinit from a Debian system, even if runit is used as init scheme, because other essential packages depend on sysvinit directly (e.g. dpkg). A halt and reboot program actually is very simple; but beware, it simply reboots or halts the kernel and doesn't care about the system's state. If you use it from stage 1, you should exactly know the system's state as /etc/runit/1 is the first and only process started since process no 1. I attach a sample 'reboot.c' source file. Put it into /package/admin/runit/compile/, change to this directory, add this to the Makefile, and run make reboot: # cat >>Makefile < #include "reboot_system.h" #include "strerr.h" #ifndef RB_AUTOBOOT #error "RB_AUTOBOOT undefined" #endif unsigned int doreboot =1; /* set to 0 for halt */ int r =0; int main(int argc, char **argv) { sync(); if (doreboot) 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); } --Kj7319i9nmIyA2yE--