File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1919 export HOME=/root
2020 export DISPLAY=:0.0
2121
22+ # Determine if this script is ran with nounset
23+ strict="false"
24+ if set -o | grep --quiet --perl-regexp "nounset\s+on"; then
25+ strict="true"
26+ fi
27+
2228 if [[ -e /etc/profile ]]; then
29+ # TODO: Currently shell profiles are not checked at build time,
30+ # so we need to unset stricter options to source them
31+ set +o nounset
32+ # shellcheck disable=SC1091
2333 source /etc/profile
34+ [ "$strict" = "true" ] && set -o nounset
2435 fi
2536
2637 # Don't use a pager when executing backdoor
4556 # we can also run non-NixOS guests during tests. This, however, is
4657 # mostly futureproofing as the test instrumentation is still very
4758 # tightly coupled to NixOS.
48- PS1= exec ${ pkgs . coreutils } /bin/env bash --norc /dev/hvc0
59+ PS1="" exec ${ pkgs . coreutils } /bin/env bash --norc /dev/hvc0
4960 '' ;
5061 serviceConfig . KillSignal = "SIGHUP" ;
5162 } ;
You can’t perform that action at this time.
0 commit comments