- mkdir, chmod, cp -> install
- check for existance of the config file (instead of the config directory) before trying to install the sample config
This commit is contained in:
parent
be88935ac7
commit
93d2a3558f
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $OpenBSD: INSTALL,v 1.1 1999/05/30 23:03:00 brad Exp $
|
# $OpenBSD: INSTALL,v 1.2 2000/03/23 08:11:15 brad Exp $
|
||||||
#
|
#
|
||||||
# Pre/post-installation setup of samba
|
# Pre/post-installation setup of samba
|
||||||
|
|
||||||
@ -12,8 +12,7 @@ CONFIG_DIR=/etc/samba
|
|||||||
CONFIG_FILE=/etc/samba/smb.conf
|
CONFIG_FILE=/etc/samba/smb.conf
|
||||||
SAMBA_SPOOL=/var/spool/samba
|
SAMBA_SPOOL=/var/spool/samba
|
||||||
|
|
||||||
mkdir -p ${SAMBA_SPOOL}
|
install -d -o root -g wheel -m 1777 ${SAMBA_SPOOL}
|
||||||
chmod 1777 ${SAMBA_SPOOL}
|
|
||||||
|
|
||||||
# Function: tell the user what s/he needs to do to use the port just installed
|
# Function: tell the user what s/he needs to do to use the port just installed
|
||||||
#
|
#
|
||||||
@ -33,10 +32,10 @@ do_notice()
|
|||||||
#
|
#
|
||||||
do_install()
|
do_install()
|
||||||
{
|
{
|
||||||
mkdir -p ${CONFIG_DIR}
|
install -d -o root -g wheel -m 755 ${CONFIG_DIR}
|
||||||
cat /etc/passwd | ${PREFIX}/bin/mksmbpasswd.sh > ${CONFIG_DIR}/smbpasswd; \
|
cat /etc/passwd | ${PREFIX}/bin/mksmbpasswd.sh > ${CONFIG_DIR}/smbpasswd; \
|
||||||
chmod 600 ${CONFIG_DIR}/smbpasswd
|
chmod 600 ${CONFIG_DIR}/smbpasswd
|
||||||
cp ${PREFIX}/lib/samba/smb.conf.sample ${CONFIG_FILE}
|
install -o root -g wheel -m 644 ${PREFIX}/lib/samba/smb.conf.sample ${CONFIG_FILE}
|
||||||
echo
|
echo
|
||||||
echo "+---------------"
|
echo "+---------------"
|
||||||
echo "| The $1 configuration files in ${CONFIG_DIR},"
|
echo "| The $1 configuration files in ${CONFIG_DIR},"
|
||||||
@ -61,7 +60,7 @@ case $2 in
|
|||||||
: nothing to pre-install for this port
|
: nothing to pre-install for this port
|
||||||
;;
|
;;
|
||||||
POST-INSTALL)
|
POST-INSTALL)
|
||||||
if [ -d $CONFIG_DIR ]; then
|
if [ -f $CONFIG_FILE ]; then
|
||||||
do_notice $1
|
do_notice $1
|
||||||
else
|
else
|
||||||
do_install $1
|
do_install $1
|
||||||
|
Loading…
Reference in New Issue
Block a user