Merge pull request #551 from xnox/fix-path

Move PATH setup from agetty service into subiquity itself
This commit is contained in:
Dimitri John Ledkov 2019-10-04 18:18:05 +01:00 committed by GitHub
commit 6f939e5452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -4,7 +4,6 @@ if [ -n "$1" ]; then
port=$1
fi
/bin/dmesg -n 1
export PATH=$SNAP/bin:$SNAP/usr/bin:$PATH
if [ "$port" = "tty1" ]; then
$SNAP/usr/bin/subiquity-loadkeys
setfont $SNAP/subiquity.psf

View File

@ -84,6 +84,14 @@ AUTO_ANSWERS_FILE = "/subiquity_config/answers.yaml"
def main():
# Preffer utils from $SNAP, over system-wide
snap = os.environ.get('SNAP')
if snap:
os.environ['PATH'] = os.pathsep.join([
os.path.join(snap, 'bin'),
os.path.join(snap, 'usr', 'bin'),
os.environ['PATH'],
])
opts = parse_options(sys.argv[1:])
global LOGDIR
if opts.dry_run: