OSDN Git Service

enable optional logging
[instantos/instantARCH.git] / askadvanced.sh
1 #!/bin/bash
2
3 ############################################################################################
4 ## optional advanced options that allow more experienced users to customize their install ##
5 ############################################################################################
6
7 editautologin() {
8     if imenu -c "enable autologin ? "; then
9         iroot r noautologin
10     else
11         iroot noautologin 1
12         echo "disabling autologin"
13     fi
14 }
15
16 editplymouth() {
17     if imenu -c "enable plymouth ? "; then
18         iroot r noplymouth
19     else
20         iroot noplymouth 1
21         echo "disabling plymouth"
22     fi
23 }
24
25 choosekernel() {
26     KERNEL=$(echo "linux
27 linux-lts
28 default" | imenu -l "select kernel")
29
30     iroot kernel "$KERNEL"
31 }
32
33 chooselogs() {
34     if imenu -c "backup installation logs to ix.io ? (disabled by default)"; then
35         iroot logging 1
36     else
37         iroot r logging
38     fi
39 }
40
41 while :; do
42     CHOICE="$(echo 'autologin
43 plymouth
44 kernel
45 logging
46 OK' | imenu -l 'select option')"
47     case "$CHOICE" in
48     autolog*)
49         echo "editing autologin"
50         editautologin
51         ;;
52     plymouth)
53         editplymouth
54         ;;
55     kernel)
56         choosekernel
57         echo "selected $(iroot kernel) kernel"
58         ;;
59     logging)
60         chooselogs
61         ;;
62     OK)
63         echo "advanced options done"
64         exit
65         ;;
66     esac
67 done