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
|
||||
|
@ -1,57 +1,97 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# don't put duplicate lines in the history. See bash(1) for more options
|
||||
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
|
||||
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
|
||||
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
|
||||
# ... or force ignoredups and ignorespace
|
||||
export HISTCONTROL=ignoreboth
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# Note: PS1 and umask are already set in /etc/profile. You should not
|
||||
# need this unless you want different defaults for root.
|
||||
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
|
||||
# umask 022
|
||||
#export PS1='\h:\w \$ '
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
__hostname="$(hostname -f)"
|
||||
__hostname="${__hostname%.*}"
|
||||
__hostname="${__hostname%.*}"
|
||||
#export PS1='${__hostname}:\w \$ '
|
||||
export PS1='\[\033[01;32m\]${__hostname}\[\033[00m\]:\[\033[37m\]\w\[\033[00m\] \$ '
|
||||
umask 022
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@${__hostname}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@${__hostname}\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[32m\]\u@${__hostname}\[\033[00m\]:\[\033[37m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@${__hostname}:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# You may uncomment the following lines if you want `ls' to be colorized:
|
||||
export LS_OPTIONS='--color=auto'
|
||||
eval "`dircolors`"
|
||||
alias ls='ls $LS_OPTIONS'
|
||||
alias ll='ls $LS_OPTIONS -l'
|
||||
alias la='ls $LS_OPTIONS -al'
|
||||
alias l='ls $LS_OPTIONS -lA'
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias running_services='systemctl list-units --type=service --state=running'
|
||||
#alias grep='grep --color=auto'
|
||||
#alias fgrep='fgrep --color=auto'
|
||||
#alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# Some more alias to avoid making mistakes:
|
||||
#alias rm='rm -i'
|
||||
#alias cp='cp -i'
|
||||
#alias mv='mv -i'
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
|
||||
|
||||
alias poweroff='echo -e "\n\tplease use: /sbin/poweroff\n"'
|
||||
alias reboot='echo -e "\n\tplease use: /sbin/reboot\n"'
|
||||
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
@ -68,11 +108,11 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
export LINES=64
|
||||
|
||||
## - set beep more quiet
|
||||
## -
|
||||
#xset b 10 500 50
|
||||
|
||||
# turn off the beep (only in bash tab-complete ?)
|
||||
bind 'set bell-style none'
|
||||
|
@ -1,17 +1,24 @@
|
||||
# ~/.profile: executed by Bourne-compatible login shells.
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
if [ "$BASH" ]; then
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
if [ -d "$HOME/bin/admin-stuff" ] ; then
|
||||
PATH="$HOME/bin/admin-stuff:$PATH"
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# this is for the midnight-commander
|
||||
@ -22,4 +29,3 @@ if [[ -f /usr/share/mc/bin/mc.sh ]]; then
|
||||
source /usr/share/mc/bin/mc.sh
|
||||
fi
|
||||
|
||||
mesg n
|
||||
|
@ -1,54 +1,97 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# don't put duplicate lines in the history. See bash(1) for more options
|
||||
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
|
||||
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
|
||||
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
|
||||
# ... or force ignoredups and ignorespace
|
||||
export HISTCONTROL=ignoreboth
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# Note: PS1 and umask are already set in /etc/profile. You should not
|
||||
# need this unless you want different defaults for root.
|
||||
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
|
||||
# umask 022
|
||||
#export PS1='\h:\w \$ '
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
__hostname="$(hostname -f)"
|
||||
__hostname="${__hostname%.*}"
|
||||
__hostname="${__hostname%.*}"
|
||||
export PS1='${__hostname%.*}:\w \$ '
|
||||
umask 022
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@${__hostname}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@${__hostname}\[\033[00m\]:\[\033[01;32m\]\w\[\033[00m\]\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[32m\]\u@${__hostname}\[\033[00m\]:\[\033[37m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
#PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@${__hostname}:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# You may uncomment the following lines if you want `ls' to be colorized:
|
||||
export LS_OPTIONS='--color=auto'
|
||||
eval "`dircolors`"
|
||||
alias ls='ls $LS_OPTIONS'
|
||||
alias ll='ls $LS_OPTIONS -l'
|
||||
alias la='ls $LS_OPTIONS -al'
|
||||
alias l='ls $LS_OPTIONS -lA'
|
||||
#
|
||||
# Some more alias to avoid making mistakes:
|
||||
#alias rm='rm -i'
|
||||
#alias cp='cp -i'
|
||||
#alias mv='mv -i'
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
#alias grep='grep --color=auto'
|
||||
#alias fgrep='fgrep --color=auto'
|
||||
#alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
alias ....='cd ../../..'
|
||||
|
||||
|
||||
alias poweroff='echo -e "\n\tplease use: /sbin/poweroff\n"'
|
||||
alias reboot='echo -e "\n\tplease use: /sbin/reboot\n"'
|
||||
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
@ -65,11 +108,11 @@ if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
export LINES=64
|
||||
|
||||
## - set beep more quiet
|
||||
## -
|
||||
#xset b 10 500 50
|
||||
|
||||
# turn off the beep (only in bash tab-complete ?)
|
||||
bind 'set bell-style none'
|
||||
|
@ -175,4 +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