[packages/rpm-build-tools] Rel 3; restore stdin only if it was stdin outside EOF part
arekm
arekm at pld-linux.org
Tue Feb 10 10:30:54 CET 2026
commit 2f44e07ecde3bec54abc71c65a1606894e4f03a6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Feb 10 10:29:48 2026 +0100
Rel 3; restore stdin only if it was stdin outside EOF part
no-net.sh | 5 ++++-
rpm-build-tools.spec | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/rpm-build-tools.spec b/rpm-build-tools.spec
index 339676b..3588c5f 100644
--- a/rpm-build-tools.spec
+++ b/rpm-build-tools.spec
@@ -6,7 +6,7 @@ Summary(ru.UTF-8): Скрипты и утилиты, необходимые дл
Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів
Name: rpm-build-tools
Version: 4.14
-Release: 2
+Release: 3
License: GPL
Group: Applications/File
Source0: builder.sh
diff --git a/no-net.sh b/no-net.sh
index 8449f8a..e3f3fdd 100755
--- a/no-net.sh
+++ b/no-net.sh
@@ -5,6 +5,7 @@ IP=/sbin/ip
TEST_NS=""
DEBUG=""
+[ -t 0 ] && TTY=yes || TTY=no
usage() {
echo "Usage: $0 [-t] [-D] [-h] <command> [args...]"
@@ -54,7 +55,9 @@ fi
exec unshare --user --net --map-root-user $SHELL -s${DEBUG:+xv} "$@" <<EOF
if test -x $IP; then
- exec </dev/tty
+ if [ "$TTY" = "yes" ]; then
+ exec </dev/tty
+ fi
$IP a add 127.0.0.1/8 dev lo 2> /dev/null && addr=1
$IP a add ::1/128 dev lo noprefixroute 2> /dev/null && addr=1
if test -n "\$addr"; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/2f44e07ecde3bec54abc71c65a1606894e4f03a6
More information about the pld-cvs-commit
mailing list