Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=bed56167bc79bf7565cd28b1c5972c4da5fb25f6

commit bed56167bc79bf7565cd28b1c5972c4da5fb25f6
Author: James Buren <[email protected]>
Date:   Sat Mar 2 10:38:46 2013 -0600

initial skeleton function for writing fstab

diff --git a/new/fwsetup/postconfig.c b/new/fwsetup/postconfig.c
index 164be4d..7fa76e8 100644
--- a/new/fwsetup/postconfig.c
+++ b/new/fwsetup/postconfig.c
@@ -153,6 +153,32 @@ static bool write_keyboard_conf(void)
return true;
}

+static bool write_fstab(void)
+{
+  FILE *file = 0;
+
+  if((file = fopen("etc/fstab","wb")) == 0)
+  {
+    error(strerror(errno));
+    return false;
+  }
+
+  fprintf(file,
+    "none /dev devtmpfs defaults 0 0\n"
+    "none /proc proc defaults 0 0\n"
+    "none /sys sysfs defaults 0 0\n"
+    "none /tmp tmpfs defaults 0 0\n"
+    "none /var/tmp tmpfs defaults 0 0\n"
+    "none /dev/pts devpts gid=5,mode=620 0 0\n"
+    "none /proc/bus/usb usbfs devgid=23,devmode=664 0 0\n"
+    "none /dev/shm tmpfs defaults 0 0\n"
+  );
+
+  fclose(file);
+
+  return true;
+}
+
static bool is_root_setup(void)
{
FILE *file = 0;
@@ -392,6 +418,9 @@ static bool postconfig_run(void)
if(!write_keyboard_conf())
return false;

+  if(!write_fstab())
+    return false;
+
if(!is_root_setup() && (!ui_window_root(&account) || !root_action(&account)))
{
account_free(&account);
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to