r6571: create a simple smb.conf by provision.pl
authorStefan Metzmacher <metze@samba.org>
Mon, 2 May 2005 12:34:44 +0000 (12:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:26 +0000 (13:16 -0500)
metze

source/setup/provision.pl
source/setup/provision.smb.conf [new file with mode: 0644]

index b515a5a9eb47b79aa0f92e646ee542543ad061db..a87f2aef54ba3d5465d2aad96ce3e7dd25570451 100755 (executable)
@@ -440,6 +440,14 @@ $opt_quiet or print "saving dns zone to $newdb/$dnsdomain.zone ...\n";
 
 FileSave("$newdb/$dnsdomain.zone", $res);
 
+$data = FileLoad("setup/provision.smb.conf") || die "Unable to load provision.smb.conf\n";
+
+$res = apply_substitutions($data);
+
+$opt_quiet or print "saving smb.conf to $newdb/smb.conf ...\n";
+
+FileSave("$newdb/smb.conf", $res);
+
 $opt_quiet or print "creating $newdb/hklm.ldb ... \n";
 
 system("ldbadd -H $newdb/hklm.ldb setup/hklm.ldif") == 0 || die "Failed to create hklm.ldb\n";
@@ -449,5 +457,7 @@ $opt_quiet or print "
 Installation:
 - Please move $newdb/*.ldb to the private/ directory of your
   Samba4 installation
+- Please move $newdb/smb.conf to the lib/ directory of your
+  Samba4 installation
 - Please use $newdb/$dnsdomain.zone in BIND on your dns server
 ";
diff --git a/source/setup/provision.smb.conf b/source/setup/provision.smb.conf
new file mode 100644 (file)
index 0000000..21b250a
--- /dev/null
@@ -0,0 +1,4 @@
+[globals]
+       netbios name    = ${HOSTNAME}
+       workgroup       = ${DOMAIN}
+       realm           = ${REALM}