version information added to footer of web interface

'status' link fixed
check_smb_idle.sh fixed (insufficient path environment by cron)
This commit is contained in:
lars 2005-10-03 10:11:09 +00:00
parent 9c69eb7786
commit f026370bbe
6 changed files with 16 additions and 12 deletions

View File

@ -35,6 +35,7 @@ WIPE=/usr/bin/wipe
MKFS_DATA=/sbin/mkfs.ext3
MKFS_CONFIG=/sbin/mkfs.ext2
CRYPTSETUP=/sbin/cryptsetup
IPTABLES=/sbin/iptables
# firewall setings
# do not use multiports (iptables) as the timeout-script depends on

View File

@ -358,7 +358,7 @@ case "$ACTION" in
;;
network-down )
log_msg "Stopping the firewall ..."
$FIREWALL_SCRIPT stop
"$FIREWALL_SCRIPT" stop
log_msg "Stopping stunnel ..."
killall stunnel
log_msg "Shutting the network interface down ..."
@ -474,7 +474,7 @@ case "$ACTION" in
echo " get_config NAME - retrieve a configuration setting"
echo " diskinfo - show the partition table of the harddisk"
echo " poweroff - shutdown the cryptobox"
echo " clean - remove all partitions [only for development]"
echo " clean - remove all partitions [only for development]"
echo " reboot - reboot the cryptobox"
echo
;;

View File

@ -15,7 +15,7 @@
# iptables -A INPUT -i eth0 -p tcp --dport 139 -j ACCEPT
#
# called by:
# - cron (/etc/cron.d/cryptobox
# - cron (/etc/cron.d/cryptobox)
#
set -eu
@ -29,7 +29,7 @@ set -eu
filter_ipt_rules()
# get the input rules for smb datagram traffic
{
iptables -L INPUT -vnx | grep -E "udp dpt:138|tcp dpt:139"
"$IPTABLES" -L INPUT -vnx | grep -E "udp dpt:138|tcp dpt:139"
}
@ -41,7 +41,7 @@ function check_for_traffic()
filter_ipt_rules | sed 's/ */ /g' | cut -d " " -f 3 | while read a
do [ "$a" -gt 0 ] && echo "$a"
done | grep -q "" && traffic_yes=1
iptables -Z INPUT
"$IPTABLES" -Z INPUT
[ "$traffic_yes" = "1" ]
}
@ -56,7 +56,7 @@ MAX_IDLE_COUNTER=$("$CB_SCRIPT" get_config timeout)
[ "$MAX_IDLE_COUNTER" -eq 0 ] && exit 0
# config test
[ -z "`filter_ipt_rules`" ] && echo "[`basename $0`]: Could not find a matching iptables rule!" >>"$LOG_FILE" && exit 1
[ -z "$(filter_ipt_rules)" ] && echo "[`basename $0`]: Could not find a matching iptables rule!" >>"$LOG_FILE" && exit 1
# read current idle counter
if [ -e "$IDLE_COUNTER_FILE" ]

View File

@ -5,7 +5,9 @@
</div><!-- end of 'words' -->
<div id="footer">
<a href="https://systemausfall.org/prj/cryptobox" title="<?cs var:Lang.Text.ProjectHomePage ?>">CryptoBox-Home</a>&nbsp;&nbsp;<?cs var:Lang.Text.ProjectNote ?> <a href="https://systemausfall.org/senselab" title="systemausfall.org">sense.lab</a>
<!-- Version -->
v0.2&nbsp;&nbsp;
<a href="https://systemausfall.org/prj/cryptobox" title="<?cs var:Lang.Text.ProjectHomePage ?>">CryptoBox-Home</a> <?cs var:Lang.Text.ProjectNote ?>&nbsp;<a href="https://systemausfall.org/senselab" title="systemausfall.org">sense.lab</a>
</div>
</div>

View File

@ -1,11 +1,11 @@
<!-- mounting possible? -->
<?cs if:((Data.Status.Config == 1) && (Data.Status.InitRunning == 0)) ?>
<?cs if:(Data.Status.Mounted == 1) ?>
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
<a href="<?cs call:getSelfURL('action=umount_do','action') ?>" title="<?cs var:Lang.Text.DoUmount ?>"><?cs var:Lang.Button.Umount ?></a>
<?cs else ?>
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
<a href="<?cs call:getSelfURL('action=mount_ask','action') ?>" title="<?cs var:Lang.Text.DoMount ?>"><?cs var:Lang.Button.Mount ?></a>
<?cs /if ?>
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
<?cs /if ?>
<!-- already initialized (or at least in progress)? -->

View File

@ -112,8 +112,9 @@ function configure_cb()
echo "Configuring the cryptobox ..."
# "harden" removes /etc/issue ...
if [ -e "$IMAGE_DIR/etc/issue" ]
then sed -i "s/^Version:.*/Revision: $(fetch_revision)/" "$IMAGE_DIR/etc/issue"
else echo "Version:.*/Revision: $(fetch_revision)" >"$IMAGE_DIR/etc/issue"
then sed -i "s/^Version:/Revision:/" "$IMAGE_DIR/etc/issue"
sed -i "s/^Revision:.*/Revision: $(fetch_revision)/" "$IMAGE_DIR/etc/issue"
else echo "Revision: $(fetch_revision)" >"$IMAGE_DIR/etc/issue"
fi
fetch_revision >"$IMAGE_DIR/etc/cryptobox/revision"
chroot "$IMAGE_DIR" "$CHROOT_START" /usr/lib/cryptobox/configure-cryptobox.sh normal