Re: [CentOS] Launch many scripts with reboot
John Doe a écrit : From: Georghy fu...@wanagain.net 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 ? Redirect stderr to a file? JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos this part works thanks :) -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
John Doe a écrit : From: Georghy fu...@wanagain.net for now i want to display the computer IP adress just before the user login but I want to display it before the user logon do you know how to do this ? check /etc/issue, but you might have to generate it on the fly with the IP hardcoded in it since it is not in the available variables (man mingetty). JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos i tried to launch the script on the post install script of anaconda (kickstart file) but the network card seem not configured yet so I tried to replace the script on /etc/issues I will see if it worked -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Les Mikesell a écrit : On 2/11/2010 9:56 AM, Georghy wrote: Les Mikesell a écrit : Georghy wrote: Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add/path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. I use .bash_profile and it works great for now i want to display the computer IP adress just before the user login my command is : ifconfig | grep inet addr | awk '{print $2}' | sed s/addr:// | head -n 1 and it works after logon but I want to display it before the user logon do you know how to do this ? The same commands work but the hard part is knowing where to display before someone logs in. Is this a text console or do you have a graphic login box showing? And by the way, you don't need a pipeline of 4 commands to grab a bit of text. Sed can do everything that grep does and more, awk can do anything sed can do. If you use one of the more powerful commands you might as well let it do all the work instead of building a pipeline. I want to display the IP adress of the computer for the user then he knows what IP use in order to launch a ssh connection In addition, we want to display it after a kickstart installation so I want to put this command in the kickstart then after the installation reboot it can display the IP adress of the computer You didn't answer the question. _Where_ do you want to display this IP address? Before login there is no output stream or location associated with a user - or really even for the machine, although there is some concept of a console where output lands during bootup for most machines. I tried to run a echo on /etc/issues and it worked, so I think it is in this directory that I have to run my script -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Georghy a écrit : John Doe a écrit : From: Georghy fu...@wanagain.net for now i want to display the computer IP adress just before the user login but I want to display it before the user logon do you know how to do this ? check /etc/issue, but you might have to generate it on the fly with the IP hardcoded in it since it is not in the available variables (man mingetty). JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos i tried to launch the script on the post install script of anaconda (kickstart file) but the network card seem not configured yet so I tried to replace the script on /etc/issues I will see if it worked It worked with /etc/issues thank you everyone :) -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] 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
Re: [CentOS] Launch many scripts with reboot
From: Georghy fu...@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
Re: [CentOS] Launch many scripts with reboot
On Thu, Feb 11, 2010 at 12:13 PM, Georghy fu...@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
Re: [CentOS] Launch many scripts with reboot
John Doe a écrit : From: Georghy fu...@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
Re: [CentOS] Launch many scripts with reboot
Rudi Ahlers a écrit : On Thu, Feb 11, 2010 at 12:13 PM, Georghy fu...@wanagain.net mailto:fu...@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
Re: [CentOS] 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
Re: [CentOS] Launch many scripts with reboot
Georghy a écrit : Rudi Ahlers a écrit : On Thu, Feb 11, 2010 at 12:13 PM, Georghy fu...@wanagain.net mailto:fu...@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
Re: [CentOS] 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
Re: [CentOS] 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
Re: [CentOS] Launch many scripts with reboot
On Thu, Feb 11, 2010 at 6:34 PM, Alexander Dalloz ad+li...@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
Re: [CentOS] Launch many scripts with reboot
Alexander Dalloz a écrit : 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 I can't talk about this in detail, this is an intern process. -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Georghy wrote on Thu, 11 Feb 2010 12:42:21 +0100: 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 It's quite uncommon that you have to reboot for that. Especially going by your quote many. 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
Re: [CentOS] Launch many scripts with reboot
Kai Schaetzl a écrit : Georghy wrote on Thu, 11 Feb 2010 12:42:21 +0100: 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 It's quite uncommon that you have to reboot for that. Especially going by your quote many. Kai by many I mean 5-6 scripts -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Georghy wrote: Kai Schaetzl a écrit : Georghy wrote on Thu, 11 Feb 2010 12:42:21 +0100: 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 It's quite uncommon that you have to reboot for that. Especially going by your quote many. Kai by many I mean 5-6 scripts Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add /path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. -- Les Mikesell lesmikes...@gmail.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Les Mikesell a écrit : Georghy wrote: Kai Schaetzl a écrit : Georghy wrote on Thu, 11 Feb 2010 12:42:21 +0100: 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 It's quite uncommon that you have to reboot for that. Especially going by your quote many. Kai by many I mean 5-6 scripts Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add /path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. I use .bash_profile and it works great for now i want to display the computer IP adress just before the user login my command is : ifconfig | grep inet addr | awk '{print $2}' | sed s/addr:// | head -n 1 and it works after logon but I want to display it before the user logon do you know how to do this ? -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Georghy wrote: Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add /path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. I use .bash_profile and it works great for now i want to display the computer IP adress just before the user login my command is : ifconfig | grep inet addr | awk '{print $2}' | sed s/addr:// | head -n 1 and it works after logon but I want to display it before the user logon do you know how to do this ? The same commands work but the hard part is knowing where to display before someone logs in. Is this a text console or do you have a graphic login box showing? And by the way, you don't need a pipeline of 4 commands to grab a bit of text. Sed can do everything that grep does and more, awk can do anything sed can do. If you use one of the more powerful commands you might as well let it do all the work instead of building a pipeline. -- Les Mikesell lesmikes...@gmail.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
Les Mikesell a écrit : Georghy wrote: Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add /path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. I use .bash_profile and it works great for now i want to display the computer IP adress just before the user login my command is : ifconfig | grep inet addr | awk '{print $2}' | sed s/addr:// | head -n 1 and it works after logon but I want to display it before the user logon do you know how to do this ? The same commands work but the hard part is knowing where to display before someone logs in. Is this a text console or do you have a graphic login box showing? And by the way, you don't need a pipeline of 4 commands to grab a bit of text. Sed can do everything that grep does and more, awk can do anything sed can do. If you use one of the more powerful commands you might as well let it do all the work instead of building a pipeline. I want to display the IP adress of the computer for the user then he knows what IP use in order to launch a ssh connection In addition, we want to display it after a kickstart installation so I want to put this command in the kickstart then after the installation reboot it can display the IP adress of the computer -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
John Doe a écrit : From: Georghy fu...@wanagain.net 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? I can't talk about this in detail, this is an intern process. I bet it is a windows update clone for linux! ;D JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos I hope not !! :p -- Cordialement, / Greetings, Georghy FUSCO ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
From: Georghy fu...@wanagain.net for now i want to display the computer IP adress just before the user login but I want to display it before the user logon do you know how to do this ? check /etc/issue, but you might have to generate it on the fly with the IP hardcoded in it since it is not in the available variables (man mingetty). JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
From: Georghy fu...@wanagain.net 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 ? Redirect stderr to a file? JD ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
On 2/11/2010 9:56 AM, Georghy wrote: Les Mikesell a écrit : Georghy wrote: Do these need to run as root? And do they really need to wait for a user to log in or can they write their output to a file to be viewed later? You can put a line in /etc/rc.d/rc.local to run your script which you can change each time as you want. And you can add/path/to/logfile on the command if you want it to be saved. If you want something to run as the user at login, it can go in .profile or .bash_profile in the user's home directory. I use .bash_profile and it works great for now i want to display the computer IP adress just before the user login my command is : ifconfig | grep inet addr | awk '{print $2}' | sed s/addr:// | head -n 1 and it works after logon but I want to display it before the user logon do you know how to do this ? The same commands work but the hard part is knowing where to display before someone logs in. Is this a text console or do you have a graphic login box showing? And by the way, you don't need a pipeline of 4 commands to grab a bit of text. Sed can do everything that grep does and more, awk can do anything sed can do. If you use one of the more powerful commands you might as well let it do all the work instead of building a pipeline. I want to display the IP adress of the computer for the user then he knows what IP use in order to launch a ssh connection In addition, we want to display it after a kickstart installation so I want to put this command in the kickstart then after the installation reboot it can display the IP adress of the computer You didn't answer the question. _Where_ do you want to display this IP address? Before login there is no output stream or location associated with a user - or really even for the machine, although there is some concept of a console where output lands during bootup for most machines. -- Les Mikesell lesmikes...@gmail.com ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Launch many scripts with reboot
El 11/02/10 14:08, Rajagopal Swaminathan escribió: On Thu, Feb 11, 2010 at 6:34 PM, Alexander Dallozad+li...@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 Anyone has tried ksplice on CentOS? Regards, -- Santi Saez http://woop.es ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos