OBS User unknown 2007-01-15 23:06:50 +00:00 committed by Git OBS Bridge
commit 256ea9353f
16 changed files with 981 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,10 @@
--- doc/Makefile.am
+++ doc/Makefile.am
@@ -7,6 +7,7 @@
htmldir = $(pkgdatadir)/html
htmlfiles = cfengine-Reference.html cfengine-Tutorial.html
html_DATA = $(htmlfiles)
+AM_MAKEINFOHTMLFLAGS = --no-split
# Info used in building and installing Postscript files
ps1 =

View File

@ -0,0 +1,38 @@
--- src/filedir.c
+++ src/filedir.c
@@ -276,7 +276,7 @@
int amroot = true, fixmode = true, docompress=false;
unsigned char digest[EVP_MAX_MD_SIZE+1];
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
u_long newflags;
#endif
@@ -294,7 +294,7 @@
Debug("%s: Checking fs-object %s\n",VPREFIX,file);
-#if defined HAVE_CHFLAGS
+#if defined HAVE_CHFLAGS && ! defined __linux__
if (ptr != NULL)
{
Debug("CheckExistingFile(+%o,-%o,+%o,-%o)\n",plus,minus,ptr->plus_flags,ptr->minus_flags);
@@ -512,7 +512,7 @@
}
}
-#ifndef HAVE_CHFLAGS
+#if ! defined HAVE_CHFLAGS || defined __linux__
if (((newperm & 07777) == (dstat->st_mode & 07777)) && (action != touch)) /* file okay */
{
Debug("File okay, newperm = %o, stat = %o\n",(newperm & 07777),(dstat->st_mode & 07777));
@@ -661,7 +661,7 @@
}
-#if defined HAVE_CHFLAGS /* BSD special flags */
+#if defined HAVE_CHFLAGS && ! defined __linux__ /* BSD special flags */
if (ptr != NULL)
{

View File

@ -0,0 +1,27 @@
--- configure.ac
+++ configure.ac
@@ -375,7 +375,7 @@
CPPFLAGS="$CPPFLAGS -I$d/include"
LDFLAGS="$LDFLAGS -L$d/lib"
PCRE_LIB="-lpcreposix"
- AC_MSG_RESULT = "$d"
+ AC_MSG_RESULT($d)
break
fi
done
@@ -386,13 +386,13 @@
if test -f "${withval}/include/pcreposix.h" ; then
CPPFLAGS="$CPPFLAGS -I${withval}/include"
LDFLAGS="$LDFLAGS -L${withval}/lib"
- AC_MSG_RESULT = "${withval}"
+ AC_MSG_RESULT(${withval})
else
AC_MSG_ERROR(Cannot find PCRE)
fi
fi
else
- AC_MSG_RESULT = "yes"
+ AC_MSG_RESULT(yes)
fi
LIBS="$LIBS -lpcreposix"
AC_DEFINE(USE_PCRE, 1, [Define if PCRE is available.])

11
cfengine-2.1.21-ia64.dif Normal file
View File

@ -0,0 +1,11 @@
--- src/crypto.c
+++ src/crypto.c
@@ -291,7 +291,7 @@
Verbose("...\n");
-snprintf(buffer,CF_BUFSIZE,"%d%d%25s",(int)CFSTARTTIME,(int)digest,VFQNAME);
+snprintf(buffer,CF_BUFSIZE,"%d%d%25s",(int)CFSTARTTIME,(long int)digest,VFQNAME);
EVP_DigestUpdate(&context,buffer,CF_BUFSIZE);

View File

@ -0,0 +1,11 @@
--- src/cf.defs.h
+++ src/cf.defs.h
@@ -409,7 +409,7 @@
/*****************************************************************************/
#define CF_GRAINS 64
-#define ATTR 11
+#define ATTR 20
#define CF_NETATTR 7 /* icmp udp dns tcpsyn tcpfin tcpack */
#define PH_LIMIT 10
#define CF_WEEK (7.0*24.0*3600.0)

View File

@ -0,0 +1,11 @@
--- src/edittools.c
+++ src/edittools.c
@@ -1443,7 +1443,7 @@
{
if (ptr->warn == 'y')
{
- snprintf(OUTPUT,CF_BUFSIZE,"File %s did not exist and was marked for editing");
+ snprintf(OUTPUT,CF_BUFSIZE,"File %s did not exist and was marked for editing",fname);
CfLog(cferror,OUTPUT,"");
}
return false;

View File

@ -0,0 +1,42 @@
--- src/link.c
+++ src/link.c
@@ -393,6 +393,10 @@
{ struct stat buf,savebuf;
char to[CF_BUFSIZE],linkbuf[CF_BUFSIZE],saved[CF_BUFSIZE],absto[CF_BUFSIZE],*lastnode;
struct UidList fakeuid;
+ union {
+ struct UidList *uifakeuid;
+ struct GidList *gifakeuid;
+ } ufakeuid = { &fakeuid };
struct Image ip;
char stamp[CF_BUFSIZE];
time_t STAMPNOW;
@@ -435,7 +439,7 @@
ip.plus = CF_SAMEMODE;
ip.minus = CF_SAMEMODE;
ip.uid = &fakeuid;
- ip.gid = (struct GidList *) &fakeuid;
+ ip.gid = ufakeuid.gifakeuid;
ip.action = "do";
ip.recurse = 0;
ip.type = 't';
@@ -858,6 +862,10 @@
{ struct stat frombuf,tobuf;
char saved[CF_BUFSIZE], *lastnode;
struct UidList fakeuid;
+ union {
+ struct UidList *uifakeuid;
+ struct GidList *gifakeuid;
+ } ufakeuid = { &fakeuid };
struct Image ip;
char stamp[CF_BUFSIZE];
time_t STAMPNOW;
@@ -888,7 +896,7 @@
ip.plus = CF_SAMEMODE;
ip.minus = CF_SAMEMODE;
ip.uid = &fakeuid;
- ip.gid = (struct GidList *) &fakeuid;
+ ip.gid = ufakeuid.gifakeuid;
ip.action = "do";
ip.recurse = 0;
ip.type = 't';

3
cfengine-2.1.21.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee9767a7e9b63baa003ba17964d595354e24fd3cd0b353c0348e54c34174820f
size 3184844

244
cfengine.changes Normal file
View File

@ -0,0 +1,244 @@
-------------------------------------------------------------------
Wed Oct 18 10:28:12 CEST 2006 - anicka@suse.cz
- fix array subscript out of range (#211160)
-------------------------------------------------------------------
Thu Sep 21 09:47:44 CEST 2006 - anicka@suse.cz
- update to 2.1.21
* copy action now supports this $(this) variable
* PH support removed from cfenvd during code rationalization
* ReturnsZeroShell function added
* Cfenvd code rationalization and channge in database format
* bugfixes
-------------------------------------------------------------------
Fri Jun 16 14:38:13 CEST 2006 - schwab@suse.de
- Fix syntax error in configure script.
-------------------------------------------------------------------
Fri May 19 15:00:23 CEST 2006 - anicka@suse.cz
- update to 2.1.20:
- various minor bugfixes added
-------------------------------------------------------------------
Wed Jan 25 21:34:55 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Jan 5 15:44:53 CET 2006 - anicka@suse.cz
- update to 2.1.17
-------------------------------------------------------------------
Tue Nov 15 11:05:32 CET 2005 - anicka@suse.cz
- update to 2.1.17
- remove CAN-2005-2960 patch (affected file removed by upstream)
-------------------------------------------------------------------
Fri Oct 7 17:47:09 CEST 2005 - schwab@suse.de
- Don't strip binaries.
-------------------------------------------------------------------
Wed Oct 5 16:36:15 CEST 2005 - anicka@suse.cz
- fix too few arguments to a *printf function
-------------------------------------------------------------------
Tue Oct 4 19:46:07 CEST 2005 - anicka@suse.cz
- fix CAN-2005-2960 vulnerability (#120075)
- update to 2.1.16
-------------------------------------------------------------------
Mon Aug 1 15:52:43 CEST 2005 - anicka@suse.cz
- update to 2.1.15
-------------------------------------------------------------------
Fri Apr 22 13:09:06 CEST 2005 - postadal@suse.cz
- updated to version 2.1.14
-------------------------------------------------------------------
Sun Feb 13 17:14:03 CET 2005 - ro@suse.de
- added libpng to nfb (for tetex)
-------------------------------------------------------------------
Thu Feb 03 10:52:13 CET 2005 - postadal@suse.cz
- updated to version 2.1.13
- added init scripts (cfenvd, cfexecd, cfservd)
-------------------------------------------------------------------
Tue Aug 17 14:22:41 CEST 2004 - postadal@suse.cz
- updated to version 2.1.9
-------------------------------------------------------------------
Wed Feb 18 14:44:28 CET 2004 - postadal@suse.cz
- updated to version 2.1.3
- removed obsoleted patch db.dif
- fixed code that broke strict aliasing
-------------------------------------------------------------------
Fri Jan 23 00:00:02 CET 2004 - ro@suse.de
- fix build with current automake
use another method to pass flags to MAKEINFOHTML
-------------------------------------------------------------------
Sat Jan 10 16:25:19 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Wed Aug 06 15:00:01 CEST 2003 - postadal@suse.cz
- updated to version 2.0.7p3
- removed obsoleted patch (info.diff)
-------------------------------------------------------------------
Mon May 12 00:39:22 CEST 2003 - ro@suse.de
- fix build with db-4.1
- fix compile: chflags function available does not mean
struct stat has st_flags
-------------------------------------------------------------------
Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
-------------------------------------------------------------------
Wed Feb 26 13:30:23 CET 2003 - postadal@suse.cz
- used install-info macros
- fixed Anomalies.texinfo (dir entry)
-------------------------------------------------------------------
Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Wed Jul 31 22:45:49 CEST 2002 - postadal@suse.cz
- update to version 2.0.3
* Hpux config changes
* new options
* new list in cfservd.conf
* a lot of fixes
-------------------------------------------------------------------
Fri Nov 23 15:00:54 CET 2001 - cihlar@suse.cz
- added Url:
-------------------------------------------------------------------
Mon Nov 5 16:37:18 CET 2001 - cihlar@suse.cz
- fixed to compile with automake 1.5
-------------------------------------------------------------------
Mon Apr 23 13:18:29 CEST 2001 - cihlar@suse.cz
- fixed warnings on ia64
-------------------------------------------------------------------
Tue Mar 6 09:01:41 CET 2001 - cihlar@suse.cz
- update to version 1.6.3
-------------------------------------------------------------------
Mon Oct 30 13:56:17 CET 2000 - cihlar@suse.cz
- update to version 1.6.0.a13
- bzipped sources
-------------------------------------------------------------------
Tue Oct 3 10:41:28 CEST 2000 - cihlar@suse.cz
- update to version 1.6.0.a11
-------------------------------------------------------------------
Mon May 15 11:19:05 CEST 2000 - cihlar@suse.cz
- Group sorted
- %{_defaultdocdir} instead of /usr/doc/packages
-------------------------------------------------------------------
Mon Apr 10 22:04:05 CEST 2000 - bk@suse.de
- added suse update config macro
-------------------------------------------------------------------
Tue Apr 4 14:02:01 CEST 2000 - cihlar@suse.cz
- upgrade to version 1.5.4
- added BuildRoot
-------------------------------------------------------------------
Mon Jan 17 18:29:29 CET 2000 - ro@suse.de
- update to 1.5.3 , man, info to /usr/share
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-------------------------------------------------------------------
Wed Sep 1 11:03:55 CEST 1999 - ro@suse.de
- update to 1.5.1 / specfile cleanup
-------------------------------------------------------------------
Tue Sep 22 11:54:31 MEST 1998 - ro@suse.de
- update to 1.4.12
----------------------------------------------------------------------------
Mon Mar 2 17:17:52 MET 1998 - florian@suse.de
- update to release 1.4.10
----------------------------------------------------------------------------
Fri Oct 10 11:43:37 MEST 1997 - florian@suse.de
- update to release 1.4.8a
----------------------------------------------------------------------------
Mon Jul 7 13:17:08 CEST 1997 - florian@suse.de
- update to release 1.4.0
----------------------------------------------------------------------------
Sat Nov 16 20:28:43 CET 1996 - florian@suse.de
- update to newest version 1.3.16
----------------------------------------------------------------------------
Thu Oct 17 16:05:09 CEST 1996 - florian@suse.de
- Update auf neue Version 1.3.12.

205
cfengine.spec Normal file
View File

@ -0,0 +1,205 @@
#
# spec file for package cfengine (Version 2.1.21)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: cfengine
BuildRequires: db-devel libpng openssl-devel tcpd-devel te_ams te_latex
License: GNU General Public License (GPL) - all versions
Group: Productivity/Networking/System
Autoreqprov: on
Version: 2.1.21
Release: 8
Summary: A Tool to Maintain Complicated Networks
URL: http://www.iu.hio.no/cfengine/
Source: %{name}-%{version}.tar.bz2
Source2: cfenvd
Source3: cfexecd
Source4: cfservd
Patch: %{name}-%{version}-ia64.dif
Patch3: %{name}-%{version}-chflags.dif
Patch4: %{name}-%{version}-automake.dif
Patch5: %{name}-%{version}-strict-aliasing-fix.diff
Patch7: %{name}-%{version}-printf.diff
Patch8: %{name}-%{version}-configure.diff
Patch9: %{name}-%{version}-overflow.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
%description
GNU cfengine is an abstract programming language for system
administrators of huge heterogeneous networks. With cfengine, system
administrators have an easy and elegant way to maintain complicated
networks.
Authors:
--------
Mark Burgess
%prep
%setup -q
%patch
%patch3
%patch4
%patch5
%patch7
%patch8
%patch9
%build
%{suse_update_config -f}
autoreconf -fi
CC=gcc CFLAGS="$RPM_OPT_FLAGS" \
./configure --prefix=/usr \
--with-docs \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--datadir=%{_defaultdocdir}
make
%install
make "DESTDIR=$RPM_BUILD_ROOT" install
install -d $RPM_BUILD_ROOT/{usr/sbin,etc/init.d}
install -m 744 %{S:2} %{S:3} %{S:4} $RPM_BUILD_ROOT/etc/init.d/
ln -sf ../../etc/init.d/cfenvd $RPM_BUILD_ROOT/%{_sbindir}/rccfenvd
ln -sf ../../etc/init.d/cfexecd $RPM_BUILD_ROOT/%{_sbindir}/rccfexecd
ln -sf ../../etc/init.d/cfservd $RPM_BUILD_ROOT/%{_sbindir}/rccfservd
%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf %{buildroot}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Anomalies.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Anomalies.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Reference.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}-Tutorial.info.gz
%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README COPYING TODO inputs/*.example
/usr/sbin/*
%doc %{_mandir}/man?/*
%doc %{_infodir}/*.info*
%attr(0755,root,root) %config /etc/init.d/*
%changelog -n cfengine
* Wed Oct 18 2006 - anicka@suse.cz
- fix array subscript out of range (#211160)
* Thu Sep 21 2006 - anicka@suse.cz
- update to 2.1.21
* copy action now supports this $(this) variable
* PH support removed from cfenvd during code rationalization
* ReturnsZeroShell function added
* Cfenvd code rationalization and channge in database format
* bugfixes
* Fri Jun 16 2006 - schwab@suse.de
- Fix syntax error in configure script.
* Fri May 19 2006 - anicka@suse.cz
- update to 2.1.20:
- various minor bugfixes added
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 05 2006 - anicka@suse.cz
- update to 2.1.17
* Tue Nov 15 2005 - anicka@suse.cz
- update to 2.1.17
- remove CAN-2005-2960 patch (affected file removed by upstream)
* Fri Oct 07 2005 - schwab@suse.de
- Don't strip binaries.
* Wed Oct 05 2005 - anicka@suse.cz
- fix too few arguments to a *printf function
* Tue Oct 04 2005 - anicka@suse.cz
- fix CAN-2005-2960 vulnerability (#120075)
- update to 2.1.16
* Mon Aug 01 2005 - anicka@suse.cz
- update to 2.1.15
* Fri Apr 22 2005 - postadal@suse.cz
- updated to version 2.1.14
* Sun Feb 13 2005 - ro@suse.de
- added libpng to nfb (for tetex)
* Thu Feb 03 2005 - postadal@suse.cz
- updated to version 2.1.13
- added init scripts (cfenvd, cfexecd, cfservd)
* Tue Aug 17 2004 - postadal@suse.cz
- updated to version 2.1.9
* Wed Feb 18 2004 - postadal@suse.cz
- updated to version 2.1.3
- removed obsoleted patch db.dif
- fixed code that broke strict aliasing
* Fri Jan 23 2004 - ro@suse.de
- fix build with current automake
use another method to pass flags to MAKEINFOHTML
* Sat Jan 10 2004 - adrian@suse.de
- build as user
* Wed Aug 06 2003 - postadal@suse.cz
- updated to version 2.0.7p3
- removed obsoleted patch (info.diff)
* Mon May 12 2003 - ro@suse.de
- fix build with db-4.1
- fix compile: chflags function available does not mean
struct stat has st_flags
* Thu Apr 24 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
* Wed Feb 26 2003 - postadal@suse.cz
- used install-info macros
- fixed Anomalies.texinfo (dir entry)
* Tue Sep 17 2002 - ro@suse.de
- removed bogus self-provides
* Wed Jul 31 2002 - postadal@suse.cz
- update to version 2.0.3
* Hpux config changes
* new options
* new list in cfservd.conf
* a lot of fixes
* Fri Nov 23 2001 - cihlar@suse.cz
- added Url:
* Mon Nov 05 2001 - cihlar@suse.cz
- fixed to compile with automake 1.5
* Mon Apr 23 2001 - cihlar@suse.cz
- fixed warnings on ia64
* Tue Mar 06 2001 - cihlar@suse.cz
- update to version 1.6.3
* Mon Oct 30 2000 - cihlar@suse.cz
- update to version 1.6.0.a13
- bzipped sources
* Tue Oct 03 2000 - cihlar@suse.cz
- update to version 1.6.0.a11
* Mon May 15 2000 - cihlar@suse.cz
- Group sorted
- %%{_defaultdocdir} instead of /usr/doc/packages
* Mon Apr 10 2000 - bk@suse.de
- added suse update config macro
* Tue Apr 04 2000 - cihlar@suse.cz
- upgrade to version 1.5.4
- added BuildRoot
* Mon Jan 17 2000 - ro@suse.de
- update to 1.5.3 , man, info to /usr/share
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Wed Sep 01 1999 - ro@suse.de
- update to 1.5.1 / specfile cleanup
* Tue Sep 22 1998 - ro@suse.de
- update to 1.4.12
* Mon Mar 02 1998 - florian@suse.de
- update to release 1.4.10
* Fri Oct 10 1997 - florian@suse.de
- update to release 1.4.8a
* Mon Jul 07 1997 - florian@suse.de
- update to release 1.4.0
* Thu Jan 02 1997 - florian@suse.de
- update to newest version 1.3.16
* Thu Jan 02 1997 - florian@suse.de
- Update auf neue Version 1.3.12.

119
cfenvd Normal file
View File

@ -0,0 +1,119 @@
#! /bin/sh
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# Author: Petr Ostadal, feedback to http://www.suse.de/feedback
#
# /etc/init.d/cfenvd
#
# and its symbolic link
#
# /usr/sbin/rccfenvd
#
### BEGIN INIT INFO
# Provides: cfenvd
# Required-Start: $local_fs
# X-UnitedLinux-Should-Start: $time sendmail
# Required-Stop: $local_fs
# X-UnitedLinux-Should-Stop: $time sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: cfenvd daemon for collecting random events
# Description: Start cfenvd to allow collecting random events,
# which are an excellent source of entropy for random number generation.
# It is used by cfkey program to produce random number from this source
# of randomness.
### END INIT INFO
cfenvd_BIN=/usr/sbin/cfenvd
test -x $cfenvd_BIN || exit 5
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting cfenvd "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
eval startproc $cfenvd_BIN
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down cfenvd "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
killproc -TERM $cfenvd_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload)
exit 3
;;
status)
echo -n "Checking for service cfenvd "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
checkproc $cfenvd_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
;;
esac
rc_exit

118
cfexecd Normal file
View File

@ -0,0 +1,118 @@
#! /bin/sh
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# Author: Petr Ostadal, feedback to http://www.suse.de/feedback
#
# /etc/init.d/cfexecd
#
# and its symbolic link
#
# /usr/sbin/rccfexecd
#
### BEGIN INIT INFO
# Provides: cfexecd
# Required-Start: $local_fs
# X-UnitedLinux-Should-Start: $time sendmail
# Required-Stop: $local_fs
# X-UnitedLinux-Should-Stop: $time sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: cfexecd daemon is a wrapper for local execution of cfagent
# Description: The cfexecd is a wrapper for local execution of cfagent.
# It may be used to capture cfagent output and send it as mail when run
# cron cron, e.g.
### END INIT INFO
cfexecd_BIN=/usr/sbin/cfexecd
test -x $cfexecd_BIN || exit 5
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting cfexecd "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
eval startproc $cfexecd_BIN
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down cfexecd "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
killproc -TERM $cfexecd_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload)
exit 3
;;
status)
echo -n "Checking for service cfexecd "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
checkproc $cfexecd_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
;;
esac
rc_exit

118
cfservd Normal file
View File

@ -0,0 +1,118 @@
#! /bin/sh
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All rights reserved.
#
# Author: Petr Ostadal, feedback to http://www.suse.de/feedback
#
# /etc/init.d/cfservd
#
# and its symbolic link
#
# /usr/sbin/rccfservd
#
### BEGIN INIT INFO
# Provides: cfservd
# Required-Start: $local_fs
# X-UnitedLinux-Should-Start: $time sendmail
# Required-Stop: $local_fs
# X-UnitedLinux-Should-Stop: $time sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: cfservd daemon for starting cfengine remotely
# Description: The cfservd is a file server and protective wrapper for
# starting cfengine remotely. It performs access control based on RSA
# authentication and IP address.
### END INIT INFO
cfservd_BIN=/usr/sbin/cfservd
test -x $cfservd_BIN || exit 5
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting cfservd "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
eval startproc $cfservd_BIN
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down cfservd "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
killproc -TERM $cfservd_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart)
## Do a restart only if the service was active before.
## Note: try-restart is not (yet) part of LSB (as of 1.2)
$0 status >/dev/null && $0 restart
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload)
exit 3
;;
status)
echo -n "Checking for service cfservd "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
checkproc $cfservd_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart}"
exit 1
;;
esac
rc_exit

0
ready Normal file
View File