Script Prototypes

From Nuclear Physics Group Documentation Pages
Revision as of 13:06, 20 July 2007 by Steve (talk | contribs) (Page for prototypes of functions/scripts/programs that automate tasks)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.