From d810b7d3c175640895850344eeb30e928b673427 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 4 Oct 2006 21:53:37 +0000 Subject: set keymap correctly in non-UTF8 locale (#167363) separate tmpfs-usage for stateless from readonly-root (requested by OLPC) --- rc.d/rc.sysinit | 10 +++++++--- sysconfig/readonly-root | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 60ae01a3..453b11fd 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -376,7 +376,11 @@ if [ -x /bin/loadkeys ]; then else echo -n $"Loading default keymap: " fi - loadkeys -u $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \ + LOADKEYS=loadkeys + if [ "${LANG}" != "${LANG%%.UTF-8}" -o "${LANG}" != "${LANG%%.utf8}" ]; then + LOADKEYS="loadkeys -u" + fi + $LOADKEYS $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \ success $"Loading default keymap" || failure $"Loading default keymap" echo fi @@ -490,7 +494,7 @@ if strstr "$cmdline" noreadonlyroot ; then READONLY=no fi -if [ "$READONLY" = "yes" ]; then +if [ "$READONLY" = "yes" -o "$TEMPORARY_STATE" = "yes" ]; then mount_empty() { if [ -e "$1" ]; then @@ -582,7 +586,7 @@ if [ "$READONLY" = "yes" ]; then /bin/true elif [ x$state_mount_dev != x ] && mount $state_mount_dev $mountopts "$STATE_MOUNT" > /dev/null 2>&1; then /bin/true - else + elif [ -n "$CLIENTSTATE" ]; then # No local storage was found. Make a final attempt to find # state on an NFS server. diff --git a/sysconfig/readonly-root b/sysconfig/readonly-root index cec9550d..6407c07e 100644 --- a/sysconfig/readonly-root +++ b/sysconfig/readonly-root @@ -1,5 +1,8 @@ # Set to 'yes' to mount the system filesystems read-only. READONLY=no +# Set to 'yes' to mount various temporary state as either tmpfs +# or on the block device labelled RW_LABEL. Implied by READONLY +TEMPORARY_STATE=no # Place to put a tmpfs for temporary scratch writable space RW_MOUNT=/var/lib/stateless/writable # Label on local filesystem which can be used for temporary scratch space -- cgit v1.2.1