a CIFS network location is mounted via /etc/fstab to /mnt/ on boot-up.

No, it is not. Get this right, and the rest falls into place naturally.

The mount is handled by a (generated) systemd mount unit that will be named something like mnt-wibble.mount. You can see its actual name in the output of systemctl list-units --type=mount command. You can look at it in detail just like any other unit with systemctl status.

Very simply, then: you have to order your unit to be started after that mount unit is started.

After=network.target vpn-launch.service mnt-wibble.mount

Refer: https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount

分类: Linux

0 条评论


Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注