Index: head/net/sharity-light/Makefile =================================================================== --- head/net/sharity-light/Makefile (revision 14031) +++ head/net/sharity-light/Makefile (revision 14032) @@ -1,43 +1,38 @@ # New ports collection makefile for: sharity-light # Version required: 1.0 # Date created: 14 June 1997 # Whom: Dmitrij Tejblum # -# $Id: Makefile,v 1.6 1998/07/07 19:17:15 dt Exp $ +# $Id: Makefile,v 1.7 1998/10/14 00:26:49 jseger Exp $ # DISTNAME= Sharity-Light.1.0.s PKGNAME= sharity-light-1.0 CATEGORIES= net MASTER_SITES= ftp://ftp.obdev.at/pub/Products/Sharity-Light/ \ ftp://ftp.rhrz.uni-bonn.de/pub-koeln/net/samba/ \ ftp://ftp.warpnet.ro/mirrors/ftp.obdev.at/pub/Products/Sharity-Light/ MAINTAINER= dt@FreeBSD.ORG - -OSVERSION!= sysctl -n kern.osreldate -.if ${OSVERSION} >= 300000 -BROKEN= MOUNT_NFS undeclared -.endif MAN8= smbmount.8 post-extract: @${MKDIR} work/unshlight @${CP} ${FILESDIR}/unshlight.c ${WRKDIR}/unshlight @${CP} files/Makefile.unshlight ${WRKDIR}/unshlight/Makefile post-build: cd ${WRKDIR}/unshlight && make do-install: ${INSTALL_PROGRAM} ${WRKSRC}/shlight ${PREFIX}/sbin ${INSTALL_PROGRAM} ${WRKDIR}/unshlight/unshlight ${PREFIX}/sbin .if !defined(NOPORTDOCS) ${MKDIR} ${PREFIX}/share/doc/Sharity-Light ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/Sharity-Light/README ${INSTALL_DATA} ${WRKSRC}/FAQ.txt ${PREFIX}/share/doc/Sharity-Light/FAQ .endif ${INSTALL_MAN} ${WRKSRC}/smbmount.8 ${PREFIX}/man/man8 .include Property changes on: head/net/sharity-light/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/net/sharity-light/files/unshlight.c =================================================================== --- head/net/sharity-light/files/unshlight.c (revision 14031) +++ head/net/sharity-light/files/unshlight.c (revision 14032) @@ -1,73 +1,77 @@ #include #include #include #include #include #include #include static void usage(void); int main(int argc, char** argv) { struct statfs* mntbuf; int mntcount, i; int aflag=0; int ch; while ( (ch = getopt(argc, argv, "a")) != -1) { switch (ch) { case 'a': aflag=1; break; case '?': default: usage(); } } argc -= optind; argv += optind; if (aflag && argc != 0) usage(); if (!aflag && argc == 0) usage(); for (; argc>0 || aflag; aflag?(void)(aflag=0):(void)(argc--, argv++)) { char abspath[MAXPATHLEN]; pid_t pid=0; if (argc > 0) { if (realpath(argv[0], abspath) == 0) { warn(abspath); continue; } } mntcount=getmntinfo(&mntbuf, MNT_NOWAIT); if (mntcount < 0) err(EX_OSERR, "getmntinfo"); for (i=0; i 0 && strcmp(abspath, mntbuf[i].f_mntonname) != 0) continue; +#if defined(__FreeBSD_version) && __FreeBSD_version > 300000 + if (strcmp(mntbuf[i].f_fstypename, "nfs") != 0) continue; +#else if (mntbuf[i].f_type != MOUNT_NFS) continue; +#endif if (strncmp(mntbuf[i].f_mntfromname, "shlight-", 8) != 0) continue; pid=strtoul(mntbuf[i].f_mntfromname+8, &s, 10); if (*s) continue; error = unmount (mntbuf[i].f_mntonname, 0); if (error == 0) { kill (pid, SIGHUP); } else { warn(mntbuf[i].f_mntonname); } } if (argc > 0 && !pid) warnx("%s: not currently mounted", abspath); } } void usage(void) { errx(EX_USAGE, "Usage: unshlight [-a] [node]"); } Property changes on: head/net/sharity-light/files/unshlight.c ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property