summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce A. Mah <bmah@FreeBSD.org>2001-02-09 20:07:06 +0000
committerBruce A. Mah <bmah@FreeBSD.org>2001-02-09 20:07:06 +0000
commit3eb66e95ef16caa0c8cc8eab5071bb02c2ce46dc (patch)
tree271c4cfd696ff254de7220546f6888fdfc43b240
parent4460a589ec34f9ecf2beefad414c7882b1a985e3 (diff)
Notes
-rwxr-xr-xusr.sbin/pkg_install/version/pkg_version.pl14
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