From 2e888a1e2b4c3be0532eabab614a9d55616f4d81 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 10 Apr 2007 11:01:17 +0000 Subject: [PATCH] Fix samba errors where it cannot load the timezone, configurable through kamikaze configuration git-svn-id: svn://svn.openwrt.org/openwrt/packages@6921 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/samba/files/samba.init | 18 ++++++++++++++++++ net/samba/files/smbd.config | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 net/samba/files/smbd.config diff --git a/net/samba/files/samba.init b/net/samba/files/samba.init index 504ce8a60..00c7da7fd 100644 --- a/net/samba/files/samba.init +++ b/net/samba/files/samba.init @@ -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 index 000000000..6993b8eba --- /dev/null +++ b/net/samba/files/smbd.config @@ -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