quiet login message on container login
This commit is contained in:
@@ -265,6 +265,7 @@ bootstrap_directories() {
|
|||||||
else
|
else
|
||||||
mkdir -p "${bastille_releasesdir}/${RELEASE}"
|
mkdir -p "${bastille_releasesdir}/${RELEASE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## create subsequent releases/XX.X-RELEASE datasets
|
## create subsequent releases/XX.X-RELEASE datasets
|
||||||
elif [ ! -d "${bastille_releasesdir}/${RELEASE}" ]; then
|
elif [ ! -d "${bastille_releasesdir}/${RELEASE}" ]; then
|
||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||||
@@ -301,8 +302,11 @@ bootstrap_release() {
|
|||||||
FETCH_VALIDATION="0"
|
FETCH_VALIDATION="0"
|
||||||
if [ -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
if [ -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
||||||
echo -e "${COLOR_GREEN}Extracting ${PLATFORM_OS} ${RELEASE} ${_archive}.txz.${COLOR_RESET}"
|
echo -e "${COLOR_GREEN}Extracting ${PLATFORM_OS} ${RELEASE} ${_archive}.txz.${COLOR_RESET}"
|
||||||
/usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/${_archive}.txz"
|
if /usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/${_archive}.txz"; then
|
||||||
if [ "$?" -ne 0 ]; then
|
## silence motd at container login
|
||||||
|
touch "${bastille_releasesdir}/${RELEASE}/root/.hushlogin"
|
||||||
|
touch "${bastille_releasesdir}/${RELEASE}/usr/share/skel/dot.hushlogin"
|
||||||
|
else
|
||||||
echo -e "${COLOR_RED}Failed to extract ${_archive}.txz.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Failed to extract ${_archive}.txz.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -365,8 +369,11 @@ bootstrap_release() {
|
|||||||
## extract the fetched dist files
|
## extract the fetched dist files
|
||||||
if [ -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
if [ -f "${bastille_cachedir}/${RELEASE}/${_archive}.txz" ]; then
|
||||||
echo -e "${COLOR_GREEN}Extracting ${PLATFORM_OS} ${RELEASE} ${_archive}.txz.${COLOR_RESET}"
|
echo -e "${COLOR_GREEN}Extracting ${PLATFORM_OS} ${RELEASE} ${_archive}.txz.${COLOR_RESET}"
|
||||||
/usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/${_archive}.txz"
|
if /usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/${_archive}.txz"; then
|
||||||
if [ "$?" -ne 0 ]; then
|
## silence motd at container login
|
||||||
|
touch "${bastille_releasesdir}/${RELEASE}/root/.hushlogin"
|
||||||
|
touch "${bastille_releasesdir}/${RELEASE}/usr/share/skel/dot.hushlogin"
|
||||||
|
else
|
||||||
echo -e "${COLOR_RED}Failed to extract ${_archive}.txz.${COLOR_RESET}"
|
echo -e "${COLOR_RED}Failed to extract ${_archive}.txz.${COLOR_RESET}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user