Re: managing /etc/rc?.d

2001-08-30 Thread Colin Watson
On Wed, Aug 29, 2001 at 10:03:35PM -0500, ktb wrote:
 On Thu, Aug 30, 2001 at 04:03:47AM +0200, Martin F Krafft wrote:
  despite wonderful packages like file-rc, the /etc/rc?.d structure is
  damn difficult to maintain, is it not? in fact, here is the only tool
  that i miss from my redhat days - some text-oriented tool which let
  you specify the order and runlevels of each of the scripts in
  /etc/init.d. is there something like that?
  
  how do you guys manage these?
 
 I created the attached script to manage rc*d.  It is a little rough as it 
 is my first write but it works for my needs at the moment.

Er! Surely that's just a clone of update-rc.d?

-- 
Colin Watson  [EMAIL PROTECTED]



Re: managing /etc/rc?.d

2001-08-30 Thread ktb
On Thu, Aug 30, 2001 at 03:54:02AM -0500, Colin Watson wrote:
 On Wed, Aug 29, 2001 at 10:03:35PM -0500, ktb wrote:
  On Thu, Aug 30, 2001 at 04:03:47AM +0200, Martin F Krafft wrote:
   despite wonderful packages like file-rc, the /etc/rc?.d structure is
   damn difficult to maintain, is it not? in fact, here is the only tool
   that i miss from my redhat days - some text-oriented tool which let
   you specify the order and runlevels of each of the scripts in
   /etc/init.d. is there something like that?
   
   how do you guys manage these?
  
  I created the attached script to manage rc*d.  It is a little rough as it 
  is my first write but it works for my needs at the moment.
 
 Er! Surely that's just a clone of update-rc.d?
 

Your making a joke right?  I've never looked at the source for
update-rc.d.  Have no idea what it is written in.  Hmmm, just looked and
it's written in Perl.  I created it to manage an LFS system.  Even if
it was a clone as you say, what difference would it make?  It's what I
use to manage my links to /etc/init.d, which was what the original
poster requested. 
kent

 



Re: managing /etc/rc?.d

2001-08-30 Thread Colin Watson
On Thu, Aug 30, 2001 at 07:26:57AM -0500, ktb wrote:
 On Thu, Aug 30, 2001 at 03:54:02AM -0500, Colin Watson wrote:
  On Wed, Aug 29, 2001 at 10:03:35PM -0500, ktb wrote:
   I created the attached script to manage rc*d.  It is a little rough as it 
   is my first write but it works for my needs at the moment.
  
  Er! Surely that's just a clone of update-rc.d?
 
 Your making a joke right?  I've never looked at the source for
 update-rc.d.  Have no idea what it is written in.  Hmmm, just looked and
 it's written in Perl.  I created it to manage an LFS system.  Even if
 it was a clone as you say, what difference would it make?  It's what I
 use to manage my links to /etc/init.d, which was what the original
 poster requested. 

I wasn't accusing you of copying it; I was wondering why you didn't just
use update-rc.d instead, since it seems to do everything you need and
comes with Debian ...

-- 
Colin Watson  [EMAIL PROTECTED]



Re: managing /etc/rc?.d

2001-08-30 Thread ktb
On Thu, Aug 30, 2001 at 09:28:41AM -0500, Colin Watson wrote:
 On Thu, Aug 30, 2001 at 07:26:57AM -0500, ktb wrote:
  On Thu, Aug 30, 2001 at 03:54:02AM -0500, Colin Watson wrote:
   On Wed, Aug 29, 2001 at 10:03:35PM -0500, ktb wrote:
I created the attached script to manage rc*d.  It is a little rough as 
it 
is my first write but it works for my needs at the moment.
   
   Er! Surely that's just a clone of update-rc.d?
  
  Your making a joke right?  I've never looked at the source for
  update-rc.d.  Have no idea what it is written in.  Hmmm, just looked and
  it's written in Perl.  I created it to manage an LFS system.  Even if
  it was a clone as you say, what difference would it make?  It's what I
  use to manage my links to /etc/init.d, which was what the original
  poster requested. 
 
 I wasn't accusing you of copying it; I was wondering why you didn't just
 use update-rc.d instead, since it seems to do everything you need and
 comes with Debian ...

That's a relief:)  Actually I created it to use on a non-debian system.
After having looked and realized that update-rc.d is a Perl script, I
could have copied it over to my other system but I didn't know that at
the time.  The original poster wasn't satisfied with update-rc.d so I
just posted what I used as requested, in the hopes it would help out.
kent




managing /etc/rc?.d

2001-08-29 Thread Martin F Krafft
folks,
despite wonderful packages like file-rc, the /etc/rc?.d structure is
damn difficult to maintain, is it not? in fact, here is the only tool
that i miss from my redhat days - some text-oriented tool which let
you specify the order and runlevels of each of the scripts in
/etc/init.d. is there something like that?

how do you guys manage these?

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^.*|tr * mailto:; [EMAIL PROTECTED]
-- 
it usually takes more than three weeks
 to prepare a good impromptu speech.
 -- mark twain



Re: managing /etc/rc?.d

2001-08-29 Thread Anthony J. Breeds-Taurima
On Thu, 30 Aug 2001, Martin F Krafft wrote:

 folks,
 despite wonderful packages like file-rc, the /etc/rc?.d structure is
 damn difficult to maintain, is it not? in fact, here is the only tool
 that i miss from my redhat days - some text-oriented tool which let
 you specify the order and runlevels of each of the scripts in
 /etc/init.d. is there something like that?

Sorry about the brevity of this but:
man update-rc.d

should help

Yours Tony.

/*
 * The significant problems we face cannot be solved at the
 * same level of thinking we were at when we created them.
 * --Albert Einstein
 */



Re: managing /etc/rc?.d

2001-08-29 Thread Martin F Krafft
also sprach Anthony J. Breeds-Taurima (on Thu, 30 Aug 2001 10:17:05AM +0800):
 Sorry about the brevity of this but:
 man update-rc.d

thanks, i know about that one, but i don't find it too intuitive to
use. especially since i can't see things side by side which helps a
lot with runlevels, i find...

martin;  (greetings from the heart of the sun.)
  \ echo mailto: !#^.*|tr * mailto:; [EMAIL PROTECTED]
-- 
non sposarti. trova una donna che odi e comprale una casa.


pgpAyE6VkzQQ6.pgp
Description: PGP signature


Re: managing /etc/rc?.d

2001-08-29 Thread ktb
On Thu, Aug 30, 2001 at 04:03:47AM +0200, Martin F Krafft wrote:
 folks,
 despite wonderful packages like file-rc, the /etc/rc?.d structure is
 damn difficult to maintain, is it not? in fact, here is the only tool
 that i miss from my redhat days - some text-oriented tool which let
 you specify the order and runlevels of each of the scripts in
 /etc/init.d. is there something like that?
 
 how do you guys manage these?

I created the attached script to manage rc*d.  It is a little rough as it 
is my first write but it works for my needs at the moment.
kent

 
#! /bin/sh
# update-rc
# used to update links in rc*.d directories
# ktb

script=$2
link=$3
link_remove=$2


case $1 in
create_all)
for i in /etc/rc{2,3,4,5}.d; do
  ln -sv /etc/init.d/$script $i/S$link
done

  echo 
 
for i in /etc/rc{0,1,6}.d; do
  ln -sv /etc/init.d/$script $i/K$link
done
;;

createS)
for i in /etc/rc{2,3,4,5}.d; do
ln -sv /etc/init.d/$script $i/S$link
done 
;;

remove)
for i in /etc/rc{0,1,2,3,4,5,6}.d; do
rm -v $i/$link_remove
done
;;

createK)
for i in /etc/rc{0,1,6}.d; do
ln -sv /etc/init.d/$script $i/K$link
done
;;

--help)
echo Usage: $0  (create_all) script_name NNNlink_to_script
echo Usage: $0  (createS|createK) script_name NNNlink_to_script
echo Usage: $0 (remove) [*]link_to_script
exit 1
;;

*)
echo Usage: $0  (create_all) script_name NNNlink_to_script
echo Usage: $0  ([createS|createK]) script_name NNNlink_to_script
echo Usage: $0 (remove) [*]link_to_script
exit 1
;;
esac
exit 0