blob: 34f1d9cbb90e65e031632755c240d9d0b1a1f723 (
plain)
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
|
#!/bin/sh
#
# 03-boot.bash
# startup scripts for systems
#
# run startup script if tty
# for dingo
if [[ $TERM == 'linux' && $(hostname) == 'dingo' ]]; then
cat ~/bin/house.txt
printf "\n${CYAN}Welcome back Bryson :)\n\n"
USAGE="${blue}\td:start-docked\n\tn:start-not-docked\n\tq:shutdown\n\tr:reboot\n\tb:bash\n\n${NC}"
printf "${LGREEN}What should dingo do?\n"
printf "%b" $USAGE
while read -rs -N 1 key; do
case $key in
d) startx ;;
n) nstartx.sh ;;
q) echo "Are you sure you want to shutdown? (y/n)";
read -rs -N 1 key2; case $key2 in y) shutdown now ;; esac; ;;
r) echo "Are you sure you want to reboot? (y/n)";
read -rs -N 1 key3; case $key3 in y) reboot ;; esac; ;;
b) break ;;
[h?]) echo "$USAGE";;
esac
printf "${LGREEN}What should dingo do now?\n"
printf "%b" $USAGE
done
fi
|