# HG changeset patch # User Nathan Neulinger # Date 1442841455 0 # Node ID 68bd2134ab5430d1367bd3465791774e786a8c1d # Parent c1394545d6d2a0a53d7c7a0ad0733fa95a20f7bf shutdown: add simple shutdown wrapper script for other tool compatibility diff -r c1394545d6d2 -r 68bd2134ab54 shutdown/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shutdown/receipt Mon Sep 21 13:17:35 2015 +0000 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="shutdown" +VERSION="1.0" +CATEGORY="utilities" +SHORT_DESC="Simple wrapper for busybox to provide shutdown command" +MAINTAINER="nneul@neulinger.org" +LICENSE="LGPL" +WEB_SITE="http://www.slitaz.org" + +genpkg_rules() +{ + mkdir -p $fs/sbin + cp $stuff/shutdown $fs/sbin/shutdown + chmod 755 $fs/sbin/shutdown +} + diff -r c1394545d6d2 -r 68bd2134ab54 shutdown/stuff/shutdown --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/shutdown/stuff/shutdown Mon Sep 21 13:17:35 2015 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh + +# +# This should do more, but this at least gets other scripts/tools the ability to +# use 'shutdown -r now' or similar. +# + +if [ "x$1" == "x-r" ]; then + /sbin/reboot +else + /sbin/poweroff +fi