summaryrefslogtreecommitdiffstats
path: root/openwrt/package/samba/files
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/package/samba/files')
-rw-r--r--openwrt/package/samba/files/samba.init26
-rw-r--r--openwrt/package/samba/files/smb.conf14
2 files changed, 40 insertions, 0 deletions
diff --git a/openwrt/package/samba/files/samba.init b/openwrt/package/samba/files/samba.init
new file mode 100644
index 000000000..43ab372ca
--- /dev/null
+++ b/openwrt/package/samba/files/samba.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+DEFAULT=/etc/default/samba
+LOG_D=/var/log/samba
+RUN_D=/var/run/samba
+NMBD_PID_F=$RUN_D/nmbd.pid
+SMBD_PID_F=$RUN_D/smbd.pid
+[ -f $DEFAULT ] && . $DEFAULT
+
+case $1 in
+ start)
+ mkdir -p $LOG_D
+ mkdir -p $RUN_D
+ nmbd -D $NMBD_OPTIONS
+ smbd -D $SMBD_OPTIONS
+ ;;
+ stop)
+ [ -f $SMBD_PID_F ] && kill $(cat $SMBD_PID_F)
+ [ -f $NMBD_PID_F ] && kill $(cat $NMBD_PID_F)
+ ;;
+ *)
+ echo "usage: $0 (start|stop)"
+ exit 1
+esac
+
+exit $?
diff --git a/openwrt/package/samba/files/smb.conf b/openwrt/package/samba/files/smb.conf
new file mode 100644
index 000000000..4c4cd1dab
--- /dev/null
+++ b/openwrt/package/samba/files/smb.conf
@@ -0,0 +1,14 @@
+[global]
+ workgroup = OpenWrt
+ security = share
+ guest account = nobody
+ local master = yes
+ name resolve order = lmhosts hosts bcast
+
+[tmp]
+ comment = /tmp
+ path = /tmp
+ browseable = yes
+ public = yes
+ writeable = no
+