93 lines
2.8 KiB
Bash
93 lines
2.8 KiB
Bash
#!/bin/bash
|
||
# SPDX-Version: 3.0
|
||
# SPDX-CreationInfo: 2025-05-05; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||
# SPDX-ExternalRef: GIT https://git.coresecret.dev/msw/CISS.debian.live.builder.git
|
||
# SPDX-FileContributor: WEIDNER, Marc S.; Centurion Intelligence Consulting Agency
|
||
# SPDX-FileCopyrightText: 2024–2025; WEIDNER, Marc S.; <msw@coresecret.dev>
|
||
# SPDX-FileType: SOURCE
|
||
# SPDX-License-Identifier: EUPL-1.2 OR LicenseRef-CCLA-1.0
|
||
# SPDX-LicenseComment: This file is part of the CISS.debian.installer.secure framework.
|
||
# SPDX-PackageName: CISS.debian.live.builder
|
||
# SPDX-Security-Contact: security@coresecret.eu
|
||
|
||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||
|
||
# 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
|
||
|
||
# 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 l='ls $LS_OPTIONS -lA'
|
||
#
|
||
# Some more alias to avoid making mistakes:
|
||
# alias rm='rm -i'
|
||
# alias cp='cp -i'
|
||
# alias mv='mv -i'
|
||
|
||
[[ $- != *i* ]] && return
|
||
|
||
trap ' "${SHELL}" /root/.ciss/clean_logout.sh ' 0
|
||
source /root/.ciss/alias
|
||
source /root/.ciss/shortcuts
|
||
source /root/.ciss/scan_libwrap
|
||
|
||
### History
|
||
touch /tmp/.bash_history
|
||
chmod 0660 /tmp/.bash_history
|
||
chown root:root /tmp/.bash_history
|
||
export HISTFILE=/tmp/.bash_history
|
||
export HISTSIZE=2048
|
||
export HISTFILESIZE=2048
|
||
shopt -s histappend
|
||
|
||
### Define colors for bash prompt
|
||
export CRED='\033[1;91m'
|
||
export CGRE='\033[1;92m'
|
||
export CYEL='\033[1;93m'
|
||
export CBLU='\033[1;94m'
|
||
export CMAG='\033[1;95m'
|
||
export CCYA='\033[1;96m'
|
||
export CWHI='\033[1;97m'
|
||
export CRES='\033[0m'
|
||
|
||
#if [[ "${UID}" -eq 0 ]]; then
|
||
# export user_color="${CRED}"
|
||
#else
|
||
# export user_color="${CGRE}"
|
||
#fi
|
||
|
||
### Define bash colorful prompt
|
||
# PS1="${user_color}\d${CRES}|${user_color}\u${CRES}@${CMAG}\h${CRES}:${CCYA}\w${CRES}/>>\$(if [[ \$? -eq 0 ]]; then echo -e \"${CGRE}\$?${CRES}\"; else echo -e \"${CRED}\$?${CRES}\"; fi)|~\$ "
|
||
PS1="\
|
||
\[\033[1;91m\]\d\[\033[0m\]|\[\033[1;91m\]\u\[\033[0m\]@\
|
||
\[\033[1;95m\]\h\[\033[0m\]:\
|
||
\[\033[1;96m\]\w\[\033[0m\]/>>\
|
||
\$(if [[ \$? -eq 0 ]]; then \
|
||
# Show exit status in green if zero
|
||
echo -e \"\[\033[1;92m\]\$?\[\033[0m\]\"; \
|
||
else \
|
||
# Show exit status in red otherwise
|
||
echo -e \"\[\033[1;91m\]\$?\[\033[0m\]\"; \
|
||
fi)\
|
||
|~\$ "
|
||
|
||
### Overwrite Protection
|
||
set -o noclobber
|
||
alias cp="cp -iv"
|
||
alias mv='mv -iv'
|
||
alias rm='rm -iv'
|
||
|
||
# Welcome message after login
|
||
printf "\n"
|
||
printf "\e[91m🔐 Coresecret Channel Established. \e[0m\n"
|
||
printf "\e[92m✅ Welcome back\e[0m"; printf "\e[95m '%s' \e[0m" "${USER}"; printf "\e[92m! Type\e[0m"; printf "\e[95m 'celp'\e[0m"; printf "\e[92m for shortcuts. \e[0m\n"
|
||
printf "\n"
|
||
printf "\n"
|
||
|
||
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh
|