slitaz-arm annotate 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 |
rev | line source |
---|---|
pankso@67 | 1 #!/bin/sh |
pankso@67 | 2 # |
pankso@67 | 3 # /etc/init.d/system.sh : SliTaz ARM hardware configuration |
pankso@67 | 4 # |
pankso@67 | 5 # This script configures the sound card and screen. It also configures |
pankso@67 | 6 # system language, keyboard and TZ. |
pankso@67 | 7 # |
pankso@67 | 8 . /etc/init.d/rc.functions |
pankso@67 | 9 . /etc/rcS.conf |
pankso@67 | 10 |
pankso@67 | 11 # Activate swap partition |
pankso@67 | 12 if fgrep -q "swap" /etc/fstab; then |
pankso@67 | 13 swapon -a |
pankso@67 | 14 fi |
pankso@67 | 15 |
pankso@67 | 16 # Sound configuration: restore or init |
pankso@67 | 17 if [ -d /proc/asound ]; then |
pankso@67 | 18 if [ -s /var/lib/alsa/asound.state ]; then |
pankso@67 | 19 echo -n "Restoring sound configuration..." |
pankso@67 | 20 alsactl restore; status |
pankso@67 | 21 else |
pankso@67 | 22 echo -n "Initializing sound card..." |
pankso@67 | 23 alsactl init |
pankso@67 | 24 fi |
pankso@67 | 25 fi |
pankso@67 | 26 |
pankso@67 | 27 # Locale config |
pankso@67 | 28 [ -s "/etc/locale.conf" ] || echo "LANG=C" > /etc/locale.conf |
pankso@67 | 29 . /etc/locale.conf |
pankso@67 | 30 echo -n "Setting system locale: $LANG" |
pankso@67 | 31 export LC_ALL=${LANG}; status |
pankso@67 | 32 |
pankso@67 | 33 # Keymap config |
pankso@67 | 34 [ -s "/etc/keymap.conf" ] || echo "us" > /etc/keymap.conf |
pankso@67 | 35 kmap=$(cat /etc/keymap.conf) |
pankso@67 | 36 echo -n "Loading console keymap: $kmap" |
pankso@67 | 37 tazkeymap $kmap >/dev/null; status |
pankso@67 | 38 |
pankso@67 | 39 # Timezone config |
pankso@67 | 40 [ -s "/etc/TZ" ] || echo "UTC" > /etc/TZ |
pankso@67 | 41 tz=$(cat /etc/TZ) |
pankso@67 | 42 echo -n "Setting time zone to: $tz" |
pankso@67 | 43 export TZ=${tz}; status |
pankso@67 | 44 |
pankso@67 | 45 # Xorg configuration: $HOME is not yet set |
pankso@67 | 46 if [ ! -s /etc/X11/xorg.conf ] && [ -x /usr/bin/Xorg ]; then |
pankso@67 | 47 echo "Configuring Xorg server..." && HOME="/root" |
pankso@67 | 48 tazx config-xorg 2>/var/log/xorg.configure.log |
pankso@67 | 49 fi |