service is a convenience, but as for chkconfig:

"There should be a tool available to the user (e.g., RedHat's chkconfig) which can be used by the system administrator to easily manipulate at which init levels a particular init.d script is started or stopped. " - from http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/initsrcinstrm.html

Jason

At 07:14 PM 3/5/2003 -0500, Jeff Squyres wrote:
I thought that one of the tenets of the LSB was not to use commands like
chkconfig and service anymore -- to directly invoke /etc/init.d/foo, and
add/remove sym links directly in /etc/rcX.d...?


On Wed, 5 Mar 2003, Jason Brechin wrote:


> Update of /cvsroot/oscar/oscar/packages/ntpconfig/scripts
> In directory sc8-pr-cvs1:/tmp/cvs-serv32231
>
> Modified Files:
> post_server_install
> Log Message:
> Adding SuSE support for when the SuSE xntp can be installed with a different rpmlist
>
>
> Index: post_server_install
> ===================================================================
> RCS file: /cvsroot/oscar/oscar/packages/ntpconfig/scripts/post_server_install,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -C2 -r1.4 -r1.5
> *** post_server_install 2 Dec 2002 20:39:48 -0000 1.4
> --- post_server_install 6 Mar 2003 00:06:44 -0000 1.5
> ***************
> *** 278,282 ****
> sub changeNtpdStartup
> {
> ! open(NTPD,"+< /etc/init.d/ntpd") or return;
> my $out = '';
> while (<NTPD>)
> --- 278,282 ----
> sub changeNtpdStartup
> {
> ! open(NTPD,"+< /etc/init.d/$ntpd") or return;
> my $out = '';
> while (<NTPD>)
> ***************
> *** 304,317 ****
> die "ERROR: You must be 'root' to run this script. Aborting" if ($< != 0);
>
> # Make sure that the 'ntp' package is installed, at least version 4
> ! open(CMD,'rpm -q ntp |');
> my $cmd_output = <CMD>;
> close CMD;
>
> ! die "ERROR: ntp package is not installed. Aborting" if
> (length($cmd_output) <= 0);
>
> ! $cmd_output =~ /^ntp-(\d+)/;
> ! die "ERROR: ntp package is not at least version 4. Aborting" if ($1 < 4);
>
> # Set the list of ntp servers
> --- 304,324 ----
> die "ERROR: You must be 'root' to run this script. Aborting" if ($< != 0);
>
> + #Check distro and set ntp name accordingly
> + my $ntp = "ntp";
> + if (-e "/etc/SuSE-release") {
> + $ntp = "xntp";
> + }
> + my $ntpd = $ntp . 'd';
> +
> # Make sure that the 'ntp' package is installed, at least version 4
> ! open(CMD,"rpm -q $ntp |");
> my $cmd_output = <CMD>;
> close CMD;
>
> ! die "ERROR: $ntp package is not installed. Aborting" if
> (length($cmd_output) <= 0);
>
> ! $cmd_output =~ /$ntp-(\d+)/;
> ! die "ERROR: $ntp package is not at least version 4. Aborting" if ($1 < 4);
>
> # Set the list of ntp servers
> ***************
> *** 326,341 ****
>
> # Make sure the symlinks for ntpd in /etc/rc.d/init.d exist
> ! system("/sbin/chkconfig --add ntpd");
>
> # Depending on the presence/absence of the "--disable" flag, stop/start ntpd
> if (defined($opt_disable))
> {
> ! system("/sbin/service ntpd stop");
> ! system("/sbin/chkconfig --level 2345 ntpd off");
> }
> else
> {
> ! system("/sbin/service ntpd restart");
> ! system("/sbin/chkconfig --level 2345 ntpd on");
> }
>
> --- 333,348 ----
>
> # Make sure the symlinks for ntpd in /etc/rc.d/init.d exist
> ! system("/sbin/chkconfig --add $ntpd");
>
> # Depending on the presence/absence of the "--disable" flag, stop/start ntpd
> if (defined($opt_disable))
> {
> ! system("/sbin/service $ntpd stop");
> ! system("/sbin/chkconfig --level 2345 $ntpd off");
> }
> else
> {
> ! system("/sbin/service $ntpd restart");
> ! system("/sbin/chkconfig --level 2345 $ntpd on");
> }
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
> for complex code. Debugging C/C++ programs can leave you feeling lost and
> disoriented. TotalView can help you find your way. Available on major UNIX
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Oscar-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/oscar-checkins
>


--
{+} Jeff Squyres
{+} [EMAIL PROTECTED]
{+} http://www.lam-mpi.org/


------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ Oscar-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/oscar-devel



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Oscar-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to