Skip to content

Instantly share code, notes, and snippets.

@wirwolf
Created September 8, 2024 06:38
Show Gist options
  • Save wirwolf/6fffcad2df82c8901c4fdaaa617d20c8 to your computer and use it in GitHub Desktop.
Save wirwolf/6fffcad2df82c8901c4fdaaa617d20c8 to your computer and use it in GitHub Desktop.
/etc/systemd/system/mount-disk.service
[Unit]
Description=Mount /dev/disk/by-id/ata-QEMU_HARDDISK_QM00009-part1 to /mnt
After=local-fs.target
Requires=local-fs.target
ConditionPathExists=/dev/disk/by-id/ata-QEMU_HARDDISK_QM00009-part1
[Service]
Type=oneshot
ExecStart=/bin/mount /dev/disk/by-id/ata-QEMU_HARDDISK_QM00009-part1 /mnt
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment