-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmenu
55 lines (51 loc) · 1.09 KB
/
menu
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
#!/bin/bash
###########################################################
# Simple Startup Menu
#
# Waits up to 10 seconds before choosing default action
# User can select by entering option # with ENTER
#
###########################################################
wait=25
hostname=`hostname|tr '[:lower:]' '[:upper:]'`
cat <<EOF
Raspberry Pi Boot Menu - Host: [$hostname]
============================================
1) LXDE Desktop
2) XMBC Media Center
3) Root Command Line
4) Command Line
============================================
You have $wait Seconds to choose...
EOF
echo -n "Please Select (1,2,3,4) [3]: "
read -t $wait inp
echo
case "$inp" in
1)
echo "Starting LXDE Desktop"
echo
/usr/bin/startx
exit 1
;;
2)
echo "Starting XBMC"
echo
sudo /usr/lib/xbmc/xbmc.bin &
exit 1
;;
4)
echo "Command Line Only"
echo
exit 1
;;
*)
echo "Executing Root Sudo"
echo
sudo su -
exit 1
;;
esac
###########################################################
# End of Script
###########################################################