slitaz-arm view rootfs/etc/init.d/system.sh @ rev 100

Start Rpi GPIO + leds CGI plugin and improve tazberry
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 13 05:24:04 2014 +0200 (2014-04-13)
parents e4d89b2237c7
children 59d16a648604
line source
1 #!/bin/sh
2 #
3 # /etc/init.d/system.sh : SliTaz ARM hardware configuration
4 #
5 # This script configures the sound card and screen. It also configures
6 # system language, keyboard and TZ.
7 #
8 . /etc/init.d/rc.functions
9 . /etc/rcS.conf
11 # Activate swap partition
12 if fgrep -q "swap" /etc/fstab; then
13 swapon -a
14 fi
16 # Sound configuration: restore or init
17 if [ -d "/proc/asound" ] && [ -x "/usr/sbin/alsactl" ]; then
18 echo "Initializing sound card..."
19 alsactl init
20 fi
22 # Locale config
23 [ -s "/etc/locale.conf" ] || echo "LANG=C" > /etc/locale.conf
24 . /etc/locale.conf
25 echo -n "Setting system locale: $LANG"
26 export LC_ALL=${LANG}; status
28 # Keymap config
29 [ -s "/etc/keymap.conf" ] || echo "us" > /etc/keymap.conf
30 kmap=$(cat /etc/keymap.conf)
31 echo -n "Loading console keymap: $kmap"
32 tazkeymap $kmap >/dev/null; status
34 # Timezone config
35 [ -s "/etc/TZ" ] || echo "UTC" > /etc/TZ
36 tz=$(cat /etc/TZ)
37 echo -n "Setting time zone to: $tz"
38 export TZ=${tz}; status
40 # Xorg configuration: $HOME is not yet set
41 if [ ! -s "/etc/X11/xorg.conf" ] && [ -x "/usr/bin/Xorg" ]; then
42 echo "Configuring Xorg server..." && HOME="/root"
43 tazx config-xorg 2>/var/log/xorg.configure.log
44 fi