vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Steven Woody wrote: > In a redhat based document, it mentioned /etc/rc.sh that does not exit > in slack. My question is, which file is equivalent to /etc/rc.sh? I > want to put some lines of script into it. Thanks. > You mean for stuff to run at bootup? Try /etc/rc.d/rc.local |
| |||
| On 2008-05-13, Steven Woody <narkewoody@gmail.com> wrote: > In a redhat based document, it mentioned /etc/rc.sh that does not exit > in slack. My question is, which file is equivalent to /etc/rc.sh? I > want to put some lines of script into it. Thanks. What do the lines do? As someone else mentioned, /etc/rc.d/rc.local might be the right place, or it might be /etc/profile.d/*, or it might be something else. More information is needed. -RW |
| |||
| On May 13, 1:26 pm, Robby Workman <newsgro...@rlworkman.net> wrote: > On 2008-05-13, Steven Woody <narkewo...@gmail.com> wrote: > > > In a redhat based document, it mentioned /etc/rc.sh that does not exit > > in slack. My question is, which file is equivalent to /etc/rc.sh? I > > want to put some lines of script into it. Thanks. > > What do the lines do? > As someone else mentioned, /etc/rc.d/rc.local might be the > right place, or it might be /etc/profile.d/*, or it might be > something else. More information is needed. > > -RW I doubt these things can be done in rc.local since rc.local will be executed very later in boot time. What I want to do in /etc/rc.sh is to prepare stuffs for a tmps, my /var is actually a symbol link pointing to /tmpfs/var. So, you see, if I do 'mkdir /tmpfs/var' in rc.local, then any program running before /tmpfs/var and depends on / var will failed to run, it it? Thanks. |
| |||
| Steven Woody wrote: > On May 13, 1:26 pm, Robby Workman <newsgro...@rlworkman.net> wrote: >> On 2008-05-13, Steven Woody <narkewo...@gmail.com> wrote: >> >>> In a redhat based document, it mentioned /etc/rc.sh that does not exit >>> in slack. My question is, which file is equivalent to /etc/rc.sh? I >>> want to put some lines of script into it. Thanks. >> What do the lines do? >> As someone else mentioned, /etc/rc.d/rc.local might be the >> right place, or it might be /etc/profile.d/*, or it might be >> something else. More information is needed. >> >> -RW > > I doubt these things can be done in rc.local since rc.local will be > executed very later in boot time. What I want to do in /etc/rc.sh is > to prepare stuffs for a tmps, my /var is actually a symbol link > pointing to /tmpfs/var. So, you see, if I do 'mkdir /tmpfs/var' in > rc.local, then any program running before /tmpfs/var and depends on / > var will failed to run, it it? > > Thanks. > > The script executed at boot time in Slackware is /etc/rc.d/rc.S; you can customize it to do these things. Olive |
| |||
| Steven Woody wrote: > I doubt these things can be done in rc.local since rc.local will be > executed very later in boot time. What I want to do in /etc/rc.sh is > to prepare stuffs for a tmps, my /var is actually a symbol link > pointing to /tmpfs/var. So, you see, if I do 'mkdir /tmpfs/var' in > rc.local, then any program running before /tmpfs/var and depends on / > var will failed to run, it it? > > Thanks. Pretty sure that if you just put the entry you need in /etc/fstab, then rc.S will mount it before anything needs it. (It will mount it when it would mount /var from an ordinary partition. Read rc.S, esp. at line 297) I mount /tmp using tmpfs and do nothing beyond having it included in fstab. -- Old Man If all else fails, immortality can always be assured by spectacular error. - John Kenneth Galbraith |
| |||
| On Tue, 13 May 2008 10:13:57 -0400, Old Man wrote: > Steven Woody wrote: > >> I doubt these things can be done in rc.local since rc.local will be >> executed very later in boot time. What I want to do in /etc/rc.sh is >> to prepare stuffs for a tmps, my /var is actually a symbol link >> pointing to /tmpfs/var. So, you see, if I do 'mkdir /tmpfs/var' in >> rc.local, then any program running before /tmpfs/var and depends on / >> var will failed to run, it it? >> >> Thanks. > > Pretty sure that if you just put the entry you need in /etc/fstab, then > rc.S will mount it before anything needs it. (It will mount it when it > would mount /var from an ordinary partition. Read rc.S, esp. at line > 297) I mount /tmp using tmpfs and do nothing beyond having it included > in fstab. Having just suffered from an auto-mangled fstab, I can confirm that the boot process fails very early on under these circumstances. |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2008-05-13, Steven Woody <narkewoody@gmail.com> wrote: > What I want to do in /etc/rc.sh is > to prepare stuffs for a tmps, my /var is actually a symbol link > pointing to /tmpfs/var. This is IMHO a very bad idea. /var shouldn't be on a tmpfs as it is the storage place for a number of very important things[0]. tmpfs is specifically designed to be a very fast filesystem for things that need to be read and written quite a lot, but can be disposed of at a whim without hurting anything. If your system needs to read and write to /var enough that you would see a benefit in using tmpfs, then your system probably *needs* to keep those things after a reboot and tmpfs just wouldn't be for you. [0] By default, /var is where any webpages, any e-mail, and all your logs are stored. For a desktop system, it may be sufficient to put /var on a tmpfs, but you won't be able to trace back any logs after a reboot. - -- It is better to hear the rebuke of the wise, Than for a man to hear the song of fools. Ecclesiastes 7:5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkgp7WQACgkQrZS6hX/gvjrj5gCguvuB2uxDL3+6DyXCzncMGEHk b/0AniRkbN8eLGBa9PxpH9iYH+fa6WSK =W2AH -----END PGP SIGNATURE----- |
| ||||
| On May 14, 3:35 am, +Alan Hicks+ <a...@lizella.netWORK> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 2008-05-13, Steven Woody <narkewo...@gmail.com> wrote: > > > What I want to do in /etc/rc.sh is > > to prepare stuffs for a tmps, my /var is actually a symbol link > > pointing to /tmpfs/var. > > This is IMHO a very bad idea. /var shouldn't be on a tmpfs as it is > the storage place for a number of very important things[0]. tmpfs is > specifically designed to be a very fast filesystem for things that need > to be read and written quite a lot, but can be disposed of at a whim > without hurting anything. > > If your system needs to read and write to /var enough that you would > see a benefit in using tmpfs, then your system probably *needs* to keep > those things after a reboot and tmpfs just wouldn't be for you. > > [0] By default, /var is where any webpages, any e-mail, and all your > logs are stored. For a desktop system, it may be sufficient to put > /var on a tmpfs, but you won't be able to trace back any logs after a > reboot. > > - -- > It is better to hear the rebuke of the wise, > Than for a man to hear the song of fools. > Ecclesiastes 7:5 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkgp7WQACgkQrZS6hX/gvjrj5gCguvuB2uxDL3+6DyXCzncMGEHk > b/0AniRkbN8eLGBa9PxpH9iYH+fa6WSK > =W2AH > -----END PGP SIGNATURE----- The system is dedicated for an embedded application, so puting /var in tmpfs meight not be so bad. And, thanks for all your replies and help, I will proceed to use /etc/rc.S. |
| Thread Tools | |
| Display Modes | |
|
|