[Frugalware-darcs] setup: loadsource: detect netinstall cds

VMiklos vmiklos at frugalware.org
Wed Mar 29 23:53:47 CEST 2006


[loadsource: detect netinstall cds
VMiklos <vmiklos at frugalware.org>**20051105004151] {
hunk ./src/plugins/loadsource.c 7
+#include <sys/stat.h>
hunk ./src/plugins/loadsource.c 94
+int is_netinstall(char *path)
+{
+	struct stat statbuf;
+	if(!((!stat(g_strdup_printf("%s/frugalware-%s", path, ARCH), &statbuf)
+		&& S_ISDIR(statbuf.st_mode)) ||
+		(!stat(g_strdup_printf("%s/extra/frugalware-%s", path, ARCH),
+		&statbuf) && S_ISDIR(statbuf.st_mode))))
+		return(1);
+	else
+		return(0);
+}
hunk ./src/plugins/loadsource.c 125
-			// TODO: is this a netinstall cd?
hunk ./src/plugins/loadsource.c 127
-			sleep(3);
+			if(is_netinstall(SOURCEDIR))
+				data_put(config, "netinstall", strdup("true"));
}


More information about the Frugalware-darcs mailing list