Gentoo Archives: gentoo-user

From: ralfconn <mentadent47@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] source profile.env from non-interactive shell
Date: Sun, 08 Jan 2023 18:09:27
Message-Id: db4a355f-9a2a-5e80-53a3-99a9a5f73ed1@yahoo.com
1 Hello,
2
3 I have a bash script executed from cronie's anacron daemon which
4 performs a local rsync backup and then emails the status via nullmailer
5 . The latter part never worked until I understood that some
6 nullmailer-inject options that I set via environment variables are not
7 visible from the bash script when spawned by anacron (all was fine from
8 an interactive shell). Adding a 'source /etc/profile.env' to the bash
9 script solved the issue.
10
11 Are there any contraindication to sourcing the whole profile.env from a
12 non-interactive shell? Potential security issues?
13
14 thanks,
15
16 raffaele