Script Prototypes

From Nuclear Physics Group Documentation Pages
Revision as of 13:56, 20 July 2007 by Steve (talk | contribs) (→‎setres)
Jump to navigationJump to search

setres

Bash function for remotely setting /etc/resolv.conf to the proper values:

function setres
{
    home=~
    master="$home/bin/master_resolv.conf"
    scp $master root@$1:/etc/resolv.conf
}

Would be better if the function checked to see if the file didn't exist, and if not, created it. Or maybe it would be better to have the "master" file on a specific machine. Actually, even better would be a program that maps settings to files.