File=table Product=template_home group: Flavor = ANY Qualifiers = "" common: Action = setup proddir() setupenv() Execute( cat > /dev/null <<'true', NO_UPS_ENV) SetupRequired(login) SetupRequired(shrc) Execute( true, NO_UPS_ENV) Execute( "'true'", NO_UPS_ENV) Action=unsetup unproddir() unsetupenv() # action so these files get configured for local SETUPS_DIR Action=configure # # figure out where things come from/go to # EnvSet( TemplateIn, ${UPS_PROD_DIR}/dotfiles.template ); EnvSet( TemplateOut, ${UPS_PROD_DIR}/dotfiles.localized ); # # just in case of afs, fix read/write paths -- SETUPS_DIR becomes # readonly, while TemplateOut becomes read/write... # Execute (echo ${SETUPS_DIR} | sed -e 's;/afs/.fnal.gov/;/afs/fnal.gov/;', NO_UPS_ENV, SETUPS_DIR) Execute (echo ${TemplateOut} | sed -e 's;/afs/fnal.gov/;/afs/.fnal.gov/;', NO_UPS_ENV, TemplateOut) # # replace ${SETUPS_DIR} in scripts # Execute (sh -c 'cd ${UPS_PROD_DIR}; test -d $TemplateOut || mkdir $TemplateOut; for f in Xdefaults cshrc login mailrc profile shrc; do sed -e "s;\${SETUPS_DIR};${SETUPS_DIR};g" < $TemplateIn/.$f > $TemplateOut/.$f ; done', NO_UPS_ENV) # # make the .bashrc -> .shrc symlink # Execute ( cd $TemplateOut; rm -f .bashrc; ln -s .shrc .bashrc, NO_UPS_ENV) # # in case of AFS, run the volume release # Execute ( test -f /usr/local/bin/upd_volrelease && /usr/local/bin/upd_volrelease ${TemplateOut} , NO_UPS_ENV) Action = current # # action so these files get used by old cmd adduser tools # only does anything if /usr/local/etc is writable... # Execute(test -w /usr/local/etc && sh -c 'cd /usr/local/etc; for f in Xdefaults bashrc cshrc login mailrc profile shrc; do rm -f std$f.bak ; mv std$f std$f.bak; ln -s ${UPS_PROD_DIR}/dotfiles.localized/.${f} std$f; done',NO_UPS_ENV) Execute(test -w /usr/local/etc && sh -c 'cd /usr/local/etc; for f in cshrc login profile shrc; do rm -f fermi.$f.bak ; mv fermi.$f fermi.$f.bak; ln -s ${UPS_PROD_DIR}/dotfiles.localized/.${f} fermi.$f; done',NO_UPS_ENV) Execute(test -w /usr/local/etc && sh -c 'cd /usr/local/etc; test -f local.login -a \! -f local.login.csh && ln -s local.login local.login.csh',NO_UPS_ENV) Execute(test -w /usr/local/etc && sh -c 'cd /usr/local/etc; test -f local.profile -a \! -f local.login.sh && ln -s local.profile local.login.sh',NO_UPS_ENV) end: