5 # Grab the full path to the smb.conf file
6 i
=`find /etc -name smb.conf`
8 # Create new smb.conf file with updated message command line
9 echo "[global]" > ~
/smb.conf.new
10 echo " message command = $1 %s %m %t &" >> ~
/smb.conf.new
11 cat $i |
grep -v "message command = " |
grep -v "\[global\]" >> ~
/smb.conf.new
16 # Move new file into place and reset permissions
17 mv -f ~
/smb.conf.new
$i
21 # Create a winpopup directory somewhere "safe"
22 #rm -rf /var/lib/winpopup --- a bit strong?
23 if [ ! -d /var
/lib
/winpopup
]; then
24 mkdir
-p /var
/lib
/winpopup
27 chmod 0777 /var
/lib
/winpopup
29 # This is to help if somebody grades up from the old behavior
30 if [ -n "`ls -A /var/lib/winpopup/`" ]; then
31 chmod 666 /var
/lib
/winpopup
/*
34 rm -f /var
/lib
/winpopup
/message
36 # Force Samba to reread configuration