blob: fd45c443c12653b79b682517617d9af849547128 (
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
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
61
|
#!/bin/sh
create_bootcfg() {
cat << FOO > /mnt/boot/boot.cfg
default 0
timeout 2
showmenu 1
title OpenADK
kernel (wd0,0)/boot/kernel
args root=/dev/sda1
title USB
kernel (usb0,0)/boot/kernel
args root=/dev/sdc1
FOO
}
disk_install() {
mke2fs -q -j /dev/sda1
sync
sleep 2
mount -t ext4 /dev/sda1 /mnt
tar xzvf /lemote-yeelong-eglibc-archive+kernel.tar.gz -C /mnt
test -x /mnt/usr/bin/sudo && chmod u+s /mnt/usr/bin/sudo
test -x /mnt/usr/bin/Xorg && chmod u+s /mnt/usr/bin/Xorg
create_bootcfg
umount /mnt
}
. /etc/functions.sh
echo 0 > /proc/sys/kernel/printk
load_modules /etc/modules
for f in /etc/modules.d/*; do
[[ -e $f ]] && load_modules /etc/modules.d/*
break
done
echo " ___ _ ____ _ __ "
echo " / _ \ _ __ ___ _ __ / \ | _ \| |/ / "
echo "| | | | '_ \ / _ \ '_ \ / _ \ | | | | ' / "
echo "| |_| | |_) | __/ | | |/ ___ \| |_| | . \ "
echo " \___/| .__/ \___|_| |_/_/ \_\____/|_|\_\ "
echo " |_| "
echo ""
# settle down, after module load
sleep 2
echo "Should I install OpenADK to disk (y/n)"
read answer
if [ "$answer" = "y" ];then
disk_install
fi
echo "Should I reboot now (y/n)"
read answer
if [ "$answer" = "y" ];then
reboot
else
exit
fi
|