OpenRC: provide a shutdown service.
--HG-- extra : convert_revision : 1d30114537bf63e4ed470a23519d2d2ab38ee371
This commit is contained in:
parent
9815dc1aee
commit
d754e368dc
18
templates/OpenRC/files/shutdown.in
Normal file
18
templates/OpenRC/files/shutdown.in
Normal file
@ -0,0 +1,18 @@
|
||||
#!${PREFIX}/sbin/runscript
|
||||
|
||||
description="Shutdown or reboot the system"
|
||||
|
||||
depend()
|
||||
{
|
||||
keyword noprefix
|
||||
after *
|
||||
}
|
||||
|
||||
start()
|
||||
{
|
||||
if [ "${RC_RUNLEVEL}" = "shutdown" ]; then
|
||||
yesno "$RC_REBOOT" && reboot -d -f -i
|
||||
poweroff -d -f -h -i
|
||||
fi
|
||||
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
pkgname=OpenRC
|
||||
version=20090430
|
||||
wrksrc=openrc
|
||||
patch_files="xbps-changes.diff"
|
||||
distfiles="http://ftp.gnu.org/gnu/openrc/openrc-$version.tar.bz2"
|
||||
build_style=gnu_makefile
|
||||
short_desc="Universal init system"
|
||||
@ -22,3 +23,8 @@ conf_files="/etc/rc.conf /etc/conf.d/bootmisc /etc/conf.d/consolefont
|
||||
|
||||
Add_dependency full glibc
|
||||
Add_dependency full psmisc
|
||||
|
||||
pre_configure()
|
||||
{
|
||||
cp ${FILESDIR}/shutdown.in ${wrksrc}/init.d
|
||||
}
|
||||
|
20
templates/OpenRC/xbps-changes.diff
Normal file
20
templates/OpenRC/xbps-changes.diff
Normal file
@ -0,0 +1,20 @@
|
||||
Adds the shutdown service.
|
||||
|
||||
--- init.d/Makefile.Linux.orig 2009-05-02 23:22:58.456719613 +0200
|
||||
+++ init.d/Makefile.Linux 2009-05-02 23:23:11.172882585 +0200
|
||||
@@ -2,7 +2,7 @@ NET_LO= net.lo
|
||||
|
||||
SRCS+= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in killprocs.in \
|
||||
modules.in mount-ro.in mtab.in numlock.in procfs.in sysfs.in \
|
||||
- termencoding.in
|
||||
+ termencoding.in shutdown.in
|
||||
|
||||
.SUFFIXES: .Linux.in
|
||||
.Linux.in:
|
||||
--- runlevels/Makefile.Linux.orig 2009-05-02 23:27:32.089940526 +0200
|
||||
+++ runlevels/Makefile.Linux 2009-05-02 23:27:42.565715104 +0200
|
||||
@@ -1,3 +1,3 @@
|
||||
SYSINIT+= devfs dmesg
|
||||
BOOT+= hwclock keymaps modules mtab procfs termencoding
|
||||
-SHUTDOWN+= killprocs mount-ro
|
||||
+SHUTDOWN+= killprocs mount-ro shutdown
|
Loading…
Reference in New Issue
Block a user