Tripwirectrl gefixt.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 18 Apr 2007 14:25:21 +0000 (14:25 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 18 Apr 2007 14:25:21 +0000 (14:25 +0000)
Develoption zum batch-Befehl hinzugefuegt.

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

make.sh
src/misc-progs/tripwirectrl.c
tools/make-functions

diff --git a/make.sh b/make.sh
index 3fd133f..341ab38 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -170,7 +170,7 @@ prepareenv() {
     # Setup environment
     set +h
     LC_ALL=POSIX
-    MAKETUNING="-j4"
+    MAKETUNING="-j6"
     export LFS LC_ALL CFLAGS CXXFLAGS MAKETUNING
     unset CC CXX CPP LD_LIBRARY_PATH LD_PRELOAD
 
@@ -690,6 +690,10 @@ 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
@@ -980,27 +984,32 @@ uploadsrc)
 upload)
        case "$2" in
          iso)
-               echo -e "Uploading the iso to $IPFIRE_FTP_URL_EXT."
+               echo -e "Uploading the iso to $FTP_ISO_PATH/$SVN_REVISION."
                cat <<EOF > .ftp-commands
-mkdir $IPFIRE_FTP_PATH_EXT
+mkdir -p $FTP_ISO_PATH/$SVN_REVISION
 ls -lah
 quit
 EOF
-               ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands
+               ncftp -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL < .ftp-commands
                rm -f .ftp-commands
-               md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5
-               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-install-$VERSION.i386.iso
-               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-install-$VERSION.i386.iso.md5
-               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-source-r$SVN_REVISION.tar.gz
-               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ svn_status
+               md5sum ipfire-$VERSION.$MACHINE-full.iso > ipfire-$VERSION.$MACHINE-full.iso.md5
+               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ ipfire-$VERSION.$MACHINE-full.iso
+               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ ipfire-$VERSION.$MACHINE-full.iso.md5
+               if [ -e ipfire-$VERSION.$MACHINE-devel.iso ]; then
+                       md5sum ipfire-$VERSION.$MACHINE-devel.iso > ipfire-$VERSION.$MACHINE-devel.iso.md5
+                       ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ ipfire-$VERSION.$MACHINE-devel.iso
+                       ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ ipfire-$VERSION.$MACHINE-devel.iso.md5
+               fi
+               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ ipfire-source-r$SVN_REVISION.tar.gz
+               ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH$SVN_REVISION/ svn_status
                if [ "$?" -eq "0" ]; then
-                       echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/."
+                       echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $FTP_ISO_URL$FTP_ISO_PATH$SVN_REVISION/."
                else
                        echo -e "There was an error while uploading the iso to the ftp server."
                        exit 1
                fi
                if [ "$3" = "--with-sources-cd" ]; then
-                       ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-sources-cd-$VERSION.$MACHINE.iso
+                       ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/$SVN_REVISION/ ipfire-sources-cd-$VERSION.$MACHINE.iso
                fi
                ;;
          paks)
index f414d5a..29e067a 100644 (file)
@@ -67,7 +67,7 @@ return 0;
 
 if (strcmp(argv[1], "generatepolicy")==0)
 {
-snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --create-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.txt, argv[2]);
+snprintf(command, BUFFER_SIZE-1, "/usr/sbin/twadmin --create-polfile --site-keyfile /var/ipfire/tripwire/site.key --site-passphrase %s --polfile /var/ipfire/tripwire/tw.pol --cfgfile /var/ipfire/tripwire/tw.cfg /var/ipfire/tripwire/twpol.txt", argv[2]);
 safe_system(command);
 snprintf(command, BUFFER_SIZE-1, "/usr/sbin/tripwire --init --cfgfile /var/ipfire/tripwire/tw.cfg --polfile /var/ipfire/tripwire/tw.pol --local-passphrase %s", argv[3]);
 safe_system(command);
@@ -139,4 +139,4 @@ safe_system(command);
 return 0;
 }
 return 0;
-}
\ No newline at end of file
+}
index fde6ef1..147cd49 100644 (file)
@@ -473,12 +473,12 @@ batch_script() {
        fi
 
        echo "### RUNNING BUILD"
-       $0 build
+       $0 build --devel
        evaluate 1 mail_me ERROR
 
-#      echo "### UPLOADING ISO"
-#      $0 upload iso
-#      evaluate 1 mail_me ISO
+       echo "### UPLOADING ISO"
+       $0 upload iso
+       evaluate 1 mail_me ISO
        
 #      echo -ne "### UPLOADING PAKS"
 #      $0 upload paks