customize unix

  • Thread starter Thorsten Gottschalk
  • Start date
T

Thorsten Gottschalk

Hello all,

I normal install 1-2 unix systems per week. The service which is
running this machines differs over time.
So I have a kind of basic installation from a cd rom, after that I
doing some custimsations to the system. E.g. additional entries in the
/etc/hosts, add users, change file rights, add some scripts, change
config files in /etc ....

Now I want to write a perl script that to all this staff. But I do not
want to program this hardcoded in my perl script. I want a kind of
controll file where I describe my changes and hand over this file to
script which then do these changes.
I have reduced these function I need:

- change right, owners of file
- copy file
- append text to file
- add/delete users
- execute other programms

So is there any module out there which can support me in my wishes?

ciao
Thorsten
 
B

Ben Morrow

Quoth (e-mail address removed) (Thorsten Gottschalk):
Hello all,

I normal install 1-2 unix systems per week. The service which is
running this machines differs over time.
So I have a kind of basic installation from a cd rom, after that I
doing some custimsations to the system. E.g. additional entries in the
/etc/hosts, add users, change file rights, add some scripts, change
config files in /etc ....

Now I want to write a perl script that to all this staff. But I do not
want to program this hardcoded in my perl script. I want a kind of
controll file where I describe my changes and hand over this file to
script which then do these changes.
I have reduced these function I need:

- change right, owners of file

chmod, chown
- copy file
File::Copy

- append text to file

open my $FH, '>>', $file or die...;
- add/delete users

If your system has usermod/useradd/etc. programs, I would invoke these.
Otherwise, if you have Linux-like /etc/passwd and /etc/shadow files, you
could use Linux::usermod... though I have to say I wouldn't use it on a
running system.
- execute other programms

system

I don't usually say this, but this strikes me as a better job for a
shell script than Perl...

Ben
 
L

lostriver

Hello all,

I normal install 1-2 unix systems per week.

So you basicaly doing a monkey job over and over and over.....
Do not waste time and learn how to setup hands off install
servers. Search on www.google.com for 'jumpstart' if your
'unix' is Solaris and 'kickstart' if it is Linux.

good luck.
 
U

Uri Guttman

BM> Quoth (e-mail address removed) (Thorsten Gottschalk):

BM> I don't usually say this, but this strikes me as a better job for a
BM> shell script than Perl...

i wrote a similar system in perl a buncha years ago. perl is better than
shell since you need to parse config files, make decisions, do different
things and shell is a pain for those. if the script just is a bunch of
system calls, i can see shell being used but OS setup stuff can be much
more complex than that.

uri
 
T

Thorsten Gottschalk

BM> I don't usually say this, but this strikes me as a better job for
a
BM> shell script than Perl...

Yes, I also though this first, but in this script is a kind of user
dialog. And I like perl for text user dialogs. These changes I
described above are only a small part of the hole script.
And I install solaris and linux so I hoped to get it easier using "a
common" interface (perl) to access the file for example.


lostriver said:
So you basicaly doing a monkey job over and over and over.....
Do not waste time and learn how to setup hands off install
servers. Search on www.google.com for 'jumpstart' if your
'unix' is Solaris and 'kickstart' if it is Linux.

good luck.
I never told, that I always install the same system. The system are
for different purposes. I just use kickstart and jumpstart, but I
couldn't find any information how to change /etc/system with jumpstart
WITHOUT writing a shell script and integrating this script in
jumpstart. Any additional information would be very helpfull.

Thanks.

ciao
Thorsten
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top