#!/bin/bash
#
# Copyright (C) 2015-2016 Red Hat, Inc.
#
# This file is part of atomic-devmode.
#
# atomic-devmode is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# atomic-devmode is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the GNU Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with atomic-devmode. If not, see
# <http://www.gnu.org/licenses/>.

set -euo pipefail

# Make sure .bash_login is removed on exit. This does mean
# that if the user exits our env, they will no longer
# automatically enter our env on the next auto-login.

# If we don't want this behaviour (ie. we want to restart
# the env everytime), then we should move off this cleanup
# procedure to e.g. a systemd service that runs at shutdown.

rm -f /root/.bash_login
rm -f /root/.bash_logout
