Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves systemd.path unit #139

Merged
merged 3 commits into from
Feb 21, 2021
Merged

Improves systemd.path unit #139

merged 3 commits into from
Feb 21, 2021

Conversation

Antynea
Copy link
Owner

@Antynea Antynea commented Jan 31, 2021

  • grub-btrfs.path : improves unit
    Allows the unit to start and stop automatically when the mount point is detected.
    If the mount point is already mounted when the unit is activated systemctl enable grub-btrfs.path,
    it will be necessary to start the unit for monitoring to begin systemctl start grub-btrfs.path.

    • DefaultDependencies=no
      Prevents systemd from automatically generating Wants= or Requires= or After=.
    • Requires=\x2esnapshots.mount
      Ensures unit is started if mount point exists.
    • After=\x2esnapshots.mount
      Unit start after the mounting point exists.
    • BindsTo=\x2esnapshots.mount
      If the mount point is removed, the unit will stop.
    • PathModified=/.snapshots
      The monitored folder containing the snapshots.
    • WantedBy=\x2esnapshots.mount
      If the mount point exists, unit start automatically. (only if unit is activated before the mount point is mounted)
  • Readme : Update "Automatically update grub" section
    Update "Automatically update grub" section following the recent change in the grub-btrfs.path unit.

Fix: #138

Allows the unit to start and stop automatically when the mount point is detected.  
If the mount point is already mounted when the unit is activated `systemctl enable grub-btrfs.path`,  
it will be necessary to start the unit for monitoring to begin `systemctl start grub-btrfs.path`.

- `DefaultDependencies=no`
Prevents systemd from automatically generating `Wants= or Requires= or After=`.
- `Requires=\x2esnapshots.mount`
Ensures unit is started if mount point exists.
- `After=\x2esnapshots.mount`
Unit start after the mounting point exists.
- `BindsTo=\x2esnapshots.mount`
If the mount point is removed, the unit will stop.
- `PathModified=\x2esnapshots.mount`
The monitored folder containing the snapshots.
- `WantedBy=\x2esnapshots.mount`
If the mount point exists, unit start automatically. (only if unit is activated before the mount point is mounted)
Update "Automatically update grub" section following the recent change in the `grub-btrfs.path` unit.
@Antynea
Copy link
Owner Author

Antynea commented Feb 18, 2021

New commit:

  • Readme: Add a new paragraph in Automatically update grub
    • Add information to be able to update the grub-btrfs menu every time the system is restart/shutdown.

This feature isn't included in the grub-btrfs package, because i think, systemd doesn't allow us to fix a malfunction if the command fails during a system restart/shutdown.
Or, I don't know how to do it. (don't blame systemd)

Readme: Add a new paragraph in `Automatically update grub`
* Add information to be able to update the `grub-btrfs` menu every time the system is restart/shutdown.
@Antynea Antynea merged commit 83bf1da into master Feb 21, 2021
@Antynea Antynea deleted the improves-systemd-unit branch February 21, 2021 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grub-btrfs.path is started but does not generate grub-btrfs.cfg
1 participant