diff options
-rwxr-xr-x | bin/executable_wd-mount | 18 | ||||
-rw-r--r-- | bin/executable_wd-umount | 12 | ||||
m--------- | dot_zsh/powerlevel10k | 0 | ||||
-rwxr-xr-x | etc/networkd-dispatcher/carrier.d/run-he-ipv6-update.sh | 5 |
4 files changed, 14 insertions, 21 deletions
diff --git a/bin/executable_wd-mount b/bin/executable_wd-mount index de4703f..49466c2 100755 --- a/bin/executable_wd-mount +++ b/bin/executable_wd-mount @@ -6,22 +6,8 @@ case `uname` in doas mount /media/wd ;; Linux) - if ! mount | grep -w /media/t > /dev/null ; then - if [ -e /dev/disk/by-uuid/0c5bcd92-bf08-4a21-a117-0ba9c0c31862 ]; then - sudo cryptdisks_start tosh && \ - sudo zpool import ztosh && \ - sudo mount /var/lib/mpd/music - sudo vgimport tosh - sudo vgchange -ay tosh - fi - fi - - if ! mount | grep -w /media/wd-bak > /dev/null ; then - if [ -e /dev/disk/by-uuid/68b52a2b-2be5-4d40-98ba-c8469da50f1f ]; then - sudo cryptdisks_start wd-bak-work && mount /dev/mapper/wd-bak-work - elif [ -e /dev/disk/by-uuid/49491f12-45ec-4f3f-9f70-73a94149aaf2 ]; then - sudo cryptdisks_start wd-bak && mount /dev/mapper/wd-bak - fi + if ! zpool list wd-pass > /dev/null 2>&1 ; then + sudo zpool import -l wd-pass fi ;; *) diff --git a/bin/executable_wd-umount b/bin/executable_wd-umount index e44c3ad..51a11e1 100644 --- a/bin/executable_wd-umount +++ b/bin/executable_wd-umount @@ -6,11 +6,13 @@ case `uname` in doas bioctl -d 79665ba14a5187ba ;; Linux) - sudo umount --lazy -f /var/lib/mpd/music - sudo zpool export -f ztosh - sudo cryptdisks_stop tosh - sudo vgchange -an tosh - sudo vgexport tosh + if zpool list wd-pass > /dev/null 2>&1; then + if mount -l | grep -E '^/var/lib/mpd/music '; then + sudo umount --lazy -f /var/lib/mpd/music + fi + mount -l -t zfs | IFS=' on ' awk '{ print $1 }' | sudo xargs -I '{}' zfs umount -u '{}' + sudo zpool export wd-pass + fi ;; *) echo "Unknown host" diff --git a/dot_zsh/powerlevel10k b/dot_zsh/powerlevel10k -Subproject 3091ffbd8657a0d4df645a7336700a242af855f +Subproject 8a676a9157d2b0e00e88d06456ac7317f11c031 diff --git a/etc/networkd-dispatcher/carrier.d/run-he-ipv6-update.sh b/etc/networkd-dispatcher/carrier.d/run-he-ipv6-update.sh new file mode 100755 index 0000000..e88437f --- /dev/null +++ b/etc/networkd-dispatcher/carrier.d/run-he-ipv6-update.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if test $IFACE = "he-ipv6" -a $AdministrativeState = "configured"; then + systemctl restart he-ipv6-update.service +fi |