1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
4 # T2 SDE: package/*/arcload/stone_mod_arcload.sh
5 # Copyright (C) 2004 - 2021 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; version 2 of the License. A copy of the
12 # GNU General Public License can be found in the file COPYING.
13 # --- T2-COPYRIGHT-NOTE-END ---
15 # [MAIN] 70 arcload Arcload Setup
19 dvhtool
-d "${bootdev%[0-9]*}" --unix-to-vh /boot
/arcload sash64
22 create_kernel_list
() {
24 for x
in `(cd /boot/; ls vmlinux-*) | sort -r`; do
25 if [ $first = 1 ]; then
28 label
=t2sde-
${x/vmlinux-/}
33 image system "$bootpath/$x";
34 #initrd system "$bootpath/initrd-${ver}";
35 append "root=$rootdev";
41 create_arcload_conf
() {
42 create_kernel_list
> $bootpath/arc.cf
44 gui_message
"This is the new $bootpath/arc.cf file:
46 $(< $bootpath/arc.cf)"
50 local dev
="`sed -n "s
,\
([^
]*\
) $1 .
*,\
1,p
" /etc/fstab | tail -n 1`"
51 if [ ! "$dev" ]; then # try the higher dentry
52 local try
="`dirname $1`"
53 dev
="`grep \" $try \" /etc/fstab | tail -n 1 | \
56 if [ -h "$dev" ]; then
57 echo "/dev/`readlink $dev`"
66 dir
="`dirname $dir`/`readlink $dir`"
67 dir
="`echo $dir | sed 's,[^/]*/\.\./,,g'`"
73 bootdev
="`device4 /boot`"
75 [ "$rootdev" = "$bootdev" ] && bootpath
="/boot"
77 if [ ! -f $bootpath/arc.cf
]; then
78 if gui_yesno
"Arcload does not appear to be configured.
79 Automatically configure Arcload now?"; then
80 create_arcload_conf
&& install_arcload
86 gui_menu arcload
'Arcload Setup' \
87 "Following settings only for expert use: (default)" "" \
88 "Root Device ........... $rootdev" "" \
89 "Boot Device ........... $bootdev" "" \
91 "(Re-)Create default $bootpath/arc.cf" 'create_arcload_conf' \
92 '(Re-)Install Arcload into the VH' 'install_arcload' \
94 "Edit $bootpath/arc.cf (Config file)" \
95 "gui_edit 'Arcload Configuration' $bootpath/arc.cf"