From: ms Date: Sun, 26 Aug 2007 14:34:06 +0000 (+0000) Subject: Swap-Abfrage gefixt. X-Git-Tag: v2.3-beta1~429 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=a5997a4c5f16ebec4f9b75f098e0123ae6c199df Swap-Abfrage gefixt. Prototyp der Core-Scripte. sshctrl gefixt. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@839 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- diff --git a/config/rootfiles/core/1/files b/config/rootfiles/core/1/files new file mode 100644 index 0000000000..abbdc90945 --- /dev/null +++ b/config/rootfiles/core/1/files @@ -0,0 +1 @@ +etc/init.d/networking/red diff --git a/config/rootfiles/core/1/meta b/config/rootfiles/core/1/meta new file mode 100644 index 0000000000..3e4711dfef --- /dev/null +++ b/config/rootfiles/core/1/meta @@ -0,0 +1,3 @@ +DEPS="" +DESCDE= +DESCEN= diff --git a/config/rootfiles/core/1/update.sh b/config/rootfiles/core/1/update.sh new file mode 100644 index 0000000000..e69de29bb2 diff --git a/config/rootfiles/core/files b/config/rootfiles/core/files new file mode 100644 index 0000000000..abdc4447b2 --- /dev/null +++ b/config/rootfiles/core/files @@ -0,0 +1,3 @@ +update.sh +files +ROOTFILES diff --git a/doc/Flamme Entuxee.png b/doc/Flamme Entuxee.png deleted file mode 100644 index cf6826bac0..0000000000 Binary files a/doc/Flamme Entuxee.png and /dev/null differ diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 97b55a5a56..8fe9a0ce83 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -109,8 +109,6 @@ * iana-etc-2.10 * icecast-2.3.1 * icegenerator-0.5.5-pre2 -* ices-0.4 -* ices-2.0.1 * iftop-0.17 * inetutils-1.4.2 * ipac-ng-1.31 diff --git a/langs/de/install/lang_de.c b/langs/de/install/lang_de.c index 9977017614..1168c56e60 100644 --- a/langs/de/install/lang_de.c +++ b/langs/de/install/lang_de.c @@ -104,7 +104,7 @@ char *de_tr[] = { /* TR_CONGRATULATIONS_LONG */ "%s wurde erfolgreich installiert. Entfernen Sie bitte alle eventuellen CDs aus dem Computer. Nun wird das Setup-Programm gestartet, in dem Sie ISDN, Netzwerkkarten und die Systempasswörter konfigurieren können. Wenn dies fertiggestellt ist, rufen Sie in Ihrem Webbrowser die Box mit https://%s:444 (oder welchen Namen Sie Ihrem %s auch immer gegeben haben) auf und konfigurieren die Wählverbindung und (falls nötig) die Fernwartung.", /* TR_CONTINUE_NO_SWAP */ -"Ihre Festplatte ist sehr klein, aber sie können ohne Auslagerungsdatei weitermachen. (Mit Vorsicht benutzen).", +"Ihre Festplatte ist sehr klein, aber sie können mit einer minimalen Auslagerungspartition weitermachen. (Mit Vorsicht benutzen).", /* TR_CURRENT_CONFIG */ "Aktuelle Einstellung: %s%s", /* TR_DEFAULT_GATEWAY */ diff --git a/langs/en/install/lang_en.c b/langs/en/install/lang_en.c index 807db125e5..1609f6ef3e 100644 --- a/langs/en/install/lang_en.c +++ b/langs/en/install/lang_en.c @@ -100,7 +100,7 @@ char *en_tr[] = { /* TR_CONGRATULATIONS_LONG */ "%s was successfully installed. Please remove any CDROMs in the computer. Setup will now run where you may configure ISDN, network cards, and the system passwords. After Setup has been completed, you should point your web browser at https://%s:444 (or whatever you name your %s), and configure dialup networking (if required) and remote access.", /* TR_CONTINUE_NO_SWAP */ -"Your harddisk is very small, but you can continue without any swap. (Use with caution).", +"Your harddisk is very small, but you can continue with an very small swap. (Use with caution).", /* TR_CURRENT_CONFIG */ "Current config: %s%s", /* TR_DEFAULT_GATEWAY */ diff --git a/lfs/core-updates b/lfs/core-updates new file mode 100644 index 0000000000..f39a965f47 --- /dev/null +++ b/lfs/core-updates @@ -0,0 +1,73 @@ +############################################################################### +# This file is part of the IPCop Firewall. # +# # +# IPCop is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPCop is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPCop; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Makefiles are based on LFSMake, which is # +# Copyright (C) 2002 Rod Roard # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = ipfire + +THISAPP = core-updates +TARGET = $(DIR_INFO)/$(THISAPP) + +############################################################################### +# Top-level Rules +############################################################################### + +install : $(TARGET) + +check : + +download : + +md5 : + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + for i in $$(ls -1 $(DIR_SRC)/config/rootfiles/core) ; do \ + if [ "$$i" == "files" ]; then continue; fi; \ + rm -rf /install/packages/package; \ + mkdir -p /install/packages/package && \ + eval $$(cat /usr/src/config/rootfiles/core/$$i/meta) \ + && cp -f /usr/src/config/rootfiles/core/$$i/update.sh /install/packages/package \ + && cp -f /usr/src/config/rootfiles/core/$$i/files /install/packages/package/ROOTFILES \ + && chmod 755 /install/packages/package/update.sh \ + && cd / \ + && tar -cf /install/packages/package/files --files-from=/install/packages/package/ROOTFILES --exclude='#*' \ + && cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES; \ + cd /install/packages/package && tar cf ../core-update-$(VERSION)-$$i.ipfire \ + --files-from=/usr/src/config/rootfiles/core/files && \ + rm -rf /install/packages/package; \ + sed -e "s/NAME/core-update/g" \ + -e "s/VER/$(VERSION)/g" \ + -e "s/RELEASE/$$i/g" \ + -e "s/DEPS/$(DEPS)/g" \ + -e "s/DESCDE/$(DESCDE)/g" \ + -e "s/DESCEN/$(DESCEN)/g" \ + -e "s/SIZE/`ls -l \/install\/packages\/core-update-$(VERSION)-$$i.ipfire | awk '{ print \$5 }'`/g" \ + < /usr/src/src/pakfire/meta > /install/packages/meta-core-update-$$i; \ + done diff --git a/make.sh b/make.sh index f7be997a12..f784070b49 100755 --- a/make.sh +++ b/make.sh @@ -588,9 +588,6 @@ buildpackages() { beautify message DONE # Create images for install - if [ "$DEVEL" == "1" ]; then - ipfiremake cdrom ED=devel - fi ipfiremake cdrom ED=full # Check if there is a loop device for building in virtual environments @@ -623,6 +620,7 @@ buildpackages() { } ipfirepackages() { + ipfiremake core-updates for i in $(ls -1 $BASEDIR/config/rootfiles/packages); do [ -e $BASEDIR/lfs/$i ] && ipfiredist $i done @@ -636,10 +634,6 @@ case "$1" in build) clear BUILDMACHINE=`uname -m` - DEVEL=0 - if [ "$2" == "--devel" ]; then - DEVEL=1 - fi PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$BUILDMACHINE.tar.gz 2> /dev/null | head -n 1` #only restore on a clean disk if [ ! -f log/cleanup-toolchain-2-tools ]; then diff --git a/src/install+setup/install/main.c b/src/install+setup/install/main.c index c373e58bdd..34c9883162 100644 --- a/src/install+setup/install/main.c +++ b/src/install+setup/install/main.c @@ -360,7 +360,7 @@ int main(int argc, char *argv[]) swap_file = memory; /* Calculating Root-Size dependend of Max Disk Space */ - if ( disk < 1024 ) + if ( disk < 756 ) root_partition = 256; else if ( disk >= 1024 && disk <= 3072 ) root_partition = 512; @@ -375,8 +375,17 @@ int main(int argc, char *argv[]) fprintf(flog, ", boot = %ld, swap = %ld, mylog = %ld, root = %ld\n", boot_partition, swap_file, system_partition, root_partition); - if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition)) > 256)) ) { - rc = newtWinChoice(title, ctr[TR_CONTINUE_NO_SWAP], ctr[TR_OK], ctr[TR_CANCEL]); + if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition + 32 )) > 256)) ) { + rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]); + if (rc != 0){ + swap_file = 32; + system_partition = disk - ( root_partition + swap_file + boot_partition ); + fprintf(flog, "Changing Swap Size to 32 MB.\n"); + } + else { + fprintf(flog, "Disk is too small.\n"); + errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT; + } } else if (disk - (root_partition + swap_file + boot_partition) >= 256) { @@ -385,11 +394,7 @@ int main(int argc, char *argv[]) fprintf(flog, "Disk is too small.\n"); errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT; } - if (rc != 1){ - swap_file = 0; - fprintf(flog, "Changing Swap Size to 0.\n"); - } - + handle = fopen("/tmp/partitiontable", "w"); /* Make swapfile */ diff --git a/src/misc-progs/sshctrl.c b/src/misc-progs/sshctrl.c index 2bf3b1fbae..d0799730f3 100644 --- a/src/misc-progs/sshctrl.c +++ b/src/misc-progs/sshctrl.c @@ -130,7 +130,6 @@ int main(int argc, char *argv[]) sleep(5); unlink("/var/ipfire/remote/enablessh"); safe_system("cat /var/ipfire/remote/settings | sed 's/ENABLE_SSH=on/ENABLE_SSH=off/' > /var/ipfire/remote/settings2 && mv /var/ipfire/remote/settings2 /var/ipfire/remote/settings"); - argv[1] snprintf(command, BUFFER_SIZE-1, "sleep %s && /usr/local/bin/sshctrl &", argv[2]); safe_system(command); }