Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=9136ea864574c462df5740f3e84f2a52e68cc548

commit 9136ea864574c462df5740f3e84f2a52e68cc548
Author: James Buren <[email protected]>
Date:   Fri Sep 7 02:07:44 2012 -0500

implement a bit more of postconfig module

diff --git a/src/local.h b/src/local.h
index 070f67d..01ebcf3 100644
--- a/src/local.h
+++ b/src/local.h
@@ -67,4 +67,5 @@ extern int main(int argc,char **argv);

extern struct global g;
extern struct module install_module;
+extern struct module postconfig_module;
extern struct module *modules[];
diff --git a/src/main.c b/src/main.c
index 4cf11af..78d88d3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,5 +34,6 @@ struct global g =
struct module *modules[] =
{
&install_module,
+  &postconfig_module,
0
};
diff --git a/src/postconfig.c b/src/postconfig.c
index 81ca4a1..8b34eb6 100644
--- a/src/postconfig.c
+++ b/src/postconfig.c
@@ -78,3 +78,44 @@ static bool is_user_setup(void)

return result;
}
+
+static void account_free(struct account *account)
+{
+  if(account == 0)
+    return;
+
+  free(account->user);
+
+  free(account->password);
+
+  free(account->group);
+
+  free(account->groups);
+
+  free(account->home);
+
+  free(account->shell);
+
+  memset(account,0,sizeof(struct account));
+}
+
+static bool postconfig_run(void)
+{
+  struct account account = {0};
+
+  if(!is_root_setup() && !ui_window_root(&account))
+    return false;
+
+  return true;
+}
+
+static void postconfig_reset(void)
+{
+}
+
+struct module postconfig_module =
+{
+  postconfig_run,
+  postconfig_reset,
+  __FILE__
+};
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to