LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2003, 05:22 PM   #1
hilljack13
LQ Newbie
 
Registered: May 2003
Posts: 1

Rep: Reputation: 0
Question Help with script file


I have to turn in a script file for my class and it has to have the following info. all of which i have no clue of how to do. PLEASE HELP......

Write a shell script that performs the following:

-configures IP address of the NIC to be 10.250.10.10 /24
-configures gateway to be 10.200.10.75
-configures host and domain names to be host10.domain10.hw
-checks to determine if the bind packages is installed, and if so removes it.
-installs bind package
-configures server as a primary DNS server for domain10.hw

this is what i have...so far???

#!/bin/bash
IPADDR=10.250.10.10/24
GATEWAY=10.20.10.75
HOSTNAME=host10.domain10.hw
find / -name -qa bind-*


I NEED HELP!!!
 
Old 05-13-2003, 05:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Keep up the good work boy, and read
your documentation...

Cheers,
Tink

P.S.: Asking homework questions is against
the rules...
 
Old 05-13-2003, 08:26 PM   #3
bluenirve
Member
 
Registered: May 2003
Distribution: Slackware 10
Posts: 56

Rep: Reputation: 15
well, for each thing you have to do, read the docs for it... such as hostname, some gateway stuff, etc... then, just slap the commands together (and for the if..., just make a simple bash if statement that checks if it is installed)
 
Old 05-13-2003, 08:33 PM   #4
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
S.C. for Santa Cruz?

check out the ifconfig manual page for 1,2

'man hosts' or 'man hostname' for 3

maybe something like this for #4:
Code:
if [ -n $( ls {/bin,/sbin,/usr/bin,/usr/sbin} | grep "^bind" ) ]; 
then
echo YOU HAVE BIND!!!
rm -f `whereis bind | cut -d' ' -f2`
fi
Installing it seems to be WAY to specialized for a script... it depends on where your sources are, how they are packaged, what configure options you want, ect, ect....

5- I don't know how to configure bind. Maybe check out 'man nsswitch.conf' and 'man resolv.conf' to help w/ configuration????
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need for a script file sirrus_linux Linux - Software 7 02-27-2005 02:15 AM
How to start a Tcl/Tk script by simply invoking the script file itself ? cyu021 Programming 2 10-10-2004 12:00 PM
help me with this script file alaios Linux - General 11 05-03-2003 03:29 AM
Script that appends a file to start of other file amp2000 Programming 8 06-30-2002 10:56 AM
Script, Reading a file, When end of file? elibm Programming 2 07-16-2001 12:01 PM


All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration