.bash profile

From SOFTICE

Jump to: navigation, search


Developed by:

Synopsis

This is a bash login script used by SOFTICE. It has been modified from Debian's default .bash_profile script so that it will attempt to mount the user's Samba share to their home directory if it is not already mounted. The new lines are show in red. This file is located at /home/sys/osc/homerun/.bash_profile.

File

# ~/.bash_profile: executed by bash(1) for login shells.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/login.defs
#umask 022

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# the rest of this file is commented out.

# set PATH so it includes user's private bin if it exists
#if [ -d ~/bin ] ; then
#    PATH=~/bin:"${PATH}"
#fi

# do the same with MANPATH
#if [ -d ~/man ]; then
#    MANPATH=~/man${MANPATH:-:}
#    export MANPATH
#fi
 
# run smb mount only if the user is not logged into master node, and SMB has not already been mounted
if [ "$HOSTNAME" != "penguin.lakeland.usf.edu" ]; then
  if ! grep -q ~ /etc/mtab; then
    smbmount //192.168.0.1/"$USER" ~ -o credentials=.credentials
  fi
fi