summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranc[e]sco2020-10-17 14:20:15 +0200
committerFranc[e]sco2020-10-17 14:20:15 +0200
commit9af022a2abf50522ef15d6b08e89745c1195fd67 (patch)
tree4b57d4c672f672f462b3b80fa26cef54be40653a
downloadaur-9af022a2abf50522ef15d6b08e89745c1195fd67.tar.gz
first commit
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD19
-rw-r--r--netmount.conf11
-rw-r--r--netmount.finish15
-rw-r--r--netmount.run1
6 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5db4e39268f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = netmount-runit
+ pkgdesc = Service to mount/umount network filesystems from fstab
+ pkgver = 0.1
+ pkgrel = 1
+ url = http://www.voidlinux.org/
+ arch = any
+ license = GPL-2.0-or-later
+ conflicts = systemd-sysvcompat
+ source = netmount.run
+ source = netmount.conf
+ source = netmount.finish
+ sha256sums = 52c544cb75460a7d591dee201116123c47b5214754d8a35e43fceaee5adc18ed
+ sha256sums = 99f7945745dc9d13779759b30e6c6275c76d741258f4f389577ddb162694d8a4
+ sha256sums = 19a08b48e95a53e077731f8e5a458758582e72e9ba46e93792e65c15637bf94c
+
+pkgname = netmount-runit
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4508b52af9a4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/bim
+*.tar.zst
+/pkg
+/src
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..645c12b76666
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+_basename=netmount
+pkgname=${_basename}-runit
+pkgver=0.1
+pkgrel=1
+pkgdesc="Service to mount/umount network filesystems from fstab"
+arch=('any')
+url="http://www.voidlinux.org/"
+license=('GPL-2.0-or-later')
+conflicts=('systemd-sysvcompat')
+source=("${_basename}.run" "${_basename}.conf" "${_basename}.finish")
+sha256sums=('52c544cb75460a7d591dee201116123c47b5214754d8a35e43fceaee5adc18ed'
+ '99f7945745dc9d13779759b30e6c6275c76d741258f4f389577ddb162694d8a4'
+ '19a08b48e95a53e077731f8e5a458758582e72e9ba46e93792e65c15637bf94c')
+
+package() {
+ for x in run conf finish; do
+ install -Dm755 "$srcdir/${_basename}.${x}" "$pkgdir/etc/runit/sv/${_basename}/${x}"
+ done
+}
diff --git a/netmount.conf b/netmount.conf
new file mode 100644
index 000000000000..34f6faa8e004
--- /dev/null
+++ b/netmount.conf
@@ -0,0 +1,11 @@
+# Configuration for netmount service
+
+# List of network filesystems
+NETWORK_FS="nfs,nfs4,cifs,ceph,glusterfs,fuse.sshfs,davfs"
+
+# Put here the network manager service name you use
+# If you set static ip from rc.local leave commented or empty
+#NETWORK_MANAGER=connmand
+
+# You can specify your gateway or let it be detected
+#GATEWAY=192.168.1.1
diff --git a/netmount.finish b/netmount.finish
new file mode 100644
index 000000000000..86749ee56784
--- /dev/null
+++ b/netmount.finish
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Load user defined variables
+[ -r conf ] && . ./conf
+
+# Don't do anything if ./run didn't exit properly
+[ "$1" -eq 1 ] && exit 0
+
+# Simply umount network filesystems
+umount -a -f -t $NETWORK_FS > /dev/null 2>&1
+ret=$?
+[ $ret -ne 0 ] && umount -a -f -l -t $NETWORK_FS > /dev/null 2>&1
+
+umount -a -f -O _netdev > /dev/null 2>&1
+ret=$?
+[ $ret -ne 0 ] && umount -a -f -l -O _netdev > /dev/null 2>&1
diff --git a/netmount.run b/netmount.run
new file mode 100644
index 000000000000..ff53870e84f7
--- /dev/null
+++ b/netmount.run
@@ -0,0 +1 @@
+<html><body>You are being <a href="https://raw.githubusercontent.com/void-linux/void-packages/a507a815061ea66190d83392fff1b0516751b48c/srcpkgs/sv-netmount/files/netmount/run">redirected</a>.</body></html> \ No newline at end of file