1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/arcload/stone_mod_arcload.sh
3 # Copyright (C) 2004 - 2025 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License version 2.
10 # --- T2-COPYRIGHT-NOTE-END ---
12 # [MAIN] 70 arcload Arcload Setup
16 dvhtool
-d "${bootdev%[0-9]*}" --unix-to-vh /boot
/arcload.ecoff sash
17 dvhtool
-d "${bootdev%[0-9]*}" --unix-to-vh /boot
/arcload sash64
20 create_kernel_list
() {
22 for x
in `(cd /boot/; ls vmlinux-*) | sort -Vr`; do
23 if [ $first = 1 ]; then
26 label
=t2sde-
${x/vmlinux-/}
31 image system "$bootpath/$x";
32 #initrd system "$bootpath/initrd-${ver}";
33 append "root=$rootdev";
39 create_arcload_conf
() {
40 create_kernel_list
> $bootpath/arc.cf
42 gui_message
"This is the new $bootpath/arc.cf file:
44 $(< $bootpath/arc.cf)"
48 local dev
="`sed -n "s
,\
([^
]*\
) $1 .
*,\
1,p
" /etc/fstab | tail -n 1`"
49 if [ ! "$dev" ]; then # try the higher dentry
50 local try
="`dirname $1`"
51 dev
="`grep \" $try \" /etc/fstab | tail -n 1 | \
54 if [ -h "$dev" ]; then
55 echo "/dev/`readlink $dev`"
64 dir
="`dirname $dir`/`readlink $dir`"
65 dir
="`echo $dir | sed 's,[^/]*/\.\./,,g'`"
71 bootdev
="`device4 /boot`"
73 [ "$rootdev" = "$bootdev" ] && bootpath
="/boot"
75 if [ ! -f $bootpath/arc.cf
]; then
76 if gui_yesno
"Arcload does not appear to be configured.
77 Automatically configure Arcload now?"; then
78 create_arcload_conf
&& install_arcload
84 gui_menu arcload
'Arcload Setup' \
85 "Following settings only for expert use: (default)" "" \
86 "Root Device ........... $rootdev" "" \
87 "Boot Device ........... $bootdev" "" \
89 "(Re-)Create default $bootpath/arc.cf" 'create_arcload_conf' \
90 '(Re-)Install Arcload into the VH' 'install_arcload' \
92 "Edit $bootpath/arc.cf (Config file)" \
93 "gui_edit 'Arcload Configuration' $bootpath/arc.cf"