wok rev 18428

shutdown: add simple shutdown wrapper script for other tool compatibility
author Nathan Neulinger <nneul@neulinger.org>
date Mon Sep 21 13:17:35 2015 +0000 (2015-09-21)
parents c1394545d6d2
children ca1faa27f526
files shutdown/receipt shutdown/stuff/shutdown
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/shutdown/receipt	Mon Sep 21 13:17:35 2015 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="shutdown"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="utilities"
     1.9 +SHORT_DESC="Simple wrapper for busybox to provide shutdown command"
    1.10 +MAINTAINER="nneul@neulinger.org"
    1.11 +LICENSE="LGPL"
    1.12 +WEB_SITE="http://www.slitaz.org"
    1.13 +
    1.14 +genpkg_rules()
    1.15 +{
    1.16 +	mkdir -p $fs/sbin
    1.17 +	cp $stuff/shutdown $fs/sbin/shutdown
    1.18 +	chmod 755 $fs/sbin/shutdown
    1.19 +}
    1.20 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/shutdown/stuff/shutdown	Mon Sep 21 13:17:35 2015 +0000
     2.3 @@ -0,0 +1,12 @@
     2.4 +#!/bin/sh
     2.5 +
     2.6 +#
     2.7 +# This should do more, but this at least gets other scripts/tools the ability to
     2.8 +# use 'shutdown -r now' or similar.
     2.9 +#
    2.10 +
    2.11 +if [ "x$1" == "x-r" ]; then
    2.12 +	/sbin/reboot
    2.13 +else
    2.14 +	/sbin/poweroff
    2.15 +fi