update...
This commit is contained in:
@ -113,3 +113,6 @@ export EDITOR=vim
|
||||
## - set beep more quiet
|
||||
## -
|
||||
#xset b 10 500 50
|
||||
|
||||
# turn off the beep (only in bash tab-complete ?)
|
||||
bind 'set bell-style none'
|
||||
|
@ -29,4 +29,3 @@ if [[ -f /usr/share/mc/bin/mc.sh ]]; then
|
||||
source /usr/share/mc/bin/mc.sh
|
||||
fi
|
||||
|
||||
export LANG="de_DE.utf8"
|
||||
|
@ -34,3 +34,95 @@ if [ -f "/usr/share/mc/bin/mc.sh" ] ; then
|
||||
fi
|
||||
|
||||
export LANG="de_DE.utf8"
|
||||
|
||||
# ---
|
||||
# Mmount samba shares
|
||||
# ---
|
||||
|
||||
# Don't try to mount samba shares if login at samba server
|
||||
#
|
||||
[[ "$(hostname --long)" = "{{ samba_server }}" ]] && return
|
||||
|
||||
SERVER="{{ samba_server }}"
|
||||
USER="{{ item.item.name }}"
|
||||
PASSWORD='{{ item.item.password }}'
|
||||
#VERSION="1.0"
|
||||
|
||||
# Use NTLMv2 password hashing and force packet signing
|
||||
#
|
||||
# SEC="ntlmv2i"
|
||||
#
|
||||
# Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message, and force packet signing
|
||||
#
|
||||
# SEC="ntlmsspi"
|
||||
#
|
||||
SEC="ntlmsspi"
|
||||
|
||||
# - uid/guid of the user at fielserver
|
||||
# -
|
||||
_UID="$(id -u)"
|
||||
_GID="$(id -g)"
|
||||
|
||||
|
||||
# Logfile to see what happened..
|
||||
#
|
||||
_logfile=/tmp/profile_${USER}.log
|
||||
|
||||
|
||||
echo "" > $_logfile
|
||||
echo "$(date +"%Y-%m-%d-%H%M")" >> $_logfile
|
||||
|
||||
# Network present
|
||||
#
|
||||
_network=false
|
||||
|
||||
if [ "X$_addr" = "X" ] ; then
|
||||
echo "no inet address assigned yet.." >> $_logfile
|
||||
declare -i count=1
|
||||
while ! $_network && [[ $count -lt 5 ]] ; do
|
||||
echo "sleeping 2 seconds.." >> $_logfile
|
||||
sleep 2
|
||||
_addr="$(hostname --ip-address)"
|
||||
if [ "X$_addr" != "X" ] ; then
|
||||
_network=true
|
||||
echo "inet address present: $_addr" >> $_logfile
|
||||
fi
|
||||
((count++))
|
||||
done
|
||||
fi
|
||||
|
||||
for dir in $(ls /mnt/$USER) ; do
|
||||
MOUNT_POINT=/mnt/$USER/$dir
|
||||
SHARE=$dir
|
||||
|
||||
[ ! -d $MOUNT_POINT ] && continue
|
||||
|
||||
if ! mount | grep $MOUNT_POINT > /dev/null ; then
|
||||
echo "Going to mount share '${SHARE}' .." >> $_logfile
|
||||
if [ -x /usr/bin/smb4k_mount ]; then
|
||||
## - Ubuntu <= 12.04
|
||||
if [[ "$VERSION" = "1.0" ]]; then
|
||||
sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,vers=1.0 \
|
||||
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
|
||||
else
|
||||
#sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$_UID,gid=$_GID,vers=$VERSION \
|
||||
sudo /usr/bin/smb4k_mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$_UID,gid=$_GID \
|
||||
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
|
||||
fi
|
||||
else
|
||||
## - Ubuntu Version >= 14.04
|
||||
if [[ "$VERSION" = "1.0" ]]; then
|
||||
sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,cifsacl,vers=1.0 \
|
||||
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
|
||||
else
|
||||
#sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,cifsacl,uid=$USER,sec=${SEC},vers=$VERSION \
|
||||
sudo /bin/mount -o user=$USER,password=$PASSWORD,iocharset=utf8,uid=$USER,gid=$_GID \
|
||||
-n -t cifs //$SERVER/$SHARE $MOUNT_POINT >> $_logfile 2>&1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "mount point $MOUNT_POINT already exists. nothing left to do.." >> $_logfile
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
@ -37,10 +37,14 @@ set incsearch " Incremental search
|
||||
set t_Co=256 " To enable 256 colors in vim, put this your .vimrc before setting the colorscheme
|
||||
|
||||
" einrueckung
|
||||
"set noexpandtab
|
||||
set expandtab
|
||||
set shiftwidth=3
|
||||
set tabstop=3
|
||||
set softtabstop=3
|
||||
" Round indent to multiple of 'shiftwidth' for > and < commands
|
||||
set shiftround
|
||||
"set number
|
||||
|
||||
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
|
||||
" let &guioptions = substitute(&guioptions, "t", "", "g")
|
||||
@ -171,3 +175,7 @@ set statusline=\ %F\ %(\|\ flags:\ %R%M%H%W\ %)%(\|\ type:\ %Y\ %)%(\|\ format:\
|
||||
set laststatus=2
|
||||
highlight StatusLine cterm=none ctermfg=white ctermbg=blue
|
||||
|
||||
"Remove all trailing whitespace by pressing F5
|
||||
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
|
||||
|
||||
colorscheme PaperColor
|
||||
|
Reference in New Issue
Block a user