Fix samba errors where it cannot load the timezone, configurable through kamikaze...
authorFlorian Fainelli <florian@openwrt.org>
Tue, 10 Apr 2007 11:01:17 +0000 (11:01 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 10 Apr 2007 11:01:17 +0000 (11:01 +0000)
SVN-Revision: 6921

net/samba/files/samba.init
net/samba/files/smbd.config [new file with mode: 0644]

index 504ce8a6052d43663ab1b3e3a9f34673f3883f70..00c7da7fdb3616bc6ef2d322d86acf59cedb1c45 100644 (file)
@@ -6,8 +6,26 @@ RUN_D=/var/run/samba
 NMBD_PID_F=$RUN_D/nmbd.pid
 SMBD_PID_F=$RUN_D/smbd.pid
 
+. /etc/functions.sh
+
+config_cb() {
+        local cfg="$CONFIG_SECTION"
+        local cfgtype
+        config_get cfgtype "$cfg" TYPE
+
+        case "$cfgtype" in
+                timezone)
+                        config_get posixtz      $cfg posixtz
+                        config_get zoneinfo     $cfg zoneinfo
+                       echo "$posixtz" > /etc/TZ
+                ;;
+        esac
+}
+
+
 start() {
        [ -f $DEFAULT ] && . $DEFAULT
+       config_load timezone&
        mkdir -p $RUN_D
        nmbd -D $NMBD_OPTIONS
        smbd -D $SMBD_OPTIONS
diff --git a/net/samba/files/smbd.config b/net/samba/files/smbd.config
new file mode 100644 (file)
index 0000000..6993b8e
--- /dev/null
@@ -0,0 +1,3 @@
+# use a random selection of 8 public stratum 2 servers
+# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
+servers pool.ntp.org