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_DATA=/sbin/mkfs.ext3
MKFS_CONFIG=/sbin/mkfs.ext2 MKFS_CONFIG=/sbin/mkfs.ext2
CRYPTSETUP=/sbin/cryptsetup CRYPTSETUP=/sbin/cryptsetup
IPTABLES=/sbin/iptables
# firewall setings # firewall setings
# do not use multiports (iptables) as the timeout-script depends on # do not use multiports (iptables) as the timeout-script depends on

View file

@ -358,7 +358,7 @@ case "$ACTION" in
;; ;;
network-down ) network-down )
log_msg "Stopping the firewall ..." log_msg "Stopping the firewall ..."
$FIREWALL_SCRIPT stop "$FIREWALL_SCRIPT" stop
log_msg "Stopping stunnel ..." log_msg "Stopping stunnel ..."
killall stunnel killall stunnel
log_msg "Shutting the network interface down ..." log_msg "Shutting the network interface down ..."
@ -474,7 +474,7 @@ case "$ACTION" in
echo " get_config NAME - retrieve a configuration setting" echo " get_config NAME - retrieve a configuration setting"
echo " diskinfo - show the partition table of the harddisk" echo " diskinfo - show the partition table of the harddisk"
echo " poweroff - shutdown the cryptobox" 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 " reboot - reboot the cryptobox"
echo echo
;; ;;

View file

@ -15,7 +15,7 @@
# iptables -A INPUT -i eth0 -p tcp --dport 139 -j ACCEPT # iptables -A INPUT -i eth0 -p tcp --dport 139 -j ACCEPT
# #
# called by: # called by:
# - cron (/etc/cron.d/cryptobox # - cron (/etc/cron.d/cryptobox)
# #
set -eu set -eu
@ -29,7 +29,7 @@ set -eu
filter_ipt_rules() filter_ipt_rules()
# get the input rules for smb datagram traffic # 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 filter_ipt_rules | sed 's/ */ /g' | cut -d " " -f 3 | while read a
do [ "$a" -gt 0 ] && echo "$a" do [ "$a" -gt 0 ] && echo "$a"
done | grep -q "" && traffic_yes=1 done | grep -q "" && traffic_yes=1
iptables -Z INPUT "$IPTABLES" -Z INPUT
[ "$traffic_yes" = "1" ] [ "$traffic_yes" = "1" ]
} }
@ -56,7 +56,7 @@ MAX_IDLE_COUNTER=$("$CB_SCRIPT" get_config timeout)
[ "$MAX_IDLE_COUNTER" -eq 0 ] && exit 0 [ "$MAX_IDLE_COUNTER" -eq 0 ] && exit 0
# config test # 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 # read current idle counter
if [ -e "$IDLE_COUNTER_FILE" ] if [ -e "$IDLE_COUNTER_FILE" ]

View file

@ -5,7 +5,9 @@
</div><!-- end of 'words' --> </div><!-- end of 'words' -->
<div id="footer"> <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>
</div> </div>

View file

@ -1,11 +1,11 @@
<!-- mounting possible? --> <!-- mounting possible? -->
<?cs if:((Data.Status.Config == 1) && (Data.Status.InitRunning == 0)) ?> <?cs if:((Data.Status.Config == 1) && (Data.Status.InitRunning == 0)) ?>
<?cs if:(Data.Status.Mounted == 1) ?> <?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 ?> <?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=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>
<?cs /if ?> <?cs /if ?>
<a href="<?cs call:getSelfURL('action=status','action') ?>" title="<?cs var:Lang.Button.Status ?>"><?cs var:Lang.Button.Status ?></a>
<?cs /if ?> <?cs /if ?>
<!-- already initialized (or at least in progress)? --> <!-- already initialized (or at least in progress)? -->

View file

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