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

[systemd] Relocate all SONiC unit files to /usr/lib/systemd/system #4673

Merged
merged 2 commits into from
May 30, 2020
Merged

[systemd] Relocate all SONiC unit files to /usr/lib/systemd/system #4673

merged 2 commits into from
May 30, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented May 30, 2020

Relocate all SONiC unit files from /etc/systemd/system to /usr/lib/systemd/system.

This will allow us to disable services and have it persist across reboots by using the systemctl mask <service> command. The systemctl disable <service> command does not persist across reboots. The systemctl mask operation creates a symlink to /dev/null as /etc/systemd/system/<service_name>.service, which will persist across reboots. However, we can only utilize this feature if we store our actual service files in a systemd directory other than /etc/systemd/system.

This will allow us to disable services and have it persist across
reboots by using the `systemctl mask` operation
@jleveque jleveque requested a review from lguohan May 30, 2020 00:17
@jleveque jleveque self-assigned this May 30, 2020
@jleveque jleveque changed the title [systemd] Relocate all SONiC unit files to /lib/systemd/system [systemd] Relocate all SONiC unit files to /usr/lib/systemd/system May 30, 2020
@lguohan
Copy link
Collaborator

lguohan commented May 30, 2020

retest mellanox please

@jleveque jleveque merged commit 1e369b0 into sonic-net:master May 30, 2020
@jleveque jleveque deleted the relocate_service_files branch May 30, 2020 20:46
@abdosi
Copy link
Contributor

abdosi commented Jun 3, 2020

@SuvarnaMeenakshi this change should be fine for Multi-asic platforms . Can you please also check ?

@rlhui

@SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi this change should be fine for Multi-asic platforms . Can you please also check ?

@rlhui

Yes, looks fine for multi-asic platform.

abdosi pushed a commit that referenced this pull request Jun 16, 2020
…4673)

This will allow us to disable services and have it persist across reboots by using the `systemctl mask` operation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants