diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 6e7d83b..3d9a7fa 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -13,12 +13,12 @@ "state": { "type": "markdown", "state": { - "file": "2025/FreeBSD notable changes.md", + "file": "2025/macOS autodetect USB.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "FreeBSD notable changes" + "title": "macOS autodetect USB" } } ] @@ -168,11 +168,12 @@ }, "active": "a0e3a8c10d55aaec", "lastOpenFiles": [ - "2025/xg-infra-vorke-upgrade-2025.md", + "2025/new Apple mac computers.md", + "2025/macOS autodetect USB.md", "2025/FreeBSD notable changes.md", + "2025/xg-infra-vorke-upgrade-2025.md", "2025/xg-infra-nas-upgrade-2025.md", "2025/OpenSSH FIDO-U2F support.md", - "2025/new Apple mac computers.md", "2025/images/Screenshot 2025-01-02 at 21.36.20.png", "2025/Brewlog 2025.md", "2025/FreeBSD.md", @@ -199,7 +200,6 @@ "2024/Postgres Backups and ZFS snapshots.md", "2024/Github multiple users and keys.md", "2025/xg-infra-guava.md", - "2025/xg-infra.md", "2025/ggz-poh/Activiteitenregistratie – Behandelhulp.nl - https-::behandelhulp.nl:.webloc", "2025/Signaleringsplan jerry jacobs bipolair 1 versie 5 FINAL.pages", "2025/Signaleringsplan jerry jacobs bipolair 1 versie 5 DRAFT.pages.sb-8780b384-Scp1cP", diff --git a/2025/macOS autodetect USB.md b/2025/macOS autodetect USB.md new file mode 100644 index 0000000..e870c39 --- /dev/null +++ b/2025/macOS autodetect USB.md @@ -0,0 +1,9 @@ +``` +mountpoint=`system_profiler SPUSBDataType | grep "Mount Point" | sed 's/[ \t]*Mount Point:.//' | grep USB-JER-64G` +if [ -n "$mountpoint" ]; then + echo "present" + exit 0 +else + exit 1 +fi +``` \ No newline at end of file