diff options
author | jkh <jkh@FreeBSD.org> | 2000-11-10 09:34:06 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2000-11-10 09:34:06 +0000 |
commit | 9abaa6e6cc8e471abc6d8739fffe7f279002d895 (patch) | |
tree | 0af53c7985adeb474fa047a6b724485249f148a4 /usr.sbin | |
parent | 985bff769942e74d8a4614115b7153a96bf6d0b6 (diff) | |
download | FreeBSD-src-9abaa6e6cc8e471abc6d8739fffe7f279002d895.zip FreeBSD-src-9abaa6e6cc8e471abc6d8739fffe7f279002d895.tar.gz |
Set BATCH and PACKAGE_BUILDING to environment before exec()ing pkg_add
in order to suppress onwonted package interaction.
Submitted by: steve
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sysinstall/package.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c index 732f643..36be0ae 100644 --- a/usr.sbin/sysinstall/package.c +++ b/usr.sbin/sysinstall/package.c @@ -174,6 +174,11 @@ package_extract(Device *dev, char *name, Boolean depended) close(2); } close(pfd[1]); + + /* Prevent pkg_add from wanting to interact in bad ways */ + setenv("PACKAGE_BUILDING", "t", 1); + setenv("BATCH", "t", 1); + if (isDebug()) i = execl("/usr/sbin/pkg_add", "/usr/sbin/pkg_add", "-v", "-", 0); else |