-
Notifications
You must be signed in to change notification settings - Fork 1
/
udoo-config.sh
executable file
·60 lines (45 loc) · 985 Bytes
/
udoo-config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
####################
#
# UDOO Config Main
#
####################
## Ettore Chimenti @ 2014/04
TITLE="UDOO Configuration Tool"
D="zenity"
PRINTENV="fw_printenv"
SETENV="fw_setenv"
NTPDATE="ntpdate-debian"
CHKCONF="chkconfig"
UDOO_USER="ubuntu"
MMC="/dev/mmcblk0"
PART="/dev/mmcblk0p1"
SRCFILE="udoo-defaultenv.src"
INSSERV="/usr/lib/insserv/insserv"
ZONETIME="/etc/timezone"
ZONEFILE="/etc/localtime"
ZONEINFO="/usr/share/zoneinfo/"
KBD_DEFAULT="/etc/default/keyboard"
KBD_RULES="/usr/share/X11/xkb/rules/xorg.lst"
DIR="$( cd "$( dirname "$(readlink ${BASH_SOURCE[0]})" )" && pwd )"
[[ -f /etc/udoo-config.conf ]] && . /etc/udoo-config.conf
source $DIR/udoo-functions.sh
if [ $(id -u) -ne 0 ]
then
error "You're not root! Try execute: sudo udoo-config.sh" 2
fi
if [[ 0 -lt $# ]]
then
COMMAND=$1
shift
$COMMAND $@
E_CODE=$?
case $E_CODE in
127) usage ;;
*);;
esac
exit $E_CODE
else
exec $DIR/udoo-config-zenity.sh
exit $?
fi