Added whatmask

Netzwerkscripts erweitert.
upnp.cgi gefixt.
Installer schreibt die Spracheinstellungen wieder.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@465 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-03-26 19:59:37 +00:00
parent 6bc302d118
commit 406f019f1d
9 changed files with 45 additions and 12 deletions

View File

@@ -0,0 +1,2 @@
usr/bin/whatmask
#usr/man/man1/whatmask.1

View File

@@ -228,7 +228,6 @@
* spandsp-0.0.3pre24
* squashfs3.2-r2
* squid-2.6.STABLE12
* squid-2.6.STABLE9
* squid-graph-3.2
* squidGuard-1.2.0
* stund_0.96_Aug13
@@ -255,6 +254,7 @@
* vlc-0.8.5
* web-cyradm-0.5.5-CVS-for-ipfire
* wget-1.10.2
* whatmask-1.2
* wireless_tools.28
* wput-0.6
* xinetd-2.3.14

View File

@@ -90,19 +90,19 @@ elsif ($upnpsettings{'ACTION'} eq 'Start')
{
$upnpsettings{'ENABLED'} = 'on';
&General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
system('/usr/local/bin/upnpctrl upnpdstart $netsettings{'RED_DEV'} $netsettings{'GREEN_DEV'}');
system("/usr/local/bin/upnpctrl upnpdstart $netsettings{'RED_DEV'} $netsettings{'GREEN_DEV'}");
}
elsif ($upnpsettings{'ACTION'} eq 'Stop')
{
$upnpsettings{'ENABLED'} = 'off';
&General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
system('/usr/local/bin/upnpctrl upnpstop');
system("/usr/local/bin/upnpctrl stop");
}
elsif ($upnpsettings{'ACTION'} eq $Lang::tr{'restart'})
{
&General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
system('/usr/local/bin/upnpctrl upnpstop');
system('/usr/local/bin/upnpctrl upnpstart $netsettings{'RED_DEV'} $netsettings{'GREEN_DEV'}');
system("/usr/local/bin/upnpctrl stop");
system("/usr/local/bin/upnpctrl start $netsettings{'RED_DEV'} $netsettings{'GREEN_DEV'}");
}
&General::readhash("${General::swroot}/upnp/settings", \%upnpsettings);
@@ -280,4 +280,4 @@ sub isrunning
}
return $status;
}
}

View File

@@ -60,6 +60,7 @@ $(TARGET) :
install -d -m 755 /etc/rc.d/init.d/net/red
install -d -m 755 /etc/rc.d/helper
install -d -m 755 /etc/sysconfig
-rm -rf /etc/init.d
ln -svf rc.d/init.d /etc/init.d
for i in $(DIR_SRC)/src/initscripts/init.d/*; do \
@@ -68,7 +69,9 @@ $(TARGET) :
chmod 644 /etc/rc.d/init.d/functions
for i in $(DIR_SRC)/src/initscripts/init.d/net/*; do \
install -v -m 754 $$i /etc/rc.d/init.d/net/; \
if [ -f $$i ]; then \
install -v -m 754 $$i /etc/rc.d/init.d/net/; \
fi; \
done
for i in $(DIR_SRC)/src/initscripts/init.d/net/common/*; do \

View File

@@ -400,6 +400,7 @@ buildipfire() {
ipfiremake hdparm
ipfiremake ibod
ipfiremake initscripts
ipfiremake whatmask
ipfiremake iptables
ipfiremake libupnp
ipfiremake ipp2p IPT=1

View File

@@ -14,7 +14,9 @@ LEASEINFO="/var/ipfire/dhcpc/dhcpcd-$1.info"
case "$2" in
up)
boot_mesg -n "Starting dhcpcd on the $1 interface..."
boot_mesg -n "Starting dhcpcd on the $1 interface..."
echo -n "${1}" > /var/ipfire/red/iface
# Test to see if there is a stale pid file
if [ -f "$PIDFILE" ]
then
@@ -34,12 +36,13 @@ case "$2" in
if [ -n "${DHCP_HOSTNAME}" ]; then
DHCP_START+="-h ${DHCP_HOSTNAME}"
fi
/sbin/dhcpcd $1 $DHCP_START
/sbin/dhcpcd $1 $DHCP_START >/dev/null 2>&1
# Save the return value
RET="$?"
# Print the assigned settings if requested
if [ "$RET" = "0" -a "$PRINTIP" = "yes" ]; then
. /var/ipfire/dhcpc/dhcpcd-$1.info
logger -t ipfire "DHCPCD Success"
if [ "$PRINTALL" = "yes" ]; then
echo ""
echo_ok
@@ -63,6 +66,7 @@ case "$2" in
fi
else
echo ""
logger -t ipfire "DHCPCD Fail"
$(exit "$RET")
evaluate_retval
fi

View File

@@ -77,9 +77,27 @@ case "${1}" in
if [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then
name=red /etc/rc.d/init.d/net/ifup
fi
;;
stop)
# Stopping interfaces...
# GREEN
name=green /etc/rc.d/init.d/net/ifdown
# BLUE
if [ "$CONFIG_TYPE" = "4" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then
name=blue /etc/rc.d/init.d/net/ifdown
fi
# ORANGE
if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "5" -o "$CONFIG_TYPE" = "7" ]; then
name=orange /etc/rc.d/init.d/net/ifdown
fi
# RED
if [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "6" -o "$CONFIG_TYPE" = "7" ]; then
name=red /etc/rc.d/init.d/net/ifdown
fi
;;
restart)

View File

@@ -22,6 +22,7 @@ int write_lang_configs( char *lang)
/* default stuff for main/settings. */
replacekeyvalue(kv, "LANGUAGE", lang);
replacekeyvalue(kv, "HOSTNAME", SNAME);
replacekeyvalue(kv, "THEME", "ipfire");
writekeyvalues(kv, "/harddisk" CONFIG_ROOT "/main/settings");
freekeyvalues(kv);

View File

@@ -149,6 +149,7 @@ int main(int argc, char *argv[])
ctr = langtrs[choice];
strcpy(shortlangname, shortlangnames[choice]);
fprintf(flog, "Selected language: %s\n", shortlangname);
mysystem("/bin/setfont lat0-16");
@@ -499,6 +500,9 @@ int main(int argc, char *argv[])
/* Save USB controller type to modules.conf */
write_usb_modules_conf();
/* Save language und local settings */
write_lang_configs(shortlangname);
/* touch the modules.dep files */
snprintf(commandstring, STRING_SIZE,
@@ -530,7 +534,7 @@ int main(int argc, char *argv[])
replace("/harddisk/etc/fstab", "DEVICE", hdparams.devnode);
/* if we detected SCSI/USB then fixup */
mysystem("/bin/probecntrl.sh");
/* mysystem("/bin/probecntrl.sh");
if ((handle = fopen("/tmp/cntrldriver", "r")))
{
char *driver;
@@ -547,7 +551,7 @@ int main(int argc, char *argv[])
runcommandwithstatus(commandstring, ctr[TR_BUILDING_INITRD]);
mysystem("/sbin/chroot /harddisk /bin/mv /boot/grub/scsigrub.conf /boot/grub/grub.conf");
}
}
} */
if (raid_disk)
sprintf(string, "root=%sp3", hdparams.devnode);