Date: Tue, 28 Feb 2012 06:35:50 GMT From: vermaden <vermaden@interia.pl> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/165522: New port: sysutils/automount devd(8) based automounter for FreeBSD Message-ID: <201202280635.q1S6Zo2H051817@red.freebsd.org> Resent-Message-ID: <201202280640.q1S6e9RA089892@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 165522 >Category: ports >Synopsis: New port: sysutils/automount devd(8) based automounter for FreeBSD >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Feb 28 06:40:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: vermaden >Release: FreeBSD 9.0-RELEASE >Organization: >Environment: >Description: Hi, I have made port of 'automount' utility,here is output from portlint: | sysutils/automount % portlint | WARN: Makefile: only one MASTER_SITE configured. Consider adding additional | mirrors. | 0 fatal errors and 1 warning found. It currently supports these file systems: -- NTFS requires sysutils/fusefs-ntfs for R/W -- FAT/FAT32 -- exFAT requires sysutils/fusefs-exfat -- EXT2 -- EXT3 -- EXT4 requires sysutils/fusefs-ext4fuse -- UFS It keeps state of mounted devices at /var/run/automount.state and logs all activities to /var/log/automount.log file. The place for script is at /usr/local/sbin/automount executable. Only additional configuration it requires is /usr/local/etc/devd/automount_devd.conf file. I have created repository @ GITHUB here: https://github.com/vermaden/automount Its my first port so let me know if I need to fix anything. I did not yet created a man page, but it comes with a help page at least for now (--help or -h) option. % automount --help AUTOMOUNT is a devd(8) based automounter for FreeBSD. It supports following file systems: UFS/FAT/exFAT/NTFS/EXT2/EXT3/EXT4 It needs these ports to mount NTFS/exFAT/EXT4 respectively: o sysutils/fusefs-ntfs o sysutils/fusefs-exfat o sysutils/fusefs-ext4fuse By default it mounts/unmounts all removable media but it is possible to set some additional options at the /usr/local/etc/automount.conf config file. Below is a list of possible options with description. MNTPREFIX (set to /media by default) With this options You can alter the default root for mounting the removable media, for example to the /mnt directory. example: MNTPREFIX="/media" ENCODING (set to en_US.ISO8859-1 by default) Only used with FAT32 mounts, specifies which encoding to use at the mount. example: ENCODING="pl_PL.ISO8859-2" CODEPAGE (set to cp437 by default) Only used with FAT32 mounts, specifies which code page to use at the mount. example: CODEPAGE="cp852" USER (unset by default) If set to some username, the mount command will chown(1) the mount directory with the user and its primary user group. If used with FM option allows to launch the specified file manager after a successful mount. example: USER="vermaden" FM (unset by default) If set to file manager command, the mount will launch the specified command after successful mount. Works only if USER parameter is also set. example: FM="nautilus --browser --no-desktop" USERUMOUNT (set to NO by default) When set to YES it will 'chmod +s /sbin/umount' which would allow an USER to unmount the file system with their selected file manager. example: USERUMOUNT="YES" ATIME (set to YES by default) When set to NO it will mount filesystems with noatime options when possible. example: ATIME="NO" REMOVEDIRS (set to NO by default) When set to YES it will remove empty directories under the used after device detach. example: REMOVEDIRS="YES" Regards, vermaden >How-To-Repeat: >Fix: Patch attached with submission follows: # 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: # # automount # automount/Makefile # automount/distinfo # automount/pkg-install # automount/pkg-descr # echo c - automount mkdir -p automount > /dev/null 2>&1 echo x - automount/Makefile sed 's/^X//' >automount/Makefile << 'a684d750ccdf9f4d6ffa6a1936b8d432' X# New ports collection makefile for: automount X# Date created: 28 February 2012 X# Whom: vermaden X# X# $FreeBSD$ X# X XPORTNAME= automount XPORTVERSION= 1.2 XCATEGORIES= sysutils XMASTER_SITES= https://github.com/vermaden/automount/port/distfiles/ X XMAINTAINER= vermaden@interia.pl XCOMMENT= FreeBSD's devd(8) based automount sollution X XLICENSE= BSD X XPLIST_FILES= sbin/automount etc/devd/automount_devd.conf etc/automount.conf.sample X XNO_BUILD= yes X Xdo-install: X ${INSTALL_SCRIPT} ${WRKSRC}/automount ${PREFIX}/sbin X ${INSTALL_DATA} ${WRKSRC}/automount_devd.conf ${PREFIX}/etc/devd/automount_devd.conf X ${INSTALL_DATA} ${WRKSRC}/automount.conf.sample ${PREFIX}/etc/automount.conf.sample X ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X X.include <bsd.port.mk> a684d750ccdf9f4d6ffa6a1936b8d432 echo x - automount/distinfo sed 's/^X//' >automount/distinfo << 'f9168fc754e2bffcb12d5eb7f25848ec' XSHA256 (automount-1.2.tar.gz) = 5cbb556a861e781312705e1696a495ec688f8581e00e9563d111670699024d5a XSIZE (automount-1.2.tar.gz) = 3448 f9168fc754e2bffcb12d5eb7f25848ec echo x - automount/pkg-install sed 's/^X//' >automount/pkg-install << '251e9ad33f5651c05228156a36207e92' X#!/bin/sh X Xcase ${2} in X (POST-INSTALL) X /etc/rc.d/devd restart X echo X echo X echo "Check /usr/local/sbin/automount --help for available options." X echo X echo X ;; X (PRE-INSTALL) X : X ;; Xesac X 251e9ad33f5651c05228156a36207e92 echo x - automount/pkg-descr sed 's/^X//' >automount/pkg-descr << 'beeed37ba9f50e251d50bf9bd7dcb079' Xautomount is a devd(8) based automounter for FreeBSD. X XIt supports most popular file systems: XNTFS/MSDOS/exFAT/EXT2/EXT3/EXT4/UFS X XWWW: https://github.com/vermaden/automount/ beeed37ba9f50e251d50bf9bd7dcb079 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202280635.q1S6Zo2H051817>