]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
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 38a82a144bac4147d935108a99437a1fb3839dd9..d1d58659e046ba5316032d0762e681d051f5a811 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 afa3a17cba078ee8c23735d0e90da8ef0f917135..e7d2fca79ff50947bf5ab21c211162f2009f8f61 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 c8906bc55ede57d3645a30fa4fc94f80833feacb..848e4279470a3e1e2fb5aea6e41655ad1cb56139 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 6991ccf353687ebf7fb5fe116f5a0304ae3934f7..9880ee2ee60d7af4ab0168843d6a87abd944b53a 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 dc38c00b12c33c82d5e588bff514f1cd9f550a77..b53e917294f9d2083aac266d471da25682866d30 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 536dda89a3ccba7565c4a1fb027010f782eaa30c..aad067fafaae9e6860a90d8363327c4e75f3f0ba 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 cdfc81cd154edf0984ceca747cfe4e193bb8ddc1..4c704dc0a0aeacfa8a6fea90950ef3ec88513322 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 988c9e2c098c4dfed55b851836ca48ce2bc18b88..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -2,5 +2,3 @@
 . /opt/pakfire/lib/functions.sh
 
 extract_files
-
-reload_all
index 988c9e2c098c4dfed55b851836ca48ce2bc18b88..a47a7831dc62dba77d122eb1f06347e98cb65ff9 100644 (file)
@@ -2,5 +2,3 @@
 . /opt/pakfire/lib/functions.sh
 
 extract_files
-
-reload_all