Pakfire an den neuen Server angepasst.
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 22 Sep 2007 10:48:09 +0000 (10:48 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Sat, 22 Sep 2007 10:48:09 +0000 (10:48 +0000)
Die Pakete wurden nicht richtig gebaut, da die speiziellen Scripts nicht beruecksichtigt wurden.
Fix in der mpfire makefile.
syslogdctrl sollte nun die Direktiven besser ersetzen.

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

doc/packages-list.txt
lfs/Config
lfs/mpfire
src/misc-progs/syslogdctrl.c
src/pakfire/lib/functions.pl
src/pakfire/lib/functions.sh
src/paks/clamav/install.sh
src/paks/default/install.sh
src/paks/default/update.sh

index 38a82a1..d1d5865 100644 (file)
 * rtorrent-0.7.6
 * samba-3.0.25c
 * screen-4.0.2
-* sdparm-0.90
 * sdparm-1.01
-* sdparm-1.02
 * sed-4.1.5
 * setserial-2.17
 * shadow-4.0.15
index afa3a17..e7d2fca 100644 (file)
@@ -178,7 +178,7 @@ define PAK
        # Bringing the files to their right place.
        @rm -rf /install/packages/package
        @mkdir -p /install/packages/package
-       if [ -e "/usr/src/src/paks $(PROG)" ]; then \
+       if [ -e "/usr/src/src/paks/$(PROG)" ]; then \
                cp -f /usr/src/src/paks/$(PROG)/{,un}install.sh /usr/src/src/paks/$(PROG)/update.sh \
                /install/packages/package; \
        else \
index c8906bc..848e427 100644 (file)
@@ -65,5 +65,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        install -v -m 644 $(DIR_SRC)/config/mpfire/webradio /var/ipfire/mpfire/
        chown root.nobody /var/ipfire/mpfire/{mpd.conf,playlist.m3u}
        chown nobody.nobody /var/ipfire/mpfire/{settings,webradio}
-  chown root.nobody /var/ipfire/mpfire/db/mpd.db
+       chown root.nobody /var/ipfire/mpfire/db/mpd.db
        @$(POSTBUILD)
index 6991ccf..9880ee2 100644 (file)
@@ -30,7 +30,7 @@
 
 int main(void)
 {
-   char buffer[STRING_SIZE], hostname[STRING_SIZE], varmessages[STRING_SIZE];
+   char buffer[STRING_SIZE], command[STRING_SIZE], hostname[STRING_SIZE], varmessages[STRING_SIZE];
    int config_fd,rc,fd,pid;
    struct stat st;
    struct keyvalue *kv = NULL;
@@ -111,10 +111,8 @@ int main(void)
       snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@\\).\\+$/\\1%s/' /etc/syslog.conf >&%d", hostname, config_fd );
    else
       snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's/^#\\?\\(\\*\\.\\*[[:blank:]]\\+@.\\+\\)$/#\\1/' /etc/syslog.conf >&%d", config_fd );
-      
-      snprintf(buffer, STRING_SIZE - 1, "/bin/sed -e 's#\\.\\*/var/log/messages\\.\\*#%s     /var/log/messages#' /etc/syslog.conf >&%d", varmessages, config_fd );
 
-   /* if the return code isn't 0 failsafe */
+     /* if the return code isn't 0 failsafe */
    if ((rc = unpriv_system(buffer,99,99)) != 0)
    {
       fprintf(stderr, "sed returned bad exit code: %d\n", rc);
@@ -123,6 +121,13 @@ int main(void)
       exit(ERR_CONFIG);
    }
    close(config_fd);
+   
+   /* Replace the logging option*/
+
+     safe_system("grep -v '/var/log/messages' < /etc/syslog.conf.new > /etc/syslog.conf.tmp && mv /etc/syslog.conf.tmp /etc/syslog.conf.new");
+     snprintf(command, STRING_SIZE-1, "printf '%s     /var/log/messages' >> /etc/syslog.conf.new", varmessages );
+     safe_system(command);
+
    if (rename("/etc/syslog.conf.new", "/etc/syslog.conf") == -1)
    {
       perror("Unable to replace old config file");
index dc38c00..b53e917 100644 (file)
@@ -166,10 +166,10 @@ sub fetchfile {
                &General::readhash("${General::swroot}/proxy/advanced/settings", \%proxysettings);
 
                if ($proxysettings{'UPSTREAM_PROXY'}) {
-                       logger("DOWNLOAD INFO: Upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\"") unless ($bfile =~ /^counter\?.*/); 
+                       logger("DOWNLOAD INFO: Upstream proxy: \"$proxysettings{'UPSTREAM_PROXY'}\"") unless ($bfile =~ /^counter.py\?.*/); 
                        if ($proxysettings{'UPSTREAM_USER'}) {
                                $ua->proxy("http","http://$proxysettings{'UPSTREAM_USER'}:$proxysettings{'UPSTREAM_PASSWORD'}@"."$proxysettings{'UPSTREAM_PROXY'}/");
-                               logger("DOWNLOAD INFO: Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\"") unless ($bfile =~ /^counter\?.*/);
+                               logger("DOWNLOAD INFO: Logging in with: \"$proxysettings{'UPSTREAM_USER'}\" - \"$proxysettings{'UPSTREAM_PASSWORD'}\"") unless ($bfile =~ /^counter.py\?.*/);
                        } else {
                                $ua->proxy("http","http://$proxysettings{'UPSTREAM_PROXY'}/");
                        }
@@ -179,7 +179,7 @@ sub fetchfile {
                my $url = "http://$host/$file";
                my $response;
                
-               unless ($bfile =~ /^counter\?.*/) {
+               unless ($bfile =~ /^counter.py\?.*/) {
                        my $result = $ua->head($url);
                        my $remote_headers = $result->headers;
                        $total_size = $remote_headers->content_length;
@@ -201,7 +201,7 @@ sub fetchfile {
                }
                
                if ($response->is_success) {
-                       unless ($bfile =~ /^counter\?.*/) {
+                       unless ($bfile =~ /^counter.py\?.*/) {
                                if (open(FILE, ">$Conf::tmpdir/$bfile")) {
                                        print FILE $final_data;
                                        close(FILE);
@@ -644,7 +644,7 @@ sub setuppak {
        my $return = system("cd $Conf::tmpdir && NAME=$pak ./install.sh >> $Conf::logdir/install-$pak.log 2>&1");
        $return %= 255;
        if ($pakfiresettings{'UUID'} ne "off") {
-               fetchfile("cgi-bin/counter?ver=$Conf::version&uuid=$Conf::uuid&ipak=$pak&return=$return", "$Conf::mainserver");
+               fetchfile("counter.py?ver=$Conf::version&uuid=$Conf::uuid&ipak=$pak&return=$return", "$Conf::mainserver");
        }
        if ($return == 0) {
          move("$Conf::tmpdir/ROOTFILES", "$Conf::dbdir/rootfiles/$pak");
@@ -705,7 +705,7 @@ sub upgradepak {
        my $return = system("cd $Conf::tmpdir && NAME=$pak ./update.sh >> $Conf::logdir/update-$pak.log 2>&1");
        $return %= 255;
        if ($pakfiresettings{'UUID'} ne "off") {
-               fetchfile("cgi-bin/counter?ver=$Conf::version&uuid=$Conf::uuid&upak=$pak&return=$return", "$Conf::mainserver");
+               fetchfile("counter.py?ver=$Conf::version&uuid=$Conf::uuid&upak=$pak&return=$return", "$Conf::mainserver");
        }
        if ($return == 0) {
          move("$Conf::tmpdir/ROOTFILES", "$Conf::dbdir/rootfiles/$pak");
@@ -730,7 +730,7 @@ sub removepak {
        my $return = system("cd $Conf::tmpdir && NAME=$pak ./uninstall.sh >> $Conf::logdir/uninstall-$pak.log 2>&1");
        $return %= 255;
        if ($pakfiresettings{'UUID'} ne "off") {
-               fetchfile("cgi-bin/counter?ver=$Conf::version&uuid=$Conf::uuid&dpak=$pak&return=$return", "$Conf::mainserver");
+               fetchfile("counter.py?ver=$Conf::version&uuid=$Conf::uuid&dpak=$pak&return=$return", "$Conf::mainserver");
        }
        if ($return == 0) {
          open(FILE, "<$Conf::dbdir/rootfiles/$pak");
@@ -793,7 +793,7 @@ sub senduuid {
                        $Conf::uuid = `cat $Conf::dbdir/uuid`;
                }
                logger("Sending my uuid: $Conf::uuid");
-               fetchfile("cgi-bin/counter?ver=$Conf::version&uuid=$Conf::uuid", "$Conf::mainserver");
+               fetchfile("counter.py?ver=$Conf::version&uuid=$Conf::uuid", "$Conf::mainserver");
                system("rm -f $Conf::tmpdir/counter* 2>/dev/null");
        }
 }
index 536dda8..aad067f 100644 (file)
@@ -25,20 +25,15 @@ extract_files() {
        echo "...Finished."
 }
 
-reload_all() {
-       reload_modules
-       reload_libs
-}
-
 reload_libs() {
        echo "(Re-)Initializing the lib-cache..."       
-       ldconfig
+       ldconfig -vv
        echo "...Finished."
 }
 
 reload_modules() {
        echo "(Re-)Initializing the module-dependencies..."     
-       depmod -a
+       depmod -va
        echo "...Finished."
 }
 
index cdfc81c..4c704dc 100644 (file)
@@ -3,6 +3,6 @@
 
 extract_files
 
-chown clamav:clamav /usr/share/clamav
+chown clamav:clamav /usr/share/clamav -Rv
 
 /usr/local/bin/clamavctrl enable
index 988c9e2..a47a783 100644 (file)
@@ -2,5 +2,3 @@
 . /opt/pakfire/lib/functions.sh
 
 extract_files
-
-reload_all
index 988c9e2..a47a783 100644 (file)
@@ -2,5 +2,3 @@
 . /opt/pakfire/lib/functions.sh
 
 extract_files
-
-reload_all