diff options
| author | Bruce A. Mah <bmah@FreeBSD.org> | 2001-02-16 17:53:02 +0000 |
|---|---|---|
| committer | Bruce A. Mah <bmah@FreeBSD.org> | 2001-02-16 17:53:02 +0000 |
| commit | 72221ba51b47c2370c64c0b0e12a0b6db577d0f2 (patch) | |
| tree | 0698db55be230683462c46eae81d473559bf3aa4 | |
| parent | c6f2ece715253624ca3b6d55961bfeb70fd17144 (diff) | |
Notes
| -rwxr-xr-x | usr.sbin/pkg_install/version/pkg_version.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/version/pkg_version.pl b/usr.sbin/pkg_install/version/pkg_version.pl index 633e1078657c..3a5751073549 100755 --- a/usr.sbin/pkg_install/version/pkg_version.pl +++ b/usr.sbin/pkg_install/version/pkg_version.pl @@ -325,6 +325,20 @@ while (<INDEX>) { close INDEX; # +# If we're doing commands output, cripple the output so that users +# can't just pipe the output to sh(1) and expect this to work. +# +if ($ShowCommandsFlag) { + print<<EOF +echo "The commands output of pkg_version cannot be executed without editing." +echo "You MUST save this output to a file and then edit it, taking into" +echo "account package dependencies and the fact that some packages cannot" +echo "or should not be upgraded." +exit 1 +EOF +} + +# # Produce reports # # Prior versions of pkg_version used commas (",") as delimiters |
