gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r988 - GNUnet/src/conf


From: durner
Subject: [GNUnet-SVN] r988 - GNUnet/src/conf
Date: Fri, 24 Jun 2005 13:30:55 -0700 (PDT)

Author: durner
Date: 2005-06-24 13:30:52 -0700 (Fri, 24 Jun 2005)
New Revision: 988

Modified:
   GNUnet/src/conf/wizard_util.c
Log:
fix

Modified: GNUnet/src/conf/wizard_util.c
===================================================================
--- GNUnet/src/conf/wizard_util.c       2005-06-24 20:13:13 UTC (rev 987)
+++ GNUnet/src/conf/wizard_util.c       2005-06-24 20:30:52 UTC (rev 988)
@@ -39,13 +39,18 @@
                ListNICs(callback);
 #else
                char entry[11], *dst;
-               FILE *f = popen("ifconfig 2> /dev/null", "r");
+               FILE *f;
+               
+               if (system("ifconfig 2> /dev/null"))
+                       if (system("/sbin/ifconfig 2> /dev/null") == 0)
+                               f = popen("/sbin/ifconfig 2> /dev/null", "r");
+                       else
+                               f = null;
+               else
+                       f = popen("ifconfig 2> /dev/null", "r");
+               
                if (!f)
-               {
-                       f = popen("/sbin/ifconfig 2> /dev/null", "r");
-                       if (!f)
-                               return;
-               }
+                       return;
                        
                while(1)
                {
@@ -323,12 +328,13 @@
                                return 0;
                }
                else {
-                       if (UNLINK("/etc/init.d/gnunetd") != -1)
+                       if (UNLINK("/etc/init.d/gnunetd") != -1) {
                                if (ACCESS("/usr/sbin/update-rc.d", X_OK) == 0) 
{
                                        errno = system("/usr/sbin/update-rc.d 
gnunetd remove");
                                        if (errno != 0)
                                                return 0;
                                }
+                       }
                        else
                                return 0;
                }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]