Brind toad back, it was rewritten with support for pkexec.

This commit is contained in:
ajacoutot 2019-01-23 03:48:59 +00:00
parent a88625b0b2
commit 1baeb8bf1f
8 changed files with 70 additions and 5 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.691 2019/01/20 23:43:21 thfr Exp $
# $OpenBSD: Makefile,v 1.692 2019/01/23 03:48:59 ajacoutot Exp $
COMMENT = exceptions to pkg_add rules
CATEGORIES = devel databases
DISTFILES =
# API.rev
PKGNAME = quirks-3.84
PKGNAME = quirks-3.85
PKG_ARCH = *
MAINTAINER = Marc Espie <espie@openbsd.org>

View File

@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
# $OpenBSD: Quirks.pm,v 1.705 2019/01/20 23:43:21 thfr Exp $
# $OpenBSD: Quirks.pm,v 1.706 2019/01/23 03:48:59 ajacoutot Exp $
#
# Copyright (c) 2009 Marc Espie <espie@openbsd.org>
#
@ -932,7 +932,6 @@ my $obsolete_reason = {
'banshee' => 3,
'mono-zeroconf' => 5,
'mono-avahi' => 5,
'toad' => 3,
'pgp' => 3,
'gonzui' => 3,
# 6.3

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.510 2018/12/18 19:32:01 landry Exp $
# $OpenBSD: Makefile,v 1.511 2019/01/23 03:48:59 ajacoutot Exp $
SUBDIR =
SUBDIR += accountsservice
@ -342,6 +342,7 @@
SUBDIR += tmate
SUBDIR += tmux-mem-cpu-load
SUBDIR += tmuxinator
SUBDIR += toad
SUBDIR += torture
SUBDIR += tpb
SUBDIR += tphdisk

28
sysutils/toad/Makefile Normal file
View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.20 2019/01/23 03:48:59 ajacoutot Exp $
BROKEN= needs sysctl kern.usermount
COMMENT= hotplugd(8) automounter (Toad Opens All Devices)
GH_ACCOUNT= ajacoutot
GH_PROJECT= toad
GH_TAGNAME= 1.6
CATEGORIES= sysutils
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
# ISC
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += c util
RUN_DEPENDS= net/p5-Net-DBus \
sysutils/consolekit
MAKE_FLAGS= PREFIX=${TRUEPREFIX} \
MANDIR=${TRUEPREFIX}/man/man
NO_TEST= Yes
.include <bsd.port.mk>

2
sysutils/toad/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (toad-1.6.tar.gz) = u6IhfQM/cbP8KC2sY24i7z2H+rqM82ms8fb8qotbTrI=
SIZE (toad-1.6.tar.gz) = 8112

12
sysutils/toad/pkg/DESCR Normal file
View File

@ -0,0 +1,12 @@
toad(8) (Toad Opens All Devices) is a utility meant to be started from
the OpenBSD hotplugd(8) attach and detach scripts. It will try to mount
all partitions found on the device under /run/media/username/device.
Where username is the active user login name and device is the type of
the device: usb or cd, followed by its number (from 0 to 9).
This follows the udev hierarchy in Linux which allows interaction with
GLib/GIO's GUnixMount.
It comes with toadd(8), a small daemon that will detect the insertion of
a medium in the optical drives of the machine by periodically reading
their disklabel(8) (every 8 seconds) and call toad(8) with the attach or
detach argument respectively.

12
sysutils/toad/pkg/PLIST Normal file
View File

@ -0,0 +1,12 @@
@comment $OpenBSD: PLIST,v 1.4 2019/01/23 03:48:59 ajacoutot Exp $
libexec/toad
@bin libexec/toadd
@man man/man8/toad.8
@man man/man8/toadd.8
share/examples/toad/
share/examples/toad/hotplug-scripts
@mode 0555
@sample /etc/hotplug/attach
@sample /etc/hotplug/detach
@mode
@rcscript ${RCDIR}/toadd

View File

@ -0,0 +1,11 @@
#!/bin/sh
#
# $OpenBSD: toadd.rc,v 1.3 2019/01/23 03:48:59 ajacoutot Exp $
daemon="${TRUEPREFIX}/libexec/toadd"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1