diff options
author | Luotao Fu <l.fu@pengutronix.de> | 2007-01-26 12:51:59 +0000 |
---|---|---|
committer | Luotao Fu <l.fu@pengutronix.de> | 2007-01-26 12:51:59 +0000 |
commit | dba92da25c27f0af929bb177d1f480e954153253 (patch) | |
tree | 68227aacc1078c6df8cdc7abb7515cee95e069f7 /generic | |
parent | 0af7190e2cf929585e8d29d2cbf3c1f0145c3941 (diff) | |
download | ptxdist-dba92da25c27f0af929bb177d1f480e954153253.tar.gz ptxdist-dba92da25c27f0af929bb177d1f480e954153253.tar.xz |
default configuration file and startup script for samba
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6932 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'generic')
-rwxr-xr-x | generic/etc/init.d/samba | 47 | ||||
-rw-r--r-- | generic/etc/samba/smb.conf | 38 |
2 files changed, 85 insertions, 0 deletions
diff --git a/generic/etc/init.d/samba b/generic/etc/init.d/samba new file mode 100755 index 000000000..d7500867f --- /dev/null +++ b/generic/etc/init.d/samba @@ -0,0 +1,47 @@ +#!/bin/sh +# + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON_SMB=/usr/sbin/smbd +DAEMON_NMB=/usr/sbin/nmbd +NAME=samba +DESC="Samba server" + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + start-stop-daemon -S -x "$DAEMON_SMB" -D + echo -n "$DAEMON_SMB. " + start-stop-daemon -S -x "$DAEMON_NMB" -D + echo -n "$DAEMON_NMB. " + echo "done" + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON_SMB" + echo -n "$DAEMON_SMB. " + start-stop-daemon -K -x "$DAEMON_NMB" + echo -n "$DAEMON_NMB." + echo "done" + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + start-stop-daemon -K -x "$DAEMON_SMB" + start-stop-daemon -K -x "$DAEMON_NMB" + start-stop-daemon -S -x "$DAEMON_SMB" -D + echo -n "$DAEMON_SMB. " + start-stop-daemon -S -x "$DAEMON_NMB" -D + echo -n "$DAEMON_NMB. " + echo "done" +sleep 1 + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/generic/etc/samba/smb.conf b/generic/etc/samba/smb.conf new file mode 100644 index 000000000..96720c3b9 --- /dev/null +++ b/generic/etc/samba/smb.conf @@ -0,0 +1,38 @@ +; /etc/samba/smb.conf +; Sample smbconf file provided by ptxdist. Please +; consult samba manual page if you wish to make +; changes +[global] +; guest account = nobody + server string = PTXdist sample samba server + log file = /var/log/samba-log.%m + lock directory = /var/locks + share modes = yes + security = share + encrypt passwords = no + guest account = root + interfaces = eth0 + +[homes] + comment = Home Directories + browseable = no + writable = no + create mask = 0700 + directory mask = 0700 + +[share] + comment = Data Directory + path = /home + browseable = yes + read only = no + create mode = 0750 + public = yes + +[printers] + comment = All Printers + browseable = no + path = /tmp + printable = yes + public = no + writable = no + create mode = 0700 |