[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e54258e7-429a-4805-b263-e2bf9fc7d4c4@lunn.ch>
Date: Tue, 26 Mar 2024 16:27:20 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Matthieu Baerts <matttbe@...nel.org>, netdev@...r.kernel.org,
netdev-driver-reviewers@...r.kernel.org
Subject: Re: [TEST] VirtioFS instead of 9p
> Somewhat related, our current build_rust test doesn't work because
> I used rustup, and it works by adding stuff (paths mostly?) to bashrc.
> Which does not get evaluated when we launch the script from a systemd
> unit :( I couldn't find a "please run this as an interactive shell"
> switch in bash, should we source ~/.bashrc in build_rust.sh for now?
The man page says:
When bash is started non-interactively, to run a shell script, for ex‐
ample, it looks for the variable BASH_ENV in the environment, expands
its value if it appears there, and uses the expanded value as the name
of a file to read and execute. Bash behaves as if the following com‐
mand were executed:
if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
but the value of the PATH variable is not used to search for the file‐
name.
So something like:
[Service]
Environment="BASH_ENV=~/.bashrc"
assuming the service is running as the same user as rustup was run as,
and it is invoking bash, not sh, to run the script.
Andrew
Powered by blists - more mailing lists