Rename xbps-base-dirs to xbps-base-files.
Install some default configuation files by default, based on Fedora and Archlinux. --HG-- extra : convert_revision : 28a0ac3594338bbd761c8c68559d09d8e9aec54d
This commit is contained in:
40
templates/xbps-base-files/files/colorls.sh
Normal file
40
templates/xbps-base-files/files/colorls.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
# color-ls initialization
|
||||
|
||||
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
|
||||
if [ -z "$USER_LS_COLORS" ]; then
|
||||
|
||||
alias ll='ls -l' 2>/dev/null
|
||||
alias l.='ls -d .*' 2>/dev/null
|
||||
|
||||
|
||||
# Skip the rest for noninteractive shells.
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
COLORS=
|
||||
|
||||
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
|
||||
"$HOME/.dir_colors" "$HOME/.dircolors"; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
if [ -z "$COLORS" ]; then
|
||||
for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
fi
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
||||
eval `dircolors --sh "$COLORS" 2>/dev/null`
|
||||
[ -z "$LS_COLORS" ] && return
|
||||
egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
alias ll='ls -l --color=auto' 2>/dev/null
|
||||
alias l.='ls -d .* --color=auto' 2>/dev/null
|
||||
alias ls='ls --color=auto' 2>/dev/null
|
||||
2
templates/xbps-base-files/files/dot_bash_logout
Normal file
2
templates/xbps-base-files/files/dot_bash_logout
Normal file
@@ -0,0 +1,2 @@
|
||||
# ~/.bash_logout
|
||||
|
||||
13
templates/xbps-base-files/files/dot_bash_profile
Normal file
13
templates/xbps-base-files/files/dot_bash_profile
Normal file
@@ -0,0 +1,13 @@
|
||||
# .bash_profile
|
||||
|
||||
# Get the aliases and functions
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
|
||||
# User specific environment and startup programs
|
||||
|
||||
PATH=$PATH:$HOME/bin
|
||||
PS1="[\u@\h \W]$ "
|
||||
|
||||
export PATH PS1
|
||||
8
templates/xbps-base-files/files/dot_bashrc
Normal file
8
templates/xbps-base-files/files/dot_bashrc
Normal file
@@ -0,0 +1,8 @@
|
||||
# .bashrc
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
# User specific aliases and functions
|
||||
8
templates/xbps-base-files/files/host.conf
Normal file
8
templates/xbps-base-files/files/host.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# /etc/host.conf
|
||||
#
|
||||
|
||||
order hosts,bind
|
||||
multi on
|
||||
|
||||
# End of file
|
||||
8
templates/xbps-base-files/files/hosts
Normal file
8
templates/xbps-base-files/files/hosts
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# /etc/hosts: static lookup table for host names
|
||||
#
|
||||
|
||||
#<ip-address> <hostname.domain.org> <hostname>
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
|
||||
# End of file
|
||||
60
templates/xbps-base-files/files/profile
Normal file
60
templates/xbps-base-files/files/profile
Normal file
@@ -0,0 +1,60 @@
|
||||
# /etc/profile
|
||||
|
||||
# System wide environment and startup programs, for login setup
|
||||
# Functions and aliases go in /etc/bashrc
|
||||
|
||||
pathmunge () {
|
||||
if ! echo $PATH | /usr/bin/egrep -q "(^|:)$1($|:)" ; then
|
||||
if [ "$2" = "after" ] ; then
|
||||
PATH=$PATH:$1
|
||||
else
|
||||
PATH=$1:$PATH
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# ksh workaround
|
||||
if [ -z "$EUID" -a -x /bin/id ]; then
|
||||
EUID=`id -u`
|
||||
UID=`id -ru`
|
||||
fi
|
||||
|
||||
# Path manipulation
|
||||
if [ "$EUID" = "0" ]; then
|
||||
pathmunge /sbin
|
||||
pathmunge /usr/sbin
|
||||
pathmunge /usr/local/sbin
|
||||
else
|
||||
pathmunge /usr/local/sbin after
|
||||
pathmunge /usr/sbin after
|
||||
pathmunge /sbin after
|
||||
fi
|
||||
|
||||
# No core files by default
|
||||
ulimit -S -c 0 > /dev/null 2>&1
|
||||
|
||||
if [ -x /bin/id ]; then
|
||||
USER="`id -un`"
|
||||
LOGNAME=$USER
|
||||
MAIL="/var/spool/mail/$USER"
|
||||
fi
|
||||
|
||||
HOSTNAME=`/bin/hostname 2>/dev/null`
|
||||
HISTSIZE=1000
|
||||
|
||||
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE
|
||||
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
if [ "$PS1" ]; then
|
||||
. $i
|
||||
else
|
||||
. $i >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
export PATH
|
||||
|
||||
unset i
|
||||
unset pathmunge
|
||||
23
templates/xbps-base-files/files/securetty
Normal file
23
templates/xbps-base-files/files/securetty
Normal file
@@ -0,0 +1,23 @@
|
||||
console
|
||||
vc/1
|
||||
vc/2
|
||||
vc/3
|
||||
vc/4
|
||||
vc/5
|
||||
vc/6
|
||||
vc/7
|
||||
vc/8
|
||||
vc/9
|
||||
vc/10
|
||||
vc/11
|
||||
tty1
|
||||
tty2
|
||||
tty3
|
||||
tty4
|
||||
tty5
|
||||
tty6
|
||||
tty7
|
||||
tty8
|
||||
tty9
|
||||
tty10
|
||||
tty11
|
||||
5
templates/xbps-base-files/files/usb-load-ehci-first
Normal file
5
templates/xbps-base-files/files/usb-load-ehci-first
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# Load the EHCI driver before OHCI or UHCI, to avoid a warning.
|
||||
#
|
||||
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install ohci_hcd $CMDLINE_OPTS
|
||||
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install uhci_hcd $CMDLINE_OPTS
|
||||
6
templates/xbps-base-files/files/vim.sh
Normal file
6
templates/xbps-base-files/files/vim.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
|
||||
[ -x //usr/bin/id ] || return
|
||||
[ `//usr/bin/id -u` -le 100 ] && return
|
||||
# for bash and zsh, only if no alias is already set
|
||||
alias vi >/dev/null 2>&1 || alias vi=vim
|
||||
fi
|
||||
4
templates/xbps-base-files/files/which2.sh
Normal file
4
templates/xbps-base-files/files/which2.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Initialization script for bash and sh
|
||||
|
||||
# export AFS if you are in AFS environment
|
||||
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
|
||||
Reference in New Issue
Block a user