#!/bin/bash #2006-09-01 #Downloads and modifies a system to run make-home-links #-iwsmith #Setup /etc/fstab grep -i is\.cct.\.lsu.\edu /etc/fstab if [[ $? -ne 0 ]] then echo "Adding mountpoint" echo "is.cct.lsu.edu:/home /home/.ishome nfs timeo=14,intr,soft 0 0">>/etc/fstab if [[ ! -e /home/.ishome ]] then mkdir /home/.ishome fi mount -a fi #Get and set make-home-links to +x cd /usr/local/sbin if [ -e make-home-links ] then echo "Make home links exists, has this been done already?" exit 1 fi echo "Retrieving file..." wget http://cct.lsu.edu/~iwsmith/admin/make-home-links chmod +x make-home-links #Update /etc/bashrc echo "Updating /etc/bashrc" if [ -e /etc/bashrc ] then echo "#Make home links if [ -x /usr/local/sbin/make-home-links ] then . /usr/local/sbin/make-home-links else echo "Unable to execute make-home-links" fi" >> /etc/bashrc else echo "Unable to locate /etc/bashrc" fi #Update /etc/csh.cshrc echo "Updating /etc/csh.cshrc" if [ -e /etc/csh.cshrc ] then echo "if ( -r /usr/local/sbin/make-home-links ) then /bin/bash /usr/local/sbin/make-home-links endif">>/etc/csh.cshrc else echo "Unable to locate /etc/csh.cshrc" fi echo "Done"