• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/samba/S91smb
Wade BerrierWade Berrier committed f6c58902acb06 Oct 2008
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
#!/bin/sh
2
#
3
# Stolen from RedHat FC5.
4
#
5
​
6
# Check that smb.conf exists.
7
[ -f /etc/samba/smb.conf ] || exit 0
8
​
9
# Make directories.
10
mkdir -p /var/cache/samba
11
mkdir -p /var/log/samba
12
mkdir -p /var/lock/subsys
13
​
14
RETVAL=0
15
​
16
start() {
17
    echo -n "Starting SMB services: "
18
    smbd -D
19
    RETVAL=$?
20
    echo "done"
21
​
22
    echo -n "Starting NMB services: "
23
    nmbd -D
24
    RETVAL2=$?
25
    echo "done"
26
​
27
    [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
28
       RETVAL=1
29
    return $RETVAL
30
}   
31
​
32
stop() {
33
    echo -n "Shutting down SMB services: "
34
    kill -9 `pidof smbd`
35
    RETVAL=$?
36
    rm -f /var/run/smbd.pid
37
    echo "done"
38
​
39
    echo -n "Shutting down NMB services: "
40
    kill -9 `pidof nmbd`
41
    RETVAL2=$?
42
    rm -f /var/run/nmbd.pid
43
​
44
    [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
45
    echo "done"
46
    return $RETVAL
47
}   
48
​
49
restart() {
50
    stop
51
    start
52
}   
53
​
54
reload() {
55
        echo -n "Reloading smb.conf file: "
56
    kill -HUP `pidof smbd`
57
    RETVAL=$?
58
    echo "done"
59
    return $RETVAL
60
}   
61
​
62
case "$1" in
63
  start)
64
    start
65
    ;;
66
  stop)
67
    stop
68
    ;;
69
  restart)
70
    restart
71
    ;;
72
  reload)
73
    reload
74
    ;;
75
  *)
76
    echo "Usage: $0 {start|stop|restart|reload}"
77
    exit 1
78
esac
79
​
80
exit $?
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.