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" #$WIPE -kq -R /dev/urandom "${device}2"
# passphrase may be passed via command line # 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!" is_crypto_mounted && echo "Das Crypto-Dateisystem ist bereits aktiv!"
local device=`find_harddisk` local device=`find_harddisk`
# passphrase is read from stdin # 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" if mount "$CRYPTMAPPER_DEV" "$CRYPTO_DIR"
then /etc/init.d/samba start then /etc/init.d/samba start
else dmsetup remove "$CRYPTMAPPER_DEV" else dmsetup remove "$CRYPTMAPPER_DEV"

View file

@ -46,7 +46,8 @@ case "$ACTION" in
diff ) diff )
cd "`dirname \"$MIRROR_ORIG_DIR\"`" cd "`dirname \"$MIRROR_ORIG_DIR\"`"
# diff and remove "binary files differ"-warnings (vi-swap-files) # 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 ) stop )
/etc/init.d/ssh stop /etc/init.d/ssh stop

View file

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

View file

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

View file

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

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB