From 406f019f1d9d519e16a6b3622b5f89fff2b65daf Mon Sep 17 00:00:00 2001 From: ms Date: Mon, 26 Mar 2007 19:59:37 +0000 Subject: [PATCH] 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 --- config/rootfiles/common/whatmask | 2 ++ doc/packages-list.txt | 2 +- html/cgi-bin/upnp.cgi | 10 +++++----- lfs/initscripts | 5 ++++- make.sh | 1 + src/initscripts/init.d/net/red/dhcpcd | 8 ++++++-- src/initscripts/init.d/network | 20 +++++++++++++++++++- src/install+setup/install/config.c | 1 + src/install+setup/install/main.c | 8 ++++++-- 9 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 config/rootfiles/common/whatmask diff --git a/config/rootfiles/common/whatmask b/config/rootfiles/common/whatmask new file mode 100644 index 0000000000..84721f7410 --- /dev/null +++ b/config/rootfiles/common/whatmask @@ -0,0 +1,2 @@ +usr/bin/whatmask +#usr/man/man1/whatmask.1 diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 24854748df..aff6ac95b3 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -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 diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi index 2b7168c9cc..3970cc8d92 100644 --- a/html/cgi-bin/upnp.cgi +++ b/html/cgi-bin/upnp.cgi @@ -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; -} \ No newline at end of file +} diff --git a/lfs/initscripts b/lfs/initscripts index 23d0e7daab..6239d51a5d 100644 --- a/lfs/initscripts +++ b/lfs/initscripts @@ -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 \ diff --git a/make.sh b/make.sh index 02fea669ab..8d43614ef7 100644 --- a/make.sh +++ b/make.sh @@ -400,6 +400,7 @@ buildipfire() { ipfiremake hdparm ipfiremake ibod ipfiremake initscripts + ipfiremake whatmask ipfiremake iptables ipfiremake libupnp ipfiremake ipp2p IPT=1 diff --git a/src/initscripts/init.d/net/red/dhcpcd b/src/initscripts/init.d/net/red/dhcpcd index 99f6b01ac3..ca5ea80994 100644 --- a/src/initscripts/init.d/net/red/dhcpcd +++ b/src/initscripts/init.d/net/red/dhcpcd @@ -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 diff --git a/src/initscripts/init.d/network b/src/initscripts/init.d/network index a6c1584a97..6823826d72 100644 --- a/src/initscripts/init.d/network +++ b/src/initscripts/init.d/network @@ -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) diff --git a/src/install+setup/install/config.c b/src/install+setup/install/config.c index ede0a70ebe..b1d533e4fd 100644 --- a/src/install+setup/install/config.c +++ b/src/install+setup/install/config.c @@ -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); diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index e28e05e08c..f988a608bb 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -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); -- 2.39.2