Merge pull request #1306 from emilazy/push-kzsqtpuplusw
Revert "{activation-scripts,activate-system}: purify environment"
This commit is contained in:
commit
349a74c66c
2 changed files with 1 additions and 25 deletions
|
|
@ -10,14 +10,7 @@
|
|||
script = ''
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
export USER=root
|
||||
export LOGNAME=root
|
||||
export HOME=~root
|
||||
export SHELL=$BASH
|
||||
export LANG=C
|
||||
export LC_CTYPE=UTF-8
|
||||
|
||||
systemConfig=$(cat ${config.system.profile}/systemConfig)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,33 +37,16 @@ in
|
|||
config = {
|
||||
|
||||
system.activationScripts.script.text = ''
|
||||
#!/usr/bin/env -i ${stdenv.shell}
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2096
|
||||
|
||||
#! ${stdenv.shell}
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
export USER=root
|
||||
export LOGNAME=root
|
||||
export HOME=~root
|
||||
export SHELL=$BASH
|
||||
export LANG=C
|
||||
export LC_CTYPE=UTF-8
|
||||
|
||||
systemConfig=@out@
|
||||
|
||||
# Ensure a consistent umask.
|
||||
umask 0022
|
||||
|
||||
cd /
|
||||
|
||||
if [[ $(id -u) -ne 0 ]]; then
|
||||
printf >&2 '\e[1;31merror: `activate` must be run as root\e[0m\n'
|
||||
exit 2
|
||||
fi
|
||||
|
||||
${cfg.activationScripts.preActivation.text}
|
||||
|
||||
# We run `etcChecks` again just in case someone runs `activate`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue