Skip to content

Add switch-passwd #16

Merged
merged 1 commit into from
Dec 11, 2017
Merged

Add switch-passwd #16

merged 1 commit into from
Dec 11, 2017

Conversation

donald
Copy link
Collaborator

@donald donald commented Dec 11, 2017

Add source for /sbin/switch-passwd and switch-passwd.service.

The script switch-passwd changes /etc/passwd into a symlink
to passwd.mariux (which is disted) and removes nis as
a passwd source from /etc/nsswitch.conf. These changes
are not done, if already done or if GDM is running.

On systems with GDM (workstations) which can’t upgrade
immediately, the service switch-passwd.service is used
to do the switch on the next boot.

/etc/passwd and /etc/nsswitch.conf are temporarily disabled
from pdist on the Distmaster to allow a rolling upgrade.

After these files are distributed, all systems should execute the
commands below.

/sbin/switch-passwd    # attempt immediate switch
systemctl enable switch-passwd.service

After all systems have upgraded (immediately or after reboot) we
can re-enable /etc/passwd and /etc/nsswitch.conf in the Distfile
and remove these switch-passwd files.

@donald donald requested a review from pmenzel December 11, 2017 14:01
[Service]
Type=oneshot
ExecStart=/sbin/switch-passwd
RemainAfterExit=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this useful? Because the shell forks?

       RemainAfterExit=
           Takes a boolean value that specifies whether the service shall be
           considered active even when all its processes exited. Defaults to
           no.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donald
Copy link
Collaborator Author

donald commented Dec 11, 2017

Not needed, I remove that.

Add Source for /sbin/switch-passwd and switch-passwd.service.

The script switch-passwd changes /etc/passwd into a symlink
to passwd.mariux (which is disted) and removes "nis" as
a passwd source from /etc/nsswitch.conf. These changes
are not done, if already done or if gdm is running.

On systems with gdm (workstations) which can't upgrade
immediately, the service switch-passwd.service is used
to do the switch on the next boot.

/etc/passwd and /etc/nsswitch.conf are temporarily disabled
from pdist on the Distmaster to allow a rolling upgrade.

After these files are distributed, all system should execute

    /sbin/switch-passwd    # attempt immediate switch
    systemctl enable switch-passwd.service

After all systems have upgraded (immediate or after reboot) we
can re-enable /etc/passwd and /etc/nsswitch.conf in the Distfile
and remove these switch-passwd files.
@pmenzel pmenzel merged commit c849508 into master Dec 11, 2017
@donald donald deleted the add-switch-passwd branch March 14, 2018 09:36
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants