#!/bin/sh

. /lib/live/config.sh

## live-config(7) - System Configuration Components
## Copyright (C) 2019-2020 The Debian Live team
## Copyright (C) 2019 Raphael Hertzog <raphael@offensive-security.com>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.

# XXX: Can be dropped when https://github.com/systemd/systemd/issues/12492
# is fixed

if grep -q systemd /etc/nsswitch.conf; then
    # Backup /etc/nsswitch.conf and remove systemd module
    cp -a /etc/nsswitch.conf /etc/nsswitch.conf.nss-systemd
    sed -i -e 's/systemd//g' /etc/nsswitch.conf
fi
