scripts

Adam Mercer adam at asystems.junglelink.co.uk
Tue Jun 13 03:40:26 PDT 2000


> make a directory somewhere- /var/tmp/whatever and add this to the end
> of the script:
>
> DATE=`date "+%Y%m%d"`
> rm -rf /var/tmp/whatever/?*
> touch /var/tmp/whatever/$DATE-ran
>
> To check if the script ran, just see if /var/tmp/whatever/$DATE-ran
exists.

thats what i was after - cheers. i think i wasn't too clear in my first
email about what exactly i wanted to do with the script, so i'll explain - i
know a lots of topic but i think that it explains why i enquired about what
i wanted to do.

probably like many other people on this list my first computer i really got
into was the amiga! i just loved the way it operated, the way you could
basically change anything about it, startup, config, appearence (almost)
etc... when i had worked my way around it and worked out how the machine
worked, what needed to be setup during boot up i started playing round with
the setup changing the startup-sequence here and there. eventually i rewrote
the whole thing, there was not an orignal line of code in the whole
startup-sequence. i had taken out the bits i didn't need and added extra
bits so the machine was set up how i wanted it to be and in my opinion it
ran much better and quicker than it did with the original script.

then when i came to university i got a pc as i needed access to the world of
microsoft, or i thought i did, so i put my amiga in the attic and shelled
out alot of cash for a pc. the first thing i noticed about it was that you
couldn't really change anything about it, that way it started up, the
appearence, anything the operation of the machine was decided by someone
over in seattle. it was my machine and i didn't really have any control on
how it operated. then i discovered linux!

after a while of playing with it and slowly working out how it worked i
found that i could set the machine up to operate how i wanted it to work,
there was no one sitting anywhere telling my how to set my machine up, it
was like having my old amiga again. so i started to experiment using the
source instead of rpm's, installing the software where i wanted to go etc...
then i found lfs.

this was what i really wanted from a operating system, something that i had
complete control over. so i installed the base system and then started
playing with the startup scripts, and thats when i emailed the list
regarding the scripts.

basically i want to rewrite the startup scripts so that machine starts up
the way i want it too start up, as i see that the scripts in the book are
just guidelines for people to expand on. they do the basics, which is what
they are designed to do but in order for them to work best on my machine i
need to do a bit of tweaking. sometimes my machine can be on for days at a
time, other times it can be shutdown and restarted many times a day. so what
i want to do in the startup script is to make sure that the file systems are
checked everyday, so that on days when the machine is shutdown and restarted
many times the drives are only checked once. whereas when the machine is on
for days at a time i want to make sure that the filesystem is checked at
bootup. hope this makes it clearer as to why i wanted to know about running
scripts once a day.

i was thinking about using crond, but that i think would cause more problems
than it would solve as it isn't a good idea checking a file system in
read-write mode so therefore i would have to remount and file system in
read-only mode, check the filesystem, and then remount in read-write mode
and if i was using the machine at the time it could cause problems.

if you want i'll let you know how i get on... it'll probably be a while as i
think i'm going to wait until the book uses the 2.4 kernel and start again
as the devfs sounds indispensible along with a lot of other things!

cheers

adam


--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
News Reader access: news.pcrdallas.com
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list