sm-discuss AT lists.ibiblio.org
Subject: Public SourceMage Discussion List
List archive
- From: nealbirch <nealbirch AT attbi.com>
- To: Casey Harkins <charkins AT upl.cs.wisc.edu>
- Cc: sm-discuss AT lists.ibiblio.org
- Subject: Re: [SM-Discuss] Network Configuration Tool
- Date: Sat, 02 Nov 2002 23:30:37 -0500
Casey Harkins wrote:
Some more fixes to this potential network configuration tool. If anyone
has some time to take a look, any feedback would be greatly appreciated.
Again, edit and change ROOTCHECK and NETDEVDIR at the top of the script to
test it out without being root and without modifying the
/etc/sysconfig/network directory.
In the meantime, I'm will see if I can help nealbirch out with any other
lingering init.d stuff (documentation?).
WOW! This is great! It doesn't seem to want to save a file, though, when I used it as non-root user. I changed the save_device function a bit, before I tried to use the script as root. (Didn't know you could use $? like that, either.)
# changed function
save_device() {
if [ -z "$1" ]; then
echo "Error: save_device() called with no parameter"
exit 1;
fi
devname=$(basename $1)
COMMAND=`$DIALOG --backtitle "$BACKTITLE"\
--stdout\
--title "Confirm device saving"\
--yesno\
"Are you sure you want to save device file: $devname?"\
0 0`
if [ $? == 0 ]; then
cat > $NETDEVDIR/$devname.dev <<EOF
# $devname.dev configuration
# created by: ${BACKTITLE}
# last modified: `date`
MODULE=${MODULE}
MODE=${MODE}
IP=${IP}
BROADCAST=${BROADCAST}
NETMASK=${NETMASK}
GATEWAY=${GATEWAY}
EOF
return 1 # return 1 to return back to main menu
fi
return 0
}
# end
Using cat just seemed cleaner for some reason.
I think we should add this to the net-tools (or make a new spell called SMGL_admin or something) and install this and other useful scripts that have been created in /usr/bin as a group of admin/maintenance tools. They would need man pages, I guess. I think you are right about the documentation, it's a weak spot.
I need to write a few spells and get my box in order here, need to do a UPS shutdown script, now that the fine folks at APC have finally sent the serial cable. I'll be doing that too.
Still recuperating from the car accident, and the sticker shock of new vehicle shopping... Probably getting delivery of a brand new blue Honda CRV in a week or so, of course my truck is getting ready to throw it's clutch, go figure.
Neal
--
"You can fool some of the people all of the time
--and those are the ones you have to concentrate on!"
GW Bush-- from the N.Y. Times
-
[SM-Discuss] Network Configuration Tool,
Casey Harkins, 11/02/2002
-
Re: [SM-Discuss] Network Configuration Tool,
nealbirch, 11/02/2002
-
Re: [SM-Discuss] Network Configuration Tool,
Casey Harkins, 11/04/2002
-
Re: [SM-Discuss] Network Configuration Tool,
nealbirch, 11/04/2002
- Re: [SM-Discuss] Network Configuration Tool, Casey Harkins, 11/04/2002
-
Re: [SM-Discuss] Network Configuration Tool,
nealbirch, 11/04/2002
-
Re: [SM-Discuss] Network Configuration Tool,
Casey Harkins, 11/04/2002
-
Re: [SM-Discuss] Network Configuration Tool,
nealbirch, 11/02/2002
Archive powered by MHonArc 2.6.24.