Skip to content

update-shells: workaround for merged-/usr

With plain dpkg-realpath, /usr/bin/rbash would be /usr/bin/bash on merged-/usr systems because of the symlink chain /bin/rbash -> /usr/bin/rbash -> /usr/bin/bash. So instead we take the basename from the original $line and the dirname from dpkg-realpath.

This is how /etc/shells looks like without this patch:

# /etc/shells: valid login shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/bash
/bin/dash
/usr/bin/dash

This is the correct version with this patch:

# /etc/shells: valid login shells
/bin/sh
/bin/bash
/usr/bin/bash
/bin/rbash
/usr/bin/rbash
/bin/dash
/usr/bin/dash
Edited by Johannes Schauer Marin Rodrigues

Merge request reports

Loading