This link may provide some help.
http://enterprise.linux.com/article....724216&tid=129
That, in combination with cfengine may be what you want to look into
I just have a little question... I have a script in which I would like it to SSH to a server, then perform operations on that server.
Now, when I simply performed (in the script) 'ssh backups' or 'ssh xxx.xxx.xxx.xxx, it seemed to hang, I suppose because the script was waiting for the SSH session to end before proceeding to the next instruction. Now, I know that I could simply do 'ssh backups <command>', but what if the command requires some sort of human interaction? Say, I wanted to change a password or something... 'ssh backups passwd ron'. How on earth would I do that? I have heard about expect, but have no idea how to use it, or how to incorporate it into my script. By the way, I am writing a script to do various admin tasks on some new systems I am putting together. I'm not changing passwords, but that was the first example to pop into my head that required some interaction... I just figured that many things could be automated (such as adding installation sources, adding groups, etc.) so that I don't need to do each one individually. I can just plug the newly built box into my network, install Linux, then run a script to do some things that I do to all of my machines...
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
This link may provide some help.
http://enterprise.linux.com/article....724216&tid=129
That, in combination with cfengine may be what you want to look into
The only problem with imaging is that it isn't quite flexible enough. Let's say I want to script a system update, that way the system is completely up to date, instead of being as up to date as the image. Or, if I want to add users, but the user names aren't the same? I don't know... These examples aren't exactly what I had in mind, but show a level of flexibility I am needing.
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
There seems to be quite a bit of flexibility there.Images are complete copies of a filesystem, and their files can be edited. Images on a server can be updated when a change is made to a client, and only the changes need be copied over to the image. You can also make changes to the image on the server and push it out to clients
cfengine:
http://www.debian-administration.org/articles/223
it is possible to script and automate many things across the LAN, such as:
- Checking file permissions and ownerships; fixing them if required.
- Restarting failed daemons/servers.
- Installing software remotely, including security updates.
- Editing files remotely.
- Executing commands remotely.
- Configuring network interfaces, routing, and DNS.
- Compressing, deleting, or otherwise managing files or directories.
Last edited by Outlaw; 06-08-2006 at 05:28 PM.
Ah haa... Yeah, that doesn't look to bad. As soon as I saw 'image' I guess my brain didn't read much further. I'll take a close look at that... Thanks!
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
In any case, is there a way to run interactive commands through the shell (script), or is that where you would need to resort to something like expect?
Asus A8V Deluxe Mobo
AMD Athlon64 X2 4400 -939
2GB Crucial DDR3200 Dual-Channel
ATi AiW 9800 Pro 128DDR
Audigy2 ZS
Sony DRU-810 DVD+RW DL
3 x Maxtor MaxLine SATA 160Gb 16Mb Cache
1 x Maxtor MaxLine SATA 300Gb 16Mb Cache
1 x Maxtor MaxLine SATA 120Gb 16Mb Cache
thanks
My suggestion for running commands on remote servers in general:
setup the server you want to run commands off of with trusted SSH access to the boxes you want to run commands on:
http://news.softpedia.com/news/How-t...on-38599.shtml
This way, you can just script:
ssh HOST <command1>
ssh HOST <command2>
63,000 bugs in the code, 63,000 bugs,
ya get 1 whacked with a service pack,
now there's 63,005 bugs in the code!!
Bookmarks