Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2006 16:07:43 +0600 (NOVT)
From:      "Rashid N. Achilov" <shelton@granch.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/94601: new port sysutils/mountsmb2 - automounting SMB/CIFS shares shell script
Message-ID:  <200603171007.k2HA7hKj002706@www.granch.ru>
Resent-Message-ID: <200603171010.k2HAAJTC054249@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94601
>Category:       ports
>Synopsis:       new port sysutils/mountsmb2 - automounting SMB/CIFS shares shell script
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 17 10:10:19 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Rashid N. Achilov
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
Granch Ltd.
>Environment:
System: FreeBSD www.granch.ru 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Mon Nov 21 03:42:40 NOVT 2005 root@:/usr/src/sys/i386/compile/Proxy i386
>Description:
This is a set of scripts, which impelemnts automounting SMB/CIFS (Windows) shares
when user logging in, similar in Windows world. Requires GNU AWK, sudo and Samba
>How-To-Repeat:
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mountsmb2
#	mountsmb2/Makefile
#	mountsmb2/pkg-plist
#	mountsmb2/distinfo
#	mountsmb2/pkg-descr
#	mountsmb2/pkg-message
#
echo c - mountsmb2
mkdir -p mountsmb2 > /dev/null 2>&1
echo x - mountsmb2/Makefile
sed 's/^X//' >mountsmb2/Makefile << 'END-of-mountsmb2/Makefile'
X# New ports collection makefile for:	mountsmb2
X# Date created:				17 Mar 2006
X# Whom:					Rashid N. Achilov <shelton@granch.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mountsmb2
XPORTVERSION=	0.90.1
XCATEGORIES=	sysutils net
XMASTER_SITES=	ftp://ftp.granch.ru/pub/other/
X
XMAINTAINER=	shelton@www.granch.ru
XCOMMENT=	SMB/CIFS shares mounting scripts to do it at login
X
XRUN_DEPENDS=	findsmb:${PORTSDIR}/net/samba3 \
X		sudo:${PORTSDIR}/security/sudo \
X		gawk:${PORTSDIR}/lang/gawk
X
XUSE_BZIP2=	yes
XNO_BUILD=	yes
X
X.include <bsd.port.pre.mk>
X
Xdo-install:
X
X.for i in smb2awk smb2nsmbrc mountsmb2
X	${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/bin
X.endfor
X
X	-@${MKDIR} ${EXAMPLESDIR}
X
X.for i in sudoers .login .nsmbrc .mssmbrc
X	${INSTALL_DATA} ${WRKSRC}/${i} ${EXAMPLESDIR}
X.endfor
X
X	-@${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/README.FreeBSD ${DOCSDIR}
X
X	@${SED} -e "s,%%EXAMPLESDIR%%,${EXAMPLESDIR},g" -i .old ${PKGMESSAGE}
X	@${CAT} ${PKGMESSAGE}
X
X	@${RM} -f ${PKGMESSAGE}
X	@${MV} ${PKGMESSAGE}.old ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-mountsmb2/Makefile
echo x - mountsmb2/pkg-plist
sed 's/^X//' >mountsmb2/pkg-plist << 'END-of-mountsmb2/pkg-plist'
Xbin/mountsmb2
Xbin/smb2nsmbrc
Xbin/smb2awk
Xshare/examples/mountsmb2/sudoers
Xshare/examples/mountsmb2/.login
Xshare/examples/mountsmb2/.nsmbrc
Xshare/examples/mountsmb2/.mssmbrc
Xshare/doc/mountsmb2/README.FreeBSD
X@dirrm %%DOCSDIR%%
X@dirrm %%EXAMPLESDIR%%
END-of-mountsmb2/pkg-plist
echo x - mountsmb2/distinfo
sed 's/^X//' >mountsmb2/distinfo << 'END-of-mountsmb2/distinfo'
XMD5 (mountsmb2-0.90.1.tar.bz2) = 7312cf69995b148dfd03a845805a58b7
XSHA256 (mountsmb2-0.90.1.tar.bz2) = 5efae56f0d38b3964cff38960f1b855b62210d8332ddeffe5e9ae209bbf06ee7
XSIZE (mountsmb2-0.90.1.tar.bz2) = 5505
END-of-mountsmb2/distinfo
echo x - mountsmb2/pkg-descr
sed 's/^X//' >mountsmb2/pkg-descr << 'END-of-mountsmb2/pkg-descr'
XThis set of scripts allows you to imitate Windows feature to automount some
Xnetwork shares at login time. It is relatively difficult in setup - you should
Xunderstand, what you do, know how to install SMB/CIFS support into a kernel,
Xhow to setup /etc/nsmb.conf and .nsmbrc files, etc.
X
XScript are written on Shell. Uses Samba utility findsmb to locate Windows boxes
Xwhen generated .nsmbrc file in semi-automated mode with smb2nsmbrc helper script.
XAlso uses their own file .mssmbrc to describe any share, mounted with mountsmb2
X
XWWW: http://www.granch.ru/~shelton
END-of-mountsmb2/pkg-descr
echo x - mountsmb2/pkg-message
sed 's/^X//' >mountsmb2/pkg-message << 'END-of-mountsmb2/pkg-message'
X***********************************************************
X
XPlease, read %%EXAMPLESDIR%%/README.FreeBSD
X*B*E*F*O*R*E* the FIRST RUN of Mountsmb2!
X
XIn order to run Mountsmb2 properly, be sure that:
X
X1. Your kernel is configured properly
X2. Your /etc/nsmb.conf file is configured properly
X3. Your .nsmbrc file is configured properly (this means, that
X   the password to *ANY* server in your network is recorded in
X   this file. For semi-automatic creation of .nsmbrc you can use
X   the smb2nsmbrc script)
X4. Your .mssmbrc file is created and filled properly
X
XKeep in mind, that:
X
X1. Mountsmb2 only calls mount_smbfs to mount shares with params, described in
X   a .mssmbrc file
X2. DO NOT DISTURB ME ABOUT FreeBSD's SMB IMPLEMENTATION!
X
X************************************************************
END-of-mountsmb2/pkg-message
exit
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603171007.k2HA7hKj002706>