slitaz-arm diff rootfs/etc/init.d/system.sh @ rev 67
Bunch of changes to prepare an official release
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Mar 17 01:27:41 2014 +0100 (2014-03-17) |
parents | |
children | e4d89b2237c7 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/rootfs/etc/init.d/system.sh Mon Mar 17 01:27:41 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# /etc/init.d/system.sh : SliTaz ARM hardware configuration 1.7 +# 1.8 +# This script configures the sound card and screen. It also configures 1.9 +# system language, keyboard and TZ. 1.10 +# 1.11 +. /etc/init.d/rc.functions 1.12 +. /etc/rcS.conf 1.13 + 1.14 +# Activate swap partition 1.15 +if fgrep -q "swap" /etc/fstab; then 1.16 + swapon -a 1.17 +fi 1.18 + 1.19 +# Sound configuration: restore or init 1.20 +if [ -d /proc/asound ]; then 1.21 + if [ -s /var/lib/alsa/asound.state ]; then 1.22 + echo -n "Restoring sound configuration..." 1.23 + alsactl restore; status 1.24 + else 1.25 + echo -n "Initializing sound card..." 1.26 + alsactl init 1.27 + fi 1.28 +fi 1.29 + 1.30 +# Locale config 1.31 +[ -s "/etc/locale.conf" ] || echo "LANG=C" > /etc/locale.conf 1.32 +. /etc/locale.conf 1.33 +echo -n "Setting system locale: $LANG" 1.34 +export LC_ALL=${LANG}; status 1.35 + 1.36 +# Keymap config 1.37 +[ -s "/etc/keymap.conf" ] || echo "us" > /etc/keymap.conf 1.38 +kmap=$(cat /etc/keymap.conf) 1.39 +echo -n "Loading console keymap: $kmap" 1.40 +tazkeymap $kmap >/dev/null; status 1.41 + 1.42 +# Timezone config 1.43 +[ -s "/etc/TZ" ] || echo "UTC" > /etc/TZ 1.44 +tz=$(cat /etc/TZ) 1.45 +echo -n "Setting time zone to: $tz" 1.46 +export TZ=${tz}; status 1.47 + 1.48 +# Xorg configuration: $HOME is not yet set 1.49 +if [ ! -s /etc/X11/xorg.conf ] && [ -x /usr/bin/Xorg ]; then 1.50 + echo "Configuring Xorg server..." && HOME="/root" 1.51 + tazx config-xorg 2>/var/log/xorg.configure.log 1.52 +fi