Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gcc43.git;a=commitdiff;h=0b0724896d70420a93b4a82e49571c2235e138b8
commit 0b0724896d70420a93b4a82e49571c2235e138b8 Author: crazy <[EMAIL PROTECTED]> Date: Mon Mar 10 15:28:39 2008 +0100 frugalware-0.8-2-i686 * release bump * added serice diff for new chkconfig * and fixed other minor issues in service * Ok @ vmiklos diff --git a/source/base/frugalware/FrugalBuild b/source/base/frugalware/FrugalBuild index a083068..751f570 100644 --- a/source/base/frugalware/FrugalBuild +++ b/source/base/frugalware/FrugalBuild @@ -3,15 +3,15 @@ pkgname=frugalware pkgver=0.8 -pkgrel=1 +pkgrel=2 pkgdesc="Basic Frugalware Linux filesystem package" url="http://ftp.frugalware.org/pub/other/frugalware/" depends=() -rodepends=('coreutils' 'chkconfig') +rodepends=('coreutils>=6.10-3' 'chkconfig>=1.3.30c') makedepends=('help2man') groups=('base' 'core') archs=('i686' 'x86_64' 'ppc') backup=(etc/{profile.d/lang.sh,issue.net,ld.so.conf,nsswitch.conf,securetty,termcap}) up2date="lynx -dump $url |Flasttar" -source=($url/$pkgname-$pkgver.tar.gz) -signatures=("$source.asc") +source=($url/$pkgname-$pkgver.tar.gz service.diff) +signatures=("$source.asc" '') diff --git a/source/base/frugalware/service.diff b/source/base/frugalware/service.diff new file mode 100644 index 0000000..0743b94 --- /dev/null +++ b/source/base/frugalware/service.diff @@ -0,0 +1,121 @@ +diff -Naur frugalware-0.8/var/service frugalware-0.8-p/var/service +--- frugalware-0.8/var/service 2008-03-07 00:27:10.000000000 +0100 ++++ frugalware-0.8-p/var/service 2008-03-10 14:44:27.000000000 +0100 +@@ -1,3 +1,4 @@ ++ + #!/bin/sh + + # (c) 2003, 2004, 2008 Miklos Vajna <[EMAIL PROTECTED]> +@@ -7,46 +8,65 @@ + TEXTDOMAIN=service + TEXTDOMAINDIR=/var/lib/frugalware/messages + ++ ++usage() ++{ ++ echo $"Usage: $0 service action" ++ echo ++ echo $"Actions:" ++ echo ++ echo $"start Start the service." ++ echo ++ echo $"stop Stop the service." ++ echo ++ echo $"status Status of the service (if it supports querying so)." ++ echo ++ echo $"restart Stop and start again the service." ++ echo ++ echo $"add Adds a new service for management by chkconfig." ++ echo ++ echo $"del Removes a service from chkconfig management." ++ echo ++ echo $"list List whether the service is stopped or started in each runlevel." ++ exit 0 ++} ++ ++if [ "$1" = "" ]; then ++ usage ++fi ++ + if [ "$1" = "--version" ]; then +- echo "service (pacman-tools) 0.2" ++ echo "service (pacman-tools) 0.2.1" + echo +- echo "Copyright (c) 2003-2007 by Miklos Vajna <[EMAIL PROTECTED]>" ++ echo "Copyright (c) 2003-2008 by Miklos Vajna <[EMAIL PROTECTED]>" + echo "This is free software; see the source for copying conditions. There is NO" + echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit 0 + elif [ "$1" = "--help" ]; then +- echo $"Usage: $0 service action" +- echo +- echo $"Actions:" +- echo +- echo $"start Start the service." +- echo +- echo $"stop Stop the service." +- echo +- echo $"status Status of the service (if it supports querying so)." +- echo +- echo $"restart Stop and start again the service." +- echo +- echo $"add Adds a new service for management by chkconfig." +- echo +- echo $"del Removes a service from chkconfig management." +- echo +- echo $"list List whether the service is stopped or started in each runlevel." +- exit 0 ++ usage + fi +-if [ "$1" = "list" ]; then +- chkconfig --list --level $2 | grep $2:$3 ++ ++if [ "$1" = "level" ]; then ++ if [ "$2" != "" ]; then ++ if [ "$3" != "" ]; then ++ ## well just support english for now 'on' is not ++ ## the same as Ein etc ++ LC_ALL=C; chkconfig --list --level $2 | grep $2:$3 ++ else ++ echo $"Usage: $0 level <level> <on/off>" ++ exit 1 ++ fi ++ else ++ echo $"Usage: $0 level <level> <on/off>" ++ exit 1 ++ fi + else + service=rc.$1 + name=/etc/rc.d/$service + if ! [ -z "$1" ]; then + if ! [ -e $name ]; then +- # this will print a nice error message +- chkconfig --list $service +- exit 1 +- fi +- if ! chkconfig --list $service >/dev/null 2>&1; then +- chkconfig --list $service ++ ## maybe typo ? ++ usage + exit 1 + fi + fi +@@ -55,7 +75,17 @@ + elif [ "$2" = "del" ]; then + chkconfig --del $service + elif [ "$2" = "list" ]; then +- chkconfig --list $service ++ chkconfig --list $service >/dev/null 2>&1 ++ RET=$? ++ if [ "$RET" = "0" ]; then ++ ## we are fine , the file $name ++ ## exists and is added list it ++ chkconfig --list $service ++ else ++ ## error , files exists but isn't added ++ echo $"Use $0 $1 add first." ++ exit 1 ++ fi + else + $name $2 + fi _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
