|
From: Heiko Z. <hz...@pr...> - 2003-10-10 16:51:02
|
On 10/10/2003 10:57:30 AM Bruce Smith wrote: >I'm building a server out of Linux for the first time. >What's the best way to mount a local hard drive on DL? >I can't just add a entry for the HDD in fstab to mount >it under /var since /var gets mounted elsewhere, can I? http://www.devil-linux.org/newdoc/ch01s04.html Everything is prepared to use LVM and pre-defined mount points. I use it since we have that functionality and it works just great ! >Speaking of custom things like this, someone ask about >a "rc.local" where a user could put their own commands >to be run on boot. This sounds like a good idea to me. >(beats putting commands in my firewall.rules scripts >like I've been doing :) > >Is a "rc.local" the place for the mounting a HDD at /var ? As Diego wrote in his email, just add *your* custom script. Take /etc/init.d/skeleton as the base. cya Heiko = |
|
From: Heiko Z. <hz...@pr...> - 2003-10-10 18:31:56
|
On 10/10/2003 02:02:16 PM Bruce Smith wrote: >> > I recommend we add a empty "/etc/init.d/rc.local" file that gets r= un >> > at the end of all the startup scripts. (or one before the end, if= >> > grsecurity has to be the very last one) Do you care if I add it? >> >> I would not do it because it is not Linux Standard Base. > >But Redhat does it!!! ;-) Since it's not the first time this "feature" is requested, I would add = it. Doesn't hurt... (except Friedrich) >And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html I guess we have to do it like M$, we just have to change the standards = to the way we do it. >(OK, I'll shut up about it now ... :) yeah do it ! ;-) cya Heiko = |
|
From: Bruce S. <bw...@ar...> - 2003-10-10 18:53:38
|
> Since it's not the first time this "feature" is requested, I would add it. Cool, I'll add it. > Doesn't hurt... (except Friedrich) He's a pain. ;-) > >And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html I tried the LVM method and found a couple errors in the documentation. First you cannot use the "link" (i.e /dev/hdb1) in the LVM commands with devfs, you have to use the full/LONG device file name. Typo: your "lvcreate" example needs a space before the "-n". Other than that, it works great! :-) - BS |
|
From: Friedrich L. <fl...@fl...> - 2003-10-10 19:05:25
|
Bruce Smith wrote: >>Doesn't hurt... (except Friedrich) > > He's a pain. ;-) Someone has to be the bad guy ;-) It rellay hurts if we add stuff just for lacy people. If they can't write a start script so be it - RTFM. -- MfG / Regards Friedrich Lobenstock ____________________________________________________________________ Friedrich Lobenstock Linux Services Lobenstock URL: http://www.lsl.at/ Email: fl...@fl... ____________________________________________________________________ |
|
From: Bruce S. <bw...@ar...> - 2003-10-10 19:16:57
|
> >>Doesn't hurt... (except Friedrich) > > > > He's a pain. ;-) > > Someone has to be the bad guy ;-) > > It rellay hurts if we add stuff just for lacy people. If they can't > write a start script so be it - RTFM. If I was going to run a real service/daemon, then sure, I'd create a script. But sometimes start scripts don't apply, IMO. Suppose I just want to run a simple command, like delete a file. There is no service to "start" or "stop", as the skeleton script reads. It's really handy just to have a script for miscellaneous commands. Call it "lazy" (or lacy :) if you want. I've been called worse. :-) - BS |
|
From: Friedrich L. <fl...@fl...> - 2003-10-10 21:39:55
|
Bruce Smith wrote: > If I was going to run a real service/daemon, then sure, I'd create a > script. But sometimes start scripts don't apply, IMO. > > Suppose I just want to run a simple command, like delete a file. > There is no service to "start" or "stop", as the skeleton script reads. Then create an init script called "cleanup" or whatever you want to call it. According to http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/iniscrptact.html your script then can eg. return the exitcode 3 - unimplemented feature if someone calls it with the option "stop". And in the head of the script between "### BEGIN INIT INFO" and "### END INIT INFO" just leave "Default-Stop:" empty. http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/initscrcomconv.html Nice and clean. And you even can have dependences and running insserv will take care that everything is in the right order. Now if you want to do some cleanup at shutdown to then just implement the stop, add the runlevel you want it to do the cleanup in "Default-Stop:" and you are done. > It's really handy just to have a script for miscellaneous commands. But where do you call this rc.local script then? Always at the end? If someone wants to do something not always at the end, what do we gona tell him? I'd rather tell everybody the same - no exceptions. I know this might be some more work to do when you want to accomplish some little task but I think it pays of later. -- MfG / Regards Friedrich Lobenstock ____________________________________________________________________ Friedrich Lobenstock Linux Services Lobenstock URL: http://www.lsl.at/ Email: fl...@fl... ____________________________________________________________________ |
|
From: Diego T. <dt...@co...> - 2003-10-12 18:24:43
|
On Fri, Oct 10, 2003 at 03:16:55PM -0400, Bruce Smith wrote: > Suppose I just want to run a simple command, like delete a file. > There is no service to "start" or "stop", as the skeleton script reads. > > It's really handy just to have a script for miscellaneous commands. > Call it "lazy" (or lacy :) if you want. I've been called worse. :-) for the archives... what file do you want to delete when booting a devil-linux system? :) -- -- gnupg keyfingerprint -- 48AF 5BF9 8F54 2966 64CC 2327 7CD0 DD91 B09D 5799 -- Use of a keyboard or mouse may be linked to serious injuries or disorders. Diego Torres - dt...@co... - Madrid / España |
|
From: Bruce S. <bw...@ar...> - 2003-10-12 20:41:08
|
> > Suppose I just want to run a simple command, like delete a file. > > There is no service to "start" or "stop", as the skeleton script reads. > > > > It's really handy just to have a script for miscellaneous commands. > > Call it "lazy" (or lacy :) if you want. I've been called worse. :-) > > for the archives... what file do you want to delete when booting a > devil-linux system? :) Well ... that was only as example (from my Redhat system). :-) One simple command I do want to run upon boot on my DL box is: setterm -blank ...... Another is: noip -c /etc/noip.cfg Yeah, I know, "noip" a service and should have it's own script. But being in a hurry, I stuck them at the end of my firewall script. Me bad ... :-) I suppose someone should create a real start/stop script for noip. Would that be considered a bug fix for 1.0, or a new 1.1 feature? - BS |
|
From: Heiko Z. <he...@zu...> - 2003-10-12 21:01:23
|
Bruce Smith wrote: >>>Suppose I just want to run a simple command, like delete a file. >>>There is no service to "start" or "stop", as the skeleton script reads. >>> >>>It's really handy just to have a script for miscellaneous commands. >>>Call it "lazy" (or lacy :) if you want. I've been called worse. :-) >>> >>> >>for the archives... what file do you want to delete when booting a >>devil-linux system? :) >> >> > >Well ... that was only as example (from my Redhat system). :-) > >One simple command I do want to run upon boot on my DL box is: > > setterm -blank ...... > >Another is: > > noip -c /etc/noip.cfg > >Yeah, I know, "noip" a service and should have it's own script. >But being in a hurry, I stuck them at the end of my firewall script. >Me bad ... :-) > Laaaaaazy assssss..... > >I suppose someone should create a real start/stop script for noip. >Would that be considered a bug fix for 1.0, or a new 1.1 feature? > > new feature ;-) I'm currently building RC-2 cya Heiko |
|
From: Heiko Z. <he...@zu...> - 2003-10-10 22:00:21
|
Bruce Smith wrote: >>>And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html >>> >>> > >I tried the LVM method and found a couple errors in the documentation. > >First you cannot use the "link" (i.e /dev/hdb1) in the LVM commands >with devfs, you have to use the full/LONG device file name. > >Typo: your "lvcreate" example needs a space before the "-n". > > Ok both are fixed. >Other than that, it works great! :-) > > cool ! cya Heiko |
|
From: Heiko Z. <hz...@pr...> - 2003-10-10 20:03:08
|
On 10/10/2003 03:03:12 PM Friedrich Lobenstock wrote: >Bruce Smith wrote: >>>Doesn't hurt... (except Friedrich) >> >> He's a pain. ;-) > >Someone has to be the bad guy ;-) > >It rellay hurts if we add stuff just for lacy people. If they can't >write a start script so be it - RTFM. The problem is...Friedrich has a point.... Heiko = |
|
From: Heiko Z. <hz...@pr...> - 2003-10-10 20:04:36
|
On 10/10/2003 02:50:50 PM Bruce Smith wrote: >> Since it's not the first time this "feature" is requested, I would >add it. > >Cool, I'll add it. > >> Doesn't hurt... (except Friedrich) > >He's a pain. ;-) > >> >And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html > >I tried the LVM method and found a couple errors in the documentation.= > >First you cannot use the "link" (i.e /dev/hdb1) in the LVM commands >with devfs, you have to use the full/LONG device file name. > >Typo: your "lvcreate" example needs a space before the "-n". > >Other than that, it works great! :-) I'll take a look at that stuff tonight. I'm going to shutdown my computer now and check out if Blockbuster has = some entertainment for later tonight. ;-) cya Heiko = |
|
From: Bruce S. <bw...@ar...> - 2003-10-10 17:10:34
|
> >I'm building a server out of Linux for the first time. > >What's the best way to mount a local hard drive on DL? > >I can't just add a entry for the HDD in fstab to mount > >it under /var since /var gets mounted elsewhere, can I? > > http://www.devil-linux.org/newdoc/ch01s04.html > Everything is prepared to use LVM and pre-defined mount points. Before reading this email, I tried the following: fdisk /dev/hdb mkreiserfs /dev/hdb1 mount /dev/hdb1 /mnt cd /mnt ; tar xjpf /config/var.tar.bz2 mv var/* . ; rmdir var echo "/dev/hdb1 /var reiserfs rw 0 0" >> /etc/fstab cd; umount /mnt shutdown -r 0 And it worked! I wasn't sure it would work since /var is a symlink, but that didn't matter. It mounted my HDD in /shm/var and works fine! > >Speaking of custom things like this, someone ask about > >a "rc.local" where a user could put their own commands > >to be run on boot. This sounds like a good idea to me. > >(beats putting commands in my firewall.rules scripts > >like I've been doing :) > > > >Is a "rc.local" the place for the mounting a HDD at /var ? > > As Diego wrote in his email, just add *your* custom script. > Take /etc/init.d/skeleton as the base. Yeah, but that's a pain, just to add a boot command or two. I recommend we add a empty "/etc/init.d/rc.local" file that gets run at the end of all the startup scripts. (or one before the end, if grsecurity has to be the very last one) Do you care if I add it? - BS |
|
From: Friedrich L. <fl...@fl...> - 2003-10-10 17:49:22
|
Bruce Smith wrote: > I recommend we add a empty "/etc/init.d/rc.local" file that gets run > at the end of all the startup scripts. (or one before the end, if > grsecurity has to be the very last one) Do you care if I add it? I would not do it because it is not Linux Standard Base. -- MfG / Regards Friedrich Lobenstock ____________________________________________________________________ Friedrich Lobenstock Linux Services Lobenstock URL: http://www.lsl.at/ Email: fl...@fl... ____________________________________________________________________ |
|
From: Bruce S. <bw...@ar...> - 2003-10-10 18:02:18
|
> > I recommend we add a empty "/etc/init.d/rc.local" file that gets run > > at the end of all the startup scripts. (or one before the end, if > > grsecurity has to be the very last one) Do you care if I add it? > > I would not do it because it is not Linux Standard Base. But Redhat does it!!! ;-) And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html (OK, I'll shut up about it now ... :) - BS |
|
From: Friedrich L. <fl...@fl...> - 2003-10-10 18:32:45
|
Bruce Smith wrote: >>>I recommend we add a empty "/etc/init.d/rc.local" file that gets run >>>at the end of all the startup scripts. (or one before the end, if >>>grsecurity has to be the very last one) Do you care if I add it? >> >>I would not do it because it is not Linux Standard Base. > > But Redhat does it!!! ;-) Yeah, and Microsoft is the Standard because 80% of the world runs it? > > And this is LSB? http://www.devil-linux.org/newdoc/ch01s04.html > (OK, I'll shut up about it now ... :) I know that this it not standard, but when I defined this I did not know how to do better. And I still don't know. This schema is unique because it let's you swap harddisks around - eg. from one port to the other and manages the "partitions" dynamically. The file /etc/fstab is still supported. Haven't tested if this really works but the support for it is there. -- MfG / Regards Friedrich Lobenstock ____________________________________________________________________ Friedrich Lobenstock Linux Services Lobenstock URL: http://www.lsl.at/ Email: fl...@fl... ____________________________________________________________________ |