summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-files/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/base-files/base-files')
-rw-r--r--meta/recipes-core/base-files/base-files/filesystems8
-rw-r--r--meta/recipes-core/base-files/base-files/fstab2
-rw-r--r--meta/recipes-core/base-files/base-files/hosts8
-rw-r--r--meta/recipes-core/base-files/base-files/inputrc61
-rw-r--r--meta/recipes-core/base-files/base-files/profile72
-rw-r--r--meta/recipes-core/base-files/base-files/share/dot.profile3
-rw-r--r--meta/recipes-core/base-files/base-files/usbd0
7 files changed, 62 insertions, 92 deletions
diff --git a/meta/recipes-core/base-files/base-files/filesystems b/meta/recipes-core/base-files/base-files/filesystems
deleted file mode 100644
index 7e6c41c38f..0000000000
--- a/meta/recipes-core/base-files/base-files/filesystems
+++ /dev/null
@@ -1,8 +0,0 @@
-ext4
-ext3
-ext2
-vfat
-fat
-btrfs
-minix
-*
diff --git a/meta/recipes-core/base-files/base-files/fstab b/meta/recipes-core/base-files/base-files/fstab
index d79a01602f..70e400f567 100644
--- a/meta/recipes-core/base-files/base-files/fstab
+++ b/meta/recipes-core/base-files/base-files/fstab
@@ -2,7 +2,7 @@
/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
-devpts /dev/pts devpts mode=0620,gid=5 0 0
+devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
diff --git a/meta/recipes-core/base-files/base-files/hosts b/meta/recipes-core/base-files/base-files/hosts
new file mode 100644
index 0000000000..b94f414d5c
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/hosts
@@ -0,0 +1,8 @@
+127.0.0.1 localhost.localdomain localhost
+
+# The following lines are desirable for IPv6 capable hosts
+::1 localhost ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
diff --git a/meta/recipes-core/base-files/base-files/inputrc b/meta/recipes-core/base-files/base-files/inputrc
deleted file mode 100644
index b5c4c8af24..0000000000
--- a/meta/recipes-core/base-files/base-files/inputrc
+++ /dev/null
@@ -1,61 +0,0 @@
-# /etc/inputrc - global inputrc for libreadline
-# See readline(3readline) and `info rluserman' for more information.
-
-# Be 8 bit clean.
-set input-meta on
-set output-meta on
-
-# To allow the use of 8bit-characters like the german umlauts, comment out
-# the line below. However this makes the meta key not work as a meta key,
-# which is annoying to those which don't need to type in 8-bit characters.
-
-# set convert-meta off
-
-# try to enable the application keypad when it is called. Some systems
-# need this to enable the arrow keys.
-# set enable-keypad on
-
-# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
-
-# do not bell on tab-completion
-# set bell-style none
-
-# some defaults / modifications for the emacs mode
-$if mode=emacs
-
-# allow the use of the Home/End keys
-# "\e[1~": beginning-of-line
-# "\e[4~": end-of-line
-
-# allow the use of the Delete/Insert keys
-# "\e[3~": delete-char
-# "\e[2~": quoted-insert
-
-# mappings for "page up" and "page down" to step to the beginning/end
-# of the history
-# "\e[5~": beginning-of-history
-# "\e[6~": end-of-history
-
-# alternate mappings for "page up" and "page down" to search the history
-# "\e[5~": history-search-backward
-# "\e[6~": history-search-forward
-
-# # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
-# "\e[5C": forward-word
-# "\e[5D": backward-word
-# "\e\e[C": forward-word
-# "\e\e[D": backward-word
-
-# $if term=rxvt
-# "\e[8~": end-of-line
-# $endif
-
-# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
-# "\eOH": beginning-of-line
-# "\eOF": end-of-line
-
-# for freebsd console
-# "\e[H": beginning-of-line
-# "\e[F": end-of-line
-
-$endif
diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index 53c2680409..cc37e1ba77 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -2,35 +2,65 @@
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
PATH="/usr/local/bin:/usr/bin:/bin"
-EDITOR="vi" # needed for packages like cron, git-commit
-test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc.
+[ "$TERM" ] || TERM="vt100" # Basic terminal capab. For screen etc.
-if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then
- TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html
- # for an explanation of how to set this to your local timezone.
- export TZ
-fi
+# Add /sbin & co to $PATH for the root user
+[ "$HOME" != "ROOTHOME" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
-if [ "$HOME" = "ROOTHOME" ]; then
- PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
-fi
-if [ "$PS1" ]; then
-# works for bash and ash (no other shells known to be in use here)
- PS1='\u@\h:\w\$ '
-fi
+# Set the prompt for bash and ash (no other shells known to be in use here)
+[ -z "$PS1" ] || PS1='\u@\h:\w\$ '
if [ -d /etc/profile.d ]; then
- for i in /etc/profile.d/* ; do
- . $i
- done
- unset i
+ for i in /etc/profile.d/*.sh; do
+ if [ -f $i -a -r $i ]; then
+ . $i
+ fi
+ done
+ unset i
fi
-if [ -x /usr/bin/resize ];then
- /usr/bin/resize >/dev/null
+if [ -t 0 -a $# -eq 0 ]; then
+ if [ ! -x @BINDIR@/resize ] ; then
+ if [ -n "$BASH_VERSION" ] ; then
+# Optimized resize funciton for bash
+resize() {
+ local x y
+ IFS='[;' read -t 2 -p $(printf '\e7\e[r\e[999;999H\e[6n\e8') -sd R _ y x _
+ [ -n "$y" ] && \
+ echo -e "COLUMNS=$x;\nLINES=$y;\nexport COLUMNS LINES;" && \
+ stty cols $x rows $y
+}
+ else
+# Portable resize function for ash/bash/dash/ksh
+# with subshell to avoid local variables
+resize() {
+ (o=$(stty -g)
+ stty -echo raw min 0 time 2
+ printf '\0337\033[r\033[999;999H\033[6n\0338'
+ if echo R | read -d R x 2> /dev/null; then
+ IFS='[;R' read -t 2 -d R -r z y x _
+ else
+ IFS='[;R' read -r _ y x _
+ fi
+ stty "$o"
+ [ -z "$y" ] && y=${z##*[}&&x=${y##*;}&&y=${y%%;*}
+ [ -n "$y" ] && \
+ echo "COLUMNS=$x;"&&echo "LINES=$y;"&&echo "export COLUMNS LINES;"&& \
+ stty cols $x rows $y)
+}
+ fi
+ fi
+ # Use the EDITOR not being set as a trigger to call resize
+ # and only do this for /dev/tty[A-z] which are typically
+ # serial ports
+ if [ -z "$EDITOR" -a "$SHLVL" = 1 ] ; then
+ case $(tty 2>/dev/null) in
+ /dev/tty[A-z]*) resize >/dev/null;;
+ esac
+ fi
fi
+EDITOR="vi" # needed for packages like cron, git-commit
export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
umask 022
-
diff --git a/meta/recipes-core/base-files/base-files/share/dot.profile b/meta/recipes-core/base-files/base-files/share/dot.profile
index 979793e8b5..a87316077c 100644
--- a/meta/recipes-core/base-files/base-files/share/dot.profile
+++ b/meta/recipes-core/base-files/base-files/share/dot.profile
@@ -7,4 +7,5 @@ fi
# path set by /etc/profile
# export PATH
-mesg n
+# Might fail after "su - myuser" when /dev/tty* is not writable by "myuser".
+mesg n 2>/dev/null
diff --git a/meta/recipes-core/base-files/base-files/usbd b/meta/recipes-core/base-files/base-files/usbd
deleted file mode 100644
index e69de29bb2..0000000000
--- a/meta/recipes-core/base-files/base-files/usbd
+++ /dev/null