[Fli4l_dev] fli4l-3.7.0-rev22873 Fehler in HD
Robert Resch
fli4l at robert.reschpara.de
Mo Jul 23 22:10:54 CEST 2012
Am 23.07.2012 20:45, schrieb Wilfried Deppe:
> Hallo Robert,
> ich habe noch mal mit Hand umgestellt und dann gebootet und seit dem
> Funktioniert es, ich weiß nun auch nicht warum, ich bin nun glücklich
> ich habe dein File drin.
Was auch immer das war (ich vermute kaputte Zeilenenden - evtl winzip?)
- Ich habs mit deinem Muster-File gefixed.
Freitag ist der Fix im tarball. Anbei das wirklich gefixte script.
Robert
-------------- nächster Teil --------------
#!/bin/sh
#----------------------------------------------------------------------------
# control_recover.cgi
#
# Creation: 2007-02-24 lanspezi
# Last Update: $Id: control_recover.cgi 22940 2012-07-23 20:09:04Z rresch $
#----------------------------------------------------------------------------
get_one_var()
{
var=$1
name=$2
file=$3
eval $var=`sed -n -e "s/^$name='\(.*\)'/\1/p" $file`
}
show_version_info ()
{
get_one_var var_version FLI4L_VERSION $2
get_one_var var_date FLI4L_BUILDDATE $2
get_one_var var_time FLI4L_BUILDTIME $2
get_one_var var_kernel KERNEL_VERSION $2
var_active=""
if [ "$2" = "/boot/rc.cfg" ]
then
grep -q rootfs.img /proc/cmdline
if [ $? = 0 ]
then
var_active="<img src=../img/gruenaus.gif>"
fi
fi
if [ "$2" = "/boot/rc2.cfg" ]
then
grep -q rootfs2.img /proc/cmdline
if [ $? = 0 ]
then
var_active="<img src=../img/gruenaus.gif>"
fi
fi
echo "<tr>"
echo "<td><center>$1</center></td>"
echo "<td><center>$var_version</center></td>"
echo "<td><center>$var_kernel</center></td>"
echo "<td><center>$var_date</center></td>"
echo "<td><center>$var_time</center></td>"
echo "<td><center>$var_active</center></td>"
echo "</tr>"
}
show_versions ()
{
show_tab_header "$_RECOVER_version_info" no
cat <<EOF
<table class="normtable">
<tr>
<th></th><th>$_RECOVER_version</th><th>Kernel</th><th>$_RECOVER_date</th><th>$_RECOVER_time</th><th>$_RECOVER_current_active</th>
</tr>
EOF
show_version_info "$_RECOVER_current_version" /boot/rc.cfg
if [ -f /boot/kernel2 ]; then
show_version_info "$_RECOVER_recover_version" /boot/rc2.cfg
value=ask
fi
echo "</table>"
show_tab_footer
}
. /srv/www/include/cgi-helper
: ${FORM_action:=view}
check_rights "recover" "$FORM_action"
case $FORM_action in
mkrecoverask)
show_html_header "$_RECOVER_title"
show_tab_header "$_RECOVER_titledo" no
echo '<br />'
show_error "" "$_RECOVER_msg1ask"
show_versions
cat <<EOF
<br /><br />
$_RECOVER_msg2ask
<br />
<form action="$myname" method="GET">
<br />
<input id="recoverno" type="submit" value="$_RECOVER_no" name="action" class="actions">
<input id="recoveryes" type="submit" value="$_RECOVER_yes" name="action" class="actions">
<br />
</form>
EOF
show_tab_footer
show_html_footer
;;
mkrecover|$_RECOVER_yes)
show_html_header "$_RECOVER_title" "refresh=5;url=control_recover.cgi"
show_tab_header "$_RECOVER_titledo" no
echo '<br />'
echo "$_RECOVER_output"
show_info "" "<pre>`/usr/sbin/mkrecover.sh -webgui`</pre>"
echo '<br />'
show_tab_footer
show_html_footer
;;
view|$_RECOVER_no)
show_html_header "$_RECOVER_title"
show_tab_header "$_RECOVER_titleshow" no
show_versions
cat <<EOF
$_RECOVER_desc1
<br />
$_RECOVER_desc2
<br />
<form action="$myname" method="GET">
<br />
<input id="recover" type="submit" value="$_RECOVER_action" class="actions">
<input id="action" type="hidden" value="mkrecover$value" name="action" class="actions">
<br /><br />
</form>
EOF
show_tab_footer
## new section for switch version for next boot
if grep -q "DEFAULT n" /boot/syslinux.cfg
then
next_boot=$_RECOVER_current_version
fi
if grep -q "DEFAULT r" /boot/syslinux.cfg
then
next_boot=$_RECOVER_recover_version
fi
echo "<br />"
show_tab_header "$_RECOVER_bootnext" no
cat << EOF
<br />
$_RECOVER_bootnext : <b>$next_boot </b>
<br />
<form action="$myname" method="GET">
<br />
<input id="switch" type="submit" value="$_RECOVER_switch" class="actions">
<input id="action" type="hidden" value="mkrecoverswitch" name="action" class="actions">
<br /><br />
</form>
EOF
shop_tab_footer
show_html_footer
;;
mkrecoverswitch)
show_html_header "$_RECOVER_title" "refresh=5;url=control_recover.cgi"
show_info "" "$_RECOVER_switch"
echo "<br /><br />"
err=0
# check for /boot
if [ ! -f /boot/ldlinux.sys ]
then
show_error "MOUNT-ERROR" "/boot is not mounted!<br /><br /><pre>`mount`</pre>"
err=1
fi
# check mount state of boot-partition
if ! grep /boot /proc/mounts | grep -q rw
then
show_error "MOUNT-ERROR" "/boot is readonly!<br /><br /><pre>`grep /boot /proc/mounts`</pre>"
err=1
fi
if [ $err != "1" ]
then
wert=`sed -n 's/^DEFAULT \([rn]\).*/\1/p' /boot/syslinux.cfg`
case $wert in
n) sed -i 's/^DEFAULT [rn].*/DEFAULT r/' /boot/syslinux.cfg;;
*) sed -i 's/^DEFAULT [rn].*/DEFAULT n/' /boot/syslinux.cfg;;
esac
fi
show_html_footer
;;
esac
Mehr Informationen über die Mailingliste Fli4l_dev