Skip to content

Instantly share code, notes, and snippets.

@dmilith
Last active August 29, 2015 13:56
Show Gist options
  • Save dmilith/8869627 to your computer and use it in GitHub Desktop.
Save dmilith/8869627 to your computer and use it in GitHub Desktop.
⇒ cat /Users/dmilith/Library/LaunchAgents/Projects-Automount.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>Projects-Automount</string>
<key>ProgramArguments</key>
<array>
<string>/Users/dmilith/Developer/mount_zfs</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
⇒ cat /Users/dmilith/Developer/mount_zfs
#!/bin/sh
cd ~/Developer/zfs
../umount_zfs
kextstat | grep zfs || ../zfsadm -i /System/Library/Extensions -k
sudo ./zpool.sh import
sudo ./zpool.sh import Stuff
sudo ./zpool.sh import -f -d ~/Documents/ZFS Projects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment