diff options
author | wiz <wiz@pkgsrc.org> | 2001-03-09 16:09:36 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2001-03-09 16:09:36 +0000 |
commit | a9c9600de3dac487ed41d251b10d897ae69a9bc6 (patch) | |
tree | d60df80d50576bdefecc4d628604f2a6916eb7d6 /net/sharity-light/files | |
parent | ed62ce3be5ed5cb71789a96d134f061d11f1f665 (diff) | |
download | pkgsrc-a9c9600de3dac487ed41d251b10d897ae69a9bc6.tar.gz |
sharity-light-1.2, the descendent of rumba.
Changes since 0.6 (except some OS fixes):
- renamed everything to Sharity-Light. It turned out that Wall Data
Incorporated has registered the trademark "RUMBA". No functional changes
have been made. The executable is now "shlight" and the version number
has been set to 1.0 to indicate that the product is now well tested and
considered stable, at least as stable as it can and will get.
- fixed timezone bug in kernel.c kernel_init()
- fixed crash when no mountpoint was specified
- added option to set workgroup/domain
Package provided by Jared McNeill in pkg/12360 based on the previous
rumba package.
Diffstat (limited to 'net/sharity-light/files')
-rw-r--r-- | net/sharity-light/files/Makefile.unshlight | 7 | ||||
-rw-r--r-- | net/sharity-light/files/md5 | 3 | ||||
-rw-r--r-- | net/sharity-light/files/patch-sum | 4 | ||||
-rw-r--r-- | net/sharity-light/files/unshlight.c | 74 |
4 files changed, 88 insertions, 0 deletions
diff --git a/net/sharity-light/files/Makefile.unshlight b/net/sharity-light/files/Makefile.unshlight new file mode 100644 index 00000000000..155dcf0564f --- /dev/null +++ b/net/sharity-light/files/Makefile.unshlight @@ -0,0 +1,7 @@ +# +# $NetBSD: Makefile.unshlight,v 1.1.1.1 2001/03/09 16:09:36 wiz Exp $ +# +PROG= unshlight +NOMAN= sorry + +.include <bsd.prog.mk> diff --git a/net/sharity-light/files/md5 b/net/sharity-light/files/md5 new file mode 100644 index 00000000000..d23b260339b --- /dev/null +++ b/net/sharity-light/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/03/09 16:09:36 wiz Exp $ + +SHA1 (Sharity-Light.1.2.tar.gz) = 4a8e93695b1772005e401c2aafbd3f5f70a3b30e diff --git a/net/sharity-light/files/patch-sum b/net/sharity-light/files/patch-sum new file mode 100644 index 00000000000..c0de54b4187 --- /dev/null +++ b/net/sharity-light/files/patch-sum @@ -0,0 +1,4 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/03/09 16:09:36 wiz Exp $ + +SHA1 (patch-aa) = 349384306807e8d0e16334a2d9a7e7e0002ef8d1 +SHA1 (patch-ab) = 42c29cb072b38d887231f546a967ebd85b708048 diff --git a/net/sharity-light/files/unshlight.c b/net/sharity-light/files/unshlight.c new file mode 100644 index 00000000000..67c9d4c8e7b --- /dev/null +++ b/net/sharity-light/files/unshlight.c @@ -0,0 +1,74 @@ +/* $NetBSD: unshlight.c,v 1.1.1.1 2001/03/09 16:09:36 wiz Exp $ */ +#include <sys/param.h> +#include <sys/mount.h> + +#include <err.h> +#include <sysexits.h> +#include <unistd.h> +#include <stdlib.h> +#include <signal.h> + +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<mntcount; i++) { + char* s; + int error; + if (argc > 0 && strcmp(abspath, mntbuf[i].f_mntonname) != 0) continue; + if (strcmp(mntbuf[i].f_fstypename,MOUNT_NFS) !=0 ) continue; + 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]"); +} |