What I would like to do is mount my ntfs data partition during boot process with systemd only if laptop is on AC power. At the moment I am running this script as a startup application in cinnamon, but would like mount during boot.#!/bin/shstate=$(acpi -a | cut -d' ' -f3 | cut -d- -f1)if [ $state = 'on' ]; then    mount -o umask=0002,gid=1000,uid=1000,nodev,nosuid,nofail,x-gvfs-show /dev/sda5 MNT_LOCATIONfiANSWER:I've asked at systemd google+ community and Ian answered. There is ConditionACPower= option that you can set. So I mead a .mount file in /etc/systemd/system/ with this option in the [Unit] section and it works, it is IMPORTANT to name your .mount file exactly the same as your mount location path, replacing / with - . Here is my .mount file for the refernece:[Unit]Description=Mount dataConditionACPower=true[Mount]What=/dev/sda5Where=absolute mount pathType=autoOptions=desired options[Install]WantedBy=local-fs.targetAfter you need to runsystemctl daemon-reloadsystemctl start YOUR-FILE.mountand enable to start automatically at bootsystemctl enable YOUR-FILE.mount
Systemd mount with a condition
boot;mount;systemd;ntfs