Re: debian rookie trying to get his bearings...
will == will trillich [EMAIL PROTECTED] writes: will On Sat, Jan 25, 2003 at 11:41:38PM -0800, Paul Johnson will wrote: On Sat, Jan 25, 2003 at 11:45:21AM -0600, Jeffrey L. Taylor wrote: man update-rc.d No, wrong. Just rename the file. update-rc.d is used for script automation. will it's not wrong. in fact it's more likely to result in a will stable situation down the line. will it's more convoluted, something additional to learn, another will syntax to remember... and more consistent. but it's will definitely not wrong. It is certainly not wrong, but I have to say that using update-rc.d to configure your run level is like using a sledgehammer to crack open an egg. For a system administrator who wishes to start/shutdown a service in a run level the 'mv' command is simple, straightforward and consistent. Three properties that update-rc.d cannot claim (except in a package installations script and so on). Now, if the admin used 'rm' instead of 'mv' on the run level S* or K* file they probably do need to read the update-rc.d man page if only to confuse themselves to the point where they might try to understand what is going on ;-) Cheers! Shyamal -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, Jan 25, 2003 at 11:41:38PM -0800, Paul Johnson wrote: On Sat, Jan 25, 2003 at 11:45:21AM -0600, Jeffrey L. Taylor wrote: man update-rc.d No, wrong. Just rename the file. update-rc.d is used for script automation. it's not wrong. in fact it's more likely to result in a stable situation down the line. it's more convoluted, something additional to learn, another syntax to remember... and more consistent. but it's definitely not wrong. -- I use Debian/GNU Linux version 3.0; Linux server 2.4.20-k6 #1 Mon Jan 13 23:49:14 EST 2003 i586 unknown DEBIAN NEWBIE TIP #116 from Karsten M. Self [EMAIL PROTECTED] : Wondering WHICH PACKAGE IS USING UP ALL YOUR DISK SPACE? You can verify a package's installed size with the dpkg -s command: dpkg -s package And the following script will grab all your installed packages and show their installed size, sorted and ranked by size: #!/bin/sh PATH=/bin:/usr/bin time dpkg --get-selections | grep ' install' | awk '{print $1}' | xargs -n 1 dpkg -s | egrep '^(Package|Installed-Size):' | awk '{printf( %s: , $2 ); getline; printf( %s\n, $2 )}' | sort -k2nr | cat -n=20 Also see http://newbieDoc.sourceForge.net/ ... -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, 2003-01-25 at 12:57, Kent West wrote: Ron Johnson wrote: The Unix Way [to disable automatic starting of init scripts] is to rename S20apache to K20apache. That way, you can see what's been explicitly turned off, and you'll know that if it's not in /etc/rc2.d/ then it hasn't been installed. Remeber to also rename /etc/rc6.d/K??apache !!! How about renaming S20apache to NOS20apache? This way, you can see at a glance which scripts are start scripts, which are kill scripts, and which are scripts that have been disabled by the sysadmin, as opposed to wondering which of the K scripts were made that way by the system' and which were made that way by the sysadmin. It also might save a few nano-seconds during boot-up as the NO scripts don't have to be parsed as do the K scripts. That's just as valid. Really, it doesn't matter what you rename them to, since the startup only looks at S*. Me, I prefer renaming things to, for example __S20foobar. (I don't do it The Unix Way... So sue me! grin) -- +---+ | Ron Johnson, Jr.mailto:[EMAIL PROTECTED] | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | Fear the Penguin!! | +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, 2003-01-25 at 20:29, Bob Proulx wrote: Kent West wrote: Jeff Hahn wrote: I'm setting up a test debian server (contemplating a move of several redhat boxes) [snip] Every Redhat user asks about chkconfig. Having used Redhat myself I always needed to edit the init.d script, set the run level, save, run chkconfig to create the symlinks, then invoke the script when installing a new package. But on Debian none of that is needed. Not needing to run chkconfig has left many people stymied. How do you install the symlinks? You don't need to because by default they are installed automatically. Note, though, a mid-sized gotcha: all (well, almost all) the symlinks in /etc/rc2.d will be S20blah. This is because the package maintainer doesn't know where in the boot sequence that *you* want the app to run. Thus, you'll have to mv S20foo to whatever number you want... [snip] -- +---+ | Ron Johnson, Jr.mailto:[EMAIL PROTECTED] | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | Fear the Penguin!! | +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, 25 Jan 2003, Kent West wrote: How about renaming S20apache to NOS20apache? This way, you can see at a glance which scripts are start scripts, which are kill scripts, and which are scripts that have been disabled by the sysadmin, as opposed to wondering which of the K scripts were made that way by the system' and which were made that way by the sysadmin. Hey, thanks to everyone for all the prompt replies. I was just making sure there wasn't an official method. I'll try the mv S20.. NOS20.. for now. Thanks a bunch. -Jeff -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Kent == Kent West [EMAIL PROTECTED] writes: Kent Ron Johnson wrote: The Unix Way [to disable automatic starting of init scripts] is to rename S20apache to K20apache. That way, you can see what's been explicitly turned off, and you'll know that if it's not in /etc/rc2.d/ then it hasn't been installed. Remeber to also rename /etc/rc6.d/K??apache !!! Kent How about renaming S20apache to NOS20apache? This way, you Kent can see at a glance which scripts are start scripts, which Kent are kill scripts, and which are scripts that have been Kent disabled by the sysadmin This is not technically correct, because if you switch between runlevels you will find that apache will not start and stop correctly. Unless of course you want to do this at every multiuser level (in which case Apache never starts). The whole idea of having different run levels was to provide different levels of service. So, for example, you could use a run level on a web server to run apache, and have a multi-user 'maintenance' run level where apache is stopped but everything else works. The most common example of this is to have a run level with X running and one without X running. Cheers! Shyamal -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Shyamal Prasad wrote: There is a common misconception that files in /etc/rc?.d/ must only be handled via update-rc.d. I'm not sure where that comes from but a *lot* of people make that assumption. It is a requirement for package postinst scripts, not for users. But for package scripts they are only allowed to install symlinks using update-rc.d by policy. http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit 10.3.3.1 Managing the links But again, that applies to packages and not to users. Bob msg26433/pgp0.pgp Description: PGP signature
Re: debian rookie trying to get his bearings...
On Sat, 25 Jan 2003, Shyamal Prasad wrote: David == David Z Maze David writes: David Jeff Hahn [EMAIL PROTECTED] writes: I'm setting up a test debian server (contemplating a move of several redhat boxes) One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? David Probably the easiest way is to 'rm /etc/rc2.d/S20apache', David etc. as root. IMHO this is almost the Debian Way to do this. I would actually suggest 'mv /etc/rc2.d/S20apache /etc/rc2.d/K20apache' and so on for each service you want to shutdown in runlevel 2. Have a look in rc2.d and rc6.d, you will notice that some services have Ssmallnum and Kbignum or the reverse situation. It may not be a good idea to just change the S to a K to disable those services. The most Debian way to do it is via update-rc.d, the easiest way is to just rm the entry. The best way (imo) is to use rm, but leave one of the low numbered runlevels (2-5) and rc6.d untouched... so you can always see at a glance what the default sequencing is for both bringing up and taking down installed services. Remember, you can also setup rc{7,8,9}.d, which will not be touched by automated runs of Debian tools. - Bruce -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
debian rookie trying to get his bearings...
I'm setting up a test debian server (contemplating a move of several redhat boxes) I'm having a few problems dealing with the distribution differences. I assume I'll be able to work those out. One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? In RedHat, this is done with chkconfig. I've got a number of services installed that aren't configured and I certainly don't want them running at startup. If I see that blankety-blank GDM login on bootup again, I'll . Thanks a bunch for any help... -Jeff -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Jeff Hahn [EMAIL PROTECTED] writes: I'm setting up a test debian server (contemplating a move of several redhat boxes) One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? Probably the easiest way is to 'rm /etc/rc2.d/S20apache', etc. as root. There's also an update-rc.d utility which is sort of akin to chkconfig, but it's mostly used by install scripts. A warning: don't delete *all* of the /etc/rc?.d/*foo links, because then on upgrade update-rc.d will decide that the package has never been installed and reinstall the links and start the server under you. If I see that blankety-blank GDM login on bootup again, I'll . Of course, if you have a service that you never intend to use at all, you can very easily remove it. (dpkg --remove gdm) -- David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/ Theoretical politics is interesting. Politicking should be illegal. -- Abra Mitchell -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
man update-rc.d Quoting Jeff Hahn [EMAIL PROTECTED]: I'm setting up a test debian server (contemplating a move of several redhat boxes) I'm having a few problems dealing with the distribution differences. I assume I'll be able to work those out. One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? In RedHat, this is done with chkconfig. I've got a number of services installed that aren't configured and I certainly don't want them running at startup. If I see that blankety-blank GDM login on bootup again, I'll . Thanks a bunch for any help... -Jeff -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, Jan 25, 2003 at 08:09:29AM -0600, Jeff Hahn wrote: One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? In RedHat, this is done with chkconfig. I've got a number of services installed that aren't configured and I certainly don't want them running at startup. Try using update-rc.d. You can also do some manual modifications in /etc/rc* -- Seneca [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Jeff Hahn wrote: I'm setting up a test debian server (contemplating a move of several redhat boxes) I'm having a few problems dealing with the distribution differences. I assume I'll be able to work those out. One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? In RedHat, this is done with chkconfig. I've got a number of services installed that aren't configured and I certainly don't want them running at startup. If I see that blankety-blank GDM login on bootup again, I'll . Thanks a bunch for any help... -Jeff The official answer is update-rc.d (see man update-rc.d)but there are several ways of reaching your goal, such as manually renaming/moving/deleting the script in /etc/init.d that starts your service or renaming/moving/deleting those symlinks in /etc/rc[runlevel].d that link to that script (which is what update-rc.d essentially does), or addding exit 0 as the first executable line in the script. This is for those services that run as daemons. If you have any that run from inetd, you'll need to edit /etc/inetd.conf (the appropriate tool for that is update-inetd). There are exceptions; for example, to not run the sshd server, you need a file named /etc/ssh/sshd_not_to_be_run; the proper way to change this is to run dpkg-reconfigure ssh. And I think session managers like gdm are controlled with update-alternatives, but I just put an exit 0 at the start of /etc/init.d/gdm to temporarily disable it. Kent -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
David == David Z Maze David writes: David Jeff Hahn [EMAIL PROTECTED] writes: I'm setting up a test debian server (contemplating a move of several redhat boxes) One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? David Probably the easiest way is to 'rm /etc/rc2.d/S20apache', David etc. as root. IMHO this is almost the Debian Way to do this. I would actually suggest 'mv /etc/rc2.d/S20apache /etc/rc2.d/K20apache' and so on for each service you want to shutdown in runlevel 2. Cheers! Shyamal -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Kent West wrote: Jeff Hahn wrote: I'm setting up a test debian server (contemplating a move of several redhat boxes) There are many differences. In many ways you will find it frustrating because some details being different will take some time to figure out. But let me encourage you to hang in there and have patience because the trip is worth it. Since you mention servers in particular let me say this is one area where Debian excels. I'm having a few problems dealing with the distribution differences. I assume I'll be able to work those out. Don't get too frustrated. Ask questions on this list if you get stuck. Be specific and people will do their best to help you. One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? In RedHat, this is done with chkconfig. I've got a number of services installed that aren't configured and I certainly don't want them running at startup. Every Redhat user asks about chkconfig. Having used Redhat myself I always needed to edit the init.d script, set the run level, save, run chkconfig to create the symlinks, then invoke the script when installing a new package. But on Debian none of that is needed. Not needing to run chkconfig has left many people stymied. How do you install the symlinks? You don't need to because by default they are installed automatically. Your question is different because you are asking how do you prevent the service from running. That *may* be by not installing the symlink. But I am not convinced yet. If you could post more details about how you are trying to operate I am sure that the list could help more. If I see that blankety-blank GDM login on bootup again, I'll . But you installed it! If you do not want to see it then why install it? (He says looking about innocently. I know, you are just getting ready to release it and want it installed but not yet enabled.) Edit /etc/X11/default-display-manager and set the line to something which does not exist. The init.d scripts look there and if the name matches then they run. If you make them not match then it will be disabled but otherwise installed. Put that back when you are ready to enable it. I personally do not install the daemons that I don't want to run until I am ready to run them. Therefore I hold off installing KDM until I am ready to run KDM. When I am doing a manual installation I usually go through these steps. * Install a minimul system. I avoid both tasksel and delect. * apt-get install rsync * rsync over a bootstrap script * Run script to copy all of the preconfigured /etc files such as gpm.conf and XF86Config and so on. * Now that everything is preconfigured I install a meta package of my own making. It depends upon what I want installed. At this point you could run tasksel if you desired. This pulls in the rest of the system. Being preconfigured most things do not need to ask any questions. Some do however. Those are bugs to be filed. :-) What services are you installing that you do not want to run? Can't you hold off installing them until you want them to run and install them then? For example, if you wanted a web server running apache but did not want it to run until you had the content installed and ready go to, couldn't you install the content first? A few concrete examples would do wonders for the understanding here. The official answer is update-rc.d (see man update-rc.d)but there are several ways of reaching your goal, such as manually In this case I think the real answer lies in invoke-rc.d which is how packages are supposed to start up services. I believe that update-rc.d is more for package post install scripts to install their own symlinks. You can mess with those yourself. But then you have to remember to put everything back too. Better not to need to munge them. See the Debian Policy manual section 10.3.3.2 Running initscripts for details of invoke-rc.d. Right now invoke-rc.d is only strongly recommended so not all packages use it. But it will be manditory in the future. That whole section is what you need to read. Bob msg26274/pgp0.pgp Description: PGP signature
Re: debian rookie trying to get his bearings...
On Sat, 2003-01-25 at 18:24, Shyamal Prasad wrote: David == David Z Maze David writes: David Jeff Hahn [EMAIL PROTECTED] writes: I'm setting up a test debian server (contemplating a move of several redhat boxes) One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? David Probably the easiest way is to 'rm /etc/rc2.d/S20apache', David etc. as root. IMHO this is almost the Debian Way to do this. I would actually suggest 'mv /etc/rc2.d/S20apache /etc/rc2.d/K20apache' and so on for each service you want to shutdown in runlevel 2. The Unix Way is to rename S20apache to K20apache. That way, you can see what's been explicitly turned off, and you'll know that if it's not in /etc/rc2.d/ then it hasn't been installed. Remeber to also rename /etc/rc6.d/K??apache !!! -- +---+ | Ron Johnson, Jr.mailto:[EMAIL PROTECTED] | | Jefferson, LA USA http://members.cox.net/ron.l.johnson | | | | Fear the Penguin!! | +---+ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, Jan 25, 2003 at 08:09:29AM -0600, Jeff Hahn wrote: One quick question to get me going a little better... How do you install services (apache, samba, whatever) and NOT have them start on system startup? Go into /etc/rc?.d/ (where ? is a number, 2 is the default runlevel) and look around. You probably can figure out what each service each file belongs to, however, the numbers and the capital letter may be confusing. The numbers in the filenames indicate the order of which the commands are executed. The capital letter represents whether that service will be (S)tarted or (K)illed when switching to that runlevel, if they're not already in the state they'll be changed to. To make gdm not start on boot, you can either try purging it, or rename /etc/rc2.d/S99gdm to /etc/rc2.d/K99gdm -- .''`. Baloo [EMAIL PROTECTED] : :' :proud Debian admin and user `. `'` `- Debian - when you have better things to do than to fix a system msg26292/pgp0.pgp Description: PGP signature
Re: debian rookie trying to get his bearings...
Ron == Ron Johnson [EMAIL PROTECTED] writes: Ron On Sat, 2003-01-25 at 18:24, Shyamal Prasad wrote: David == David Z Maze David writes: David Probably the easiest way is to 'rm /etc/rc2.d/S20apache', David etc. as root. IMHO this is almost the Debian Way to do this. I would actually suggest 'mv /etc/rc2.d/S20apache /etc/rc2.d/K20apache' and so on for each service you want to shutdown in runlevel 2. Ron The Unix Way is to rename S20apache to K20apache. That way, Yes, that is certainly the Unix Way (and the Right Way (tm)). I was being too subtle for my own good: by using the term Debian Way I actually wanted to say do not use update-rc.d to remove or modify the links, just mv (rename) the files. There is a common misconception that files in /etc/rc?.d/ must only be handled via update-rc.d. I'm not sure where that comes from but a *lot* of people make that assumption. Cheers! Shyamal -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
Ron Johnson wrote: The Unix Way [to disable automatic starting of init scripts] is to rename S20apache to K20apache. That way, you can see what's been explicitly turned off, and you'll know that if it's not in /etc/rc2.d/ then it hasn't been installed. Remeber to also rename /etc/rc6.d/K??apache !!! How about renaming S20apache to NOS20apache? This way, you can see at a glance which scripts are start scripts, which are kill scripts, and which are scripts that have been disabled by the sysadmin, as opposed to wondering which of the K scripts were made that way by the system' and which were made that way by the sysadmin. It also might save a few nano-seconds during boot-up as the NO scripts don't have to be parsed as do the K scripts. Kent -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: debian rookie trying to get his bearings...
On Sat, Jan 25, 2003 at 11:45:21AM -0600, Jeffrey L. Taylor wrote: man update-rc.d No, wrong. Just rename the file. update-rc.d is used for script automation. -- .''`. Baloo [EMAIL PROTECTED] : :' :proud Debian admin and user `. `'` `- Debian - when you have better things to do than to fix a system msg26320/pgp0.pgp Description: PGP signature