]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Die Updates fein gemacht...
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 26 Aug 2007 22:17:50 +0000 (22:17 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sun, 26 Aug 2007 22:17:50 +0000 (22:17 +0000)
Min. Swapsize := 0.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@841 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

config/rootfiles/core/1/files
config/rootfiles/core/1/update.sh
config/rootfiles/core/files [deleted file]
lfs/core-updates
src/install+setup/install/main.c

index abbdc90945ad716f0dc55ba574adf65a2b99c789..62b5bf756bb3853ea470aac850a20a5e25a6b8a0 100644 (file)
@@ -1 +1,7 @@
 etc/init.d/networking/red
+var/ipfire/langs
+srv/web/ipfire/cgi-bin/pakfire.cgi
+srv/web/ipfire/cgi-bin/remote.cgi
+usr/local/bin/sshctrl
+usr/local/bin/redctrl
+usr/local/bin/connscheduler
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..988c9e2c098c4dfed55b851836ca48ce2bc18b88 100644 (file)
@@ -0,0 +1,6 @@
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+extract_files
+
+reload_all
diff --git a/config/rootfiles/core/files b/config/rootfiles/core/files
deleted file mode 100644 (file)
index abdc444..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-update.sh
-files
-ROOTFILES
index f39a965f4788c8f49594dfaed84309c71dba6d43..cf24f00ed80ed341ecb224db34c380a353c12d5e 100644 (file)
@@ -47,27 +47,27 @@ 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" \
+CORE = $(patsubst $(DIR_SRC)/config/rootfiles/%,%,$(wildcard $(DIR_SRC)/config/rootfiles/core/*))
+
+$(TARGET) : $(CORE)
+
+core/%:
+       rm -rf /install/packages/package
+       mkdir -p /install/packages/package
+       eval $$(cat /usr/src/config/rootfiles/$@/meta)
+       cp -f /usr/src/config/rootfiles/$@/update.sh /install/packages/package
+       cp -f /usr/src/config/rootfiles/$@/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-upgrade-$(VERSION)-$$(basename $@).ipfire \
+               update.sh files ROOTFILES
+       rm -rf /install/packages/package
+       sed -e "s/NAME/core-upgrade/g" \
                -e "s/VER/$(VERSION)/g" \
-               -e "s/RELEASE/$$i/g" \
+               -e "s/RELEASE/$$(basename $@)/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
+               -e "s/SIZE/`ls -l \/install\/packages\/core-upgrade-$(VERSION)-$$(basename $@).ipfire | awk '{ print $$5 }'`/g" \
+               < /usr/src/src/pakfire/meta > /install/packages/meta-core-upgrade-$$(basename $@)
index 34c9883162fe91d63473388658c3bf3c61fa3575..7a6e2257ef3b4bad556d2ea15184eb7b2b0ffeea 100644 (file)
@@ -374,15 +374,16 @@ 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);
+       rc = 0;
 
-       if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition + 32 )) > 256)) ) {
+       if ( (!unattended) && (((disk - (root_partition + swap_file + boot_partition)) < 256 ) && ((disk - (root_partition + boot_partition )) > 256)) ) {
    rc = newtWinChoice(title, ctr[TR_OK], ctr[TR_CANCEL], ctr[TR_CONTINUE_NO_SWAP]);
-    if (rc != 0){
-      swap_file = 32;
+    if (rc == 1){
+      swap_file = 0;
       system_partition = disk - ( root_partition + swap_file + boot_partition );
-      fprintf(flog, "Changing Swap Size to 32 MB.\n");
+      fprintf(flog, "Changing Swap Size to 0 MB.\n");
     }
-    else {
+    else if (rc == 2){
     fprintf(flog, "Disk is too small.\n");
     errorbox(ctr[TR_DISK_TOO_SMALL]);goto EXIT;
     }
@@ -398,13 +399,13 @@ int main(int argc, char *argv[])
        handle = fopen("/tmp/partitiontable", "w");
 
        /* Make swapfile */
-       if (swap_file) {
-               fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
-                       boot_partition, swap_file, root_partition);
-       } else {
-               fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
-                       boot_partition, root_partition);
-       }
+  if (swap_file) {
+     fprintf(handle, ",%ld,L,*\n,%ld,S,\n,%ld,L,\n,,L,\n",
+     boot_partition, swap_file, root_partition);
+  } else {
+     fprintf(handle, ",%ld,L,*\n,0,0,\n,%ld,L,\n,,L,\n",
+     boot_partition, root_partition);
+  }
 
        fclose(handle);