style: background image fixed (not scrolled)

evil_tux logo added
failure check for mount_do fixed
config_form fixed
create_summary of validation fixed
ignore generated reports for remote "diff"
cryptsetup-create fixed
This commit is contained in:
lars 2005-07-23 12:22:06 +00:00
parent f4b4427b4a
commit d31ca1a1bd
8 changed files with 34 additions and 25 deletions

View File

@ -124,7 +124,7 @@ function create_crypto()
#$WIPE -kq -R /dev/urandom "${device}2"
# passphrase may be passed via command line
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "$CRYPTMAPPER_DEV" "${device}2"
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2"
}
@ -205,7 +205,7 @@ function mount_crypto()
is_crypto_mounted && echo "Das Crypto-Dateisystem ist bereits aktiv!"
local device=`find_harddisk`
# passphrase is read from stdin
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "$CRYPTMAPPER_DEV" "${device}2"
$CRYPTSETUP -h "$HASH" -c "$ALGO" create "`basename $CRYPTMAPPER_DEV`" "${device}2"
if mount "$CRYPTMAPPER_DEV" "$CRYPTO_DIR"
then /etc/init.d/samba start
else dmsetup remove "$CRYPTMAPPER_DEV"

View File

@ -46,7 +46,8 @@ case "$ACTION" in
diff )
cd "`dirname \"$MIRROR_ORIG_DIR\"`"
# diff and remove "binary files differ"-warnings (vi-swap-files)
diff -ruN "`basename \"$MIRROR_ORIG_DIR\"`" "`basename \"$MIRROR_DIR\"`" | grep -v "^Binary files"
# ignore generated reports
diff -ruN --exclude=report "`basename \"$MIRROR_ORIG_DIR\"`" "`basename \"$MIRROR_DIR\"`" | grep -v "^Binary files"
;;
stop )
/etc/init.d/ssh stop

View File

@ -62,7 +62,7 @@ create_summary()
local DIFF_FILE=${a%.desc}.diff
if [ -s "$DIFF_FILE" ]
then cat "$SUMMARY_TEMPLATE_DIR/result-error"
cat "$DIFF_FILE" | sed 's/\$/<br\/>/'
sed 's#$#<br/>#' "$DIFF_FILE"
else cat "$SUMMARY_TEMPLATE_DIR/result-ok"
echo "no differences found"
fi
@ -70,7 +70,7 @@ create_summary()
# remove description file
rm "$a"
# remove if empty
[ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE"] && rm "$DIFF_FILE"
[ -e "$DIFF_FILE" -a ! -s "$DIFF_FILE" ] && rm "$DIFF_FILE"
done
cat "$SUMMARY_TEMPLATE_DIR/footer"
}

View File

@ -4,20 +4,18 @@
<form action="<?cs var:ScriptName ?>" method="post"
enctype="application/x-www-form-urlencoded">
<p><label for="ip"><?cs var:Lang.Text.IPAddress ?></label>
<p><label for="ip"><?cs var:Lang.Text.IPAddress ?></label><br/>
<input type="text" id="ip" size="16" maxsize="15" name="ip"
value="<?cs var:Data.Config.IP ?>" /><p>
<p><label for="timeout"><?cs var:Lang.Text.TimeOut ?></label>
<input type="text" id="timeout" size="16" maxsize="5" name="timeout"
<p><label for="timeout"><?cs var:Lang.Text.TimeOut ?></label><br/>
<input type="text" id="timeout" size="5" maxsize="5" name="timeout"
value="<?cs var:Data.Config.TimeOut ?>" /></p>
<p><label for="language"><?cs var:Lang.Text.SelectLanguage ?></label>
<p><label for="language"><?cs var:Lang.Text.SelectLanguage ?></label><br/>
<select name="language">
<?cs each:item = Data.Languages ?>
<option value="<?cs name:item ?>"
<?cs if:(item = Data.Config.Language) ?>selected="selected"<?cs /if ?>
><?cs var:item ?></option>
<option value="<?cs name:item ?>" <?cs if:(item == Data.Config.Language) ?>selected="selected"<?cs /if ?>><?cs var:item ?></option>
<?cs /each ?>
</select></p>

View File

@ -156,11 +156,6 @@ sub mount_vol
close(PW_INPUT);
$pagedata->setValue('Data.ProgOutput',"$output") if ($output);
if (!&check_mounted()) {
$pagedata->setValue('Data.Warning', 'MountFailed');
$pagedata->setValue('Data.Action', 'umount_form');
}
}
@ -252,7 +247,12 @@ if ( ! &check_ssl()) {
} else {
# mounten
&mount_vol($query->param('password'));
$pagedata->setValue('Data.Action', 'umount_form');
if (!&check_mounted()) {
$pagedata->setValue('Data.Warning', 'MountFailed');
$pagedata->setValue('Data.Action', 'mount_form');
} else {
$pagedata->setValue('Data.Action', 'umount_form');
}
}
################## mount_ask #######################
} elsif ($action eq 'mount_ask') {
@ -334,11 +334,16 @@ if ( ! &check_ssl()) {
$pagedata->setValue('Data.Action', 'intro');
#################### config_do #######################
} elsif ($action eq 'config_do') {
# TODO: parse for valid values
system("$CB_SCRIPT", "set_config", "language", $query->param('language'));
system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout'));
system("$CB_SCRIPT", "set_config", "ip", $query->param('ip'));
$pagedata->setValue('Data.Action', 'intro');
if ( ! &check_config()) {
$pagedata->setValue('Data.Warning', 'NotConfigured');
$pagedata->setValue('Data.Action', 'init_form');
} else {
# TODO: parse for valid values
system("$CB_SCRIPT", "set_config", "language", $query->param('language'));
system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout'));
system("$CB_SCRIPT", "set_config", "ip", $query->param('ip'));
$pagedata->setValue('Data.Action', 'intro');
}
#################### show_log ########################
} elsif ($action eq 'show_log') {
$pagedata->setValue('Data.Action', 'show_log');

View File

@ -1,7 +1,7 @@
body {
background-image: url(img/backg.gif);
background-position: top center;
background-attachment: scroll;
background-attachment: fixed;
background-repeat: no-repeat;
text-align: center;
margin: 0;
@ -40,6 +40,10 @@ body {
height: 120px;
margin: 0;
padding: 0;
background-image: url(img/evil_small.png);
background-position: top right;
background-attachment: scroll;
background-repeat: no-repeat;
}
#content {
@ -175,7 +179,8 @@ body {
}
#words .warning a {
line-height: 5em;
// WHY line-height???
// line-height: 5em;
color: #5e5e5e;
text-decoration: none;
font-weight: bold;

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB