FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-11-2010, 09:13 AM
Georghy
 
Default Launch many scripts with reboot

I everyone,
I want to know how can I launch many script with reboot beetween each script
ie : I launch script1 at start up then the system reboot and launch
script2 then ...
Thanks for all your answers

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 09:37 AM
John Doe
 
Default Launch many scripts with reboot

From: Georghy <fusco@wanagain.net>
> I want to know how can I launch many script with reboot beetween each script
> ie : I launch script1 at start up then the system reboot and launch
> script2 then ...

Simple way would be to have a script that reads a file with a script on each line.
If the file is not empty, it would read the first line, execute the script corresponding to that line, remove that line from the file and reboot.
Rinse and repeat until the file is empty...

JD



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 09:53 AM
Rudi Ahlers
 
Default Launch many scripts with reboot

On Thu, Feb 11, 2010 at 12:13 PM, Georghy <fusco@wanagain.net> wrote:


I everyone,

I want to know how can I launch many script with reboot beetween each script

ie : I launch script1 at start up then the system reboot and launch

script2 then ...

Thanks for all your answers



--

Cordialement, / Greetings,

Georghy FUSCO



_______________________________________________


Simple

1. Add a line to /etc/rc.local - for exmaple "sh /root/myscript"
2. /root/myscript's contents could look like this: sh /root/runfirst
3. Now, you have say /root/script1, /root/script2, /root/script3, etc. At the end of each script do this:



rm -rf /root/script1
echo /root/script2 > /root/runfirst





--
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com


Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 10:07 AM
Georghy
 
Default Launch many scripts with reboot

John Doe a écrit :
> From: Georghy <fusco@wanagain.net>
>
>> I want to know how can I launch many script with reboot beetween each script
>> ie : I launch script1 at start up then the system reboot and launch
>> script2 then ...
>>
>
> Simple way would be to have a script that reads a file with a script on each line.
> If the file is not empty, it would read the first line, execute the script corresponding to that line, remove that line from the file and reboot.
> Rinse and repeat until the file is empty...
>
> JD
>
>
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
How do I launch a custom script at the startup?
for exemple my script installation-script
launch script 1, write in a file "prog" "script1 OK" then reboot
at startup, the system relaunch installation-script,
installation-script read the file "prog" an count 1 line
so the script launch script2 ...

Thank you so much

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 10:09 AM
Georghy
 
Default Launch many scripts with reboot

Rudi Ahlers a écrit :
>
>
> On Thu, Feb 11, 2010 at 12:13 PM, Georghy <fusco@wanagain.net
> <mailto:fusco@wanagain.net>> wrote:
>
> I everyone,
> I want to know how can I launch many script with reboot beetween
> each script
> ie : I launch script1 at start up then the system reboot and launch
> script2 then ...
> Thanks for all your answers
>
> --
> Cordialement, / Greetings,
> Georghy FUSCO
>
> _______________________________________________
>
> Simple
>
> 1. Add a line to /etc/rc.local - for exmaple "sh /root/myscript"
> 2. /root/myscript's contents could look like this: sh /root/runfirst
> 3. Now, you have say /root/script1, /root/script2, /root/script3, etc.
> At the end of each script do this:
>
> rm -rf /root/script1
> echo /root/script2 > /root/runfirst
>
>
>
>
>
>
> --
> Kind Regards
> Rudi Ahlers
> SoftDux
>
> Website: http://www.SoftDux.com
> Technical Blog: http://Blog.SoftDux.com
> Office: 087 805 9573
> Cell: 082 554 7532
> ------------------------------------------------------------------------
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
Thanks for your answer I'll try

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 10:31 AM
Kai Schaetzl
 
Default Launch many scripts with reboot

Georghy wrote on Thu, 11 Feb 2010 11:13:10 +0100:

> I want to know how can I launch many script with reboot beetween each script
> ie : I launch script1 at start up then the system reboot and launch
> script2 then ...

Why would you want to do this?
One way would be to use a reboot counter, another to use lock files (run only
the first script that hasn't run yet), yet another to enumerate the files and
remove the first on each boot, yet another to have a file remove itself after
run (may not work).

Kai

--
Get your web at Conactive Internet Services: http://www.conactive.com



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 10:39 AM
Georghy
 
Default Launch many scripts with reboot

Georghy a écrit :
> Rudi Ahlers a écrit :
>
>> On Thu, Feb 11, 2010 at 12:13 PM, Georghy <fusco@wanagain.net
>> <mailto:fusco@wanagain.net>> wrote:
>>
>> I everyone,
>> I want to know how can I launch many script with reboot beetween
>> each script
>> ie : I launch script1 at start up then the system reboot and launch
>> script2 then ...
>> Thanks for all your answers
>>
>> --
>> Cordialement, / Greetings,
>> Georghy FUSCO
>>
>> _______________________________________________
>>
>> Simple
>>
>> 1. Add a line to /etc/rc.local - for exmaple "sh /root/myscript"
>> 2. /root/myscript's contents could look like this: sh /root/runfirst
>> 3. Now, you have say /root/script1, /root/script2, /root/script3, etc.
>> At the end of each script do this:
>>
>> rm -rf /root/script1
>> echo /root/script2 > /root/runfirst
>>
>>
>>
>>
>>
>>
>> --
>> Kind Regards
>> Rudi Ahlers
>> SoftDux
>>
>> Website: http://www.SoftDux.com
>> Technical Blog: http://Blog.SoftDux.com
>> Office: 087 805 9573
>> Cell: 082 554 7532
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>>
> Thanks for your answer I'll try
>
>
your command works, but I want to watch the script running, in order to
view errors, so I figured out that I have to launch the script after the
user is connected thanks to .bachrc do you know how to do that ?
thanks

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 10:42 AM
Georghy
 
Default Launch many scripts with reboot

Kai Schaetzl a écrit :
> Georghy wrote on Thu, 11 Feb 2010 11:13:10 +0100:
>
>
>> I want to know how can I launch many script with reboot beetween each script
>> ie : I launch script1 at start up then the system reboot and launch
>> script2 then ...
>>
>
> Why would you want to do this?
> One way would be to use a reboot counter, another to use lock files (run only
> the first script that hasn't run yet), yet another to enumerate the files and
> remove the first on each boot, yet another to have a file remove itself after
> run (may not work).
>
> Kai
>
>
I'm using script to configure a computer to my attempts, but I want to
automatize that work.
I'm using different scripts to configure different things and after
these scripts I'm forced to reboot in order to use the new parameters

--
Cordialement, / Greetings,
Georghy FUSCO

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 12:04 PM
"Alexander Dalloz"
 
Default Launch many scripts with reboot

> I'm using script to configure a computer to my attempts, but I want to
> automatize that work.
> I'm using different scripts to configure different things and after
> these scripts I'm forced to reboot in order to use the new parameters
>
> --
> Cordialement, / Greetings,
> Georghy FUSCO

Running Linux you don't have to reboot, unless you want to switch the
running kernel. Can you be more specific about what exactly is customized
and "forces" a reboot?

Regards

Alexander


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-11-2010, 12:08 PM
Rajagopal Swaminathan
 
Default Launch many scripts with reboot

On Thu, Feb 11, 2010 at 6:34 PM, Alexander Dalloz <ad+lists@uni-x.org> wrote:
>
> Running Linux you don't have to reboot, unless you want to switch the
> running kernel.

with ksplice even that is not needed

Regards,

Rajagopal
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org