diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-10 18:56:21 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-10 18:56:21 -0800 |
commit | 688433f5c3da09c9de19fec8d6217764bb5a036c (patch) | |
tree | ec1b5e77872e26640d39cf740774ee430806e0ab | |
parent | f6ec442f339611df91a79c770483d0e6b13566ff (diff) | |
download | vyatta-op-688433f5c3da09c9de19fec8d6217764bb5a036c.tar.gz vyatta-op-688433f5c3da09c9de19fec8d6217764bb5a036c.zip |
add wrappers/symlinks for pipe commands (wrappers are needed for command
matching in restricted modes).
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | debian/vyatta-op.postinst.in | 4 | ||||
-rw-r--r-- | debian/vyatta-op.postrm.in | 4 | ||||
-rw-r--r-- | etc/bash_completion.d/10vyatta-op | 2 | ||||
-rwxr-xr-x | scripts/count | 4 | ||||
-rwxr-xr-x | scripts/match | 4 | ||||
-rwxr-xr-x | scripts/no-match | 4 | ||||
-rwxr-xr-x | scripts/no-more | 4 |
8 files changed, 28 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index c9849cb..82d2a53 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,10 @@ allowed_DATA = functions/allowed/hosts bin_SCRIPTS = scripts/vyatta-show-interfaces bin_SCRIPTS += scripts/vyatta-show-version +bin_SCRIPTS += scripts/count +bin_SCRIPTS += scripts/match +bin_SCRIPTS += scripts/no-match +bin_SCRIPTS += scripts/no-more bin_sudo_users_SCRIPTS = scripts/vyatta-show-log bin_sudo_users_SCRIPTS += scripts/vyatta-show-log-all diff --git a/debian/vyatta-op.postinst.in b/debian/vyatta-op.postinst.in index 4f0b3b4..626ace2 100644 --- a/debian/vyatta-op.postinst.in +++ b/debian/vyatta-op.postinst.in @@ -8,4 +8,8 @@ bindir=@bindir@ ln -sf /usr/sbin/ethtool ${bindir}/sudo-users/ethtool ln -sf /usr/sbin/dmidecode ${bindir}/sudo-users/dmidecode ln -sf /sbin/iptables ${bindir}/sudo-users/iptables +ln -sf ${bindir}/count /usr/bin/ +ln -sf ${bindir}/match /usr/bin/ +ln -sf ${bindir}/no-match /usr/bin/ +ln -sf ${bindir}/no-more /usr/bin/ diff --git a/debian/vyatta-op.postrm.in b/debian/vyatta-op.postrm.in index f86a7ba..34f21ed 100644 --- a/debian/vyatta-op.postrm.in +++ b/debian/vyatta-op.postrm.in @@ -9,5 +9,9 @@ if [ "$1" = "purge" ]; then rm -f ${bindir}/sudo-users/ethtool rm -f ${bindir}/sudo-users/dmidecode rm -f ${bindir}/sudo-users/iptables + rm -f /usr/bin/count + rm -f /usr/bin/match + rm -f /usr/bin/no-match + rm -f /usr/bin/no-more fi diff --git a/etc/bash_completion.d/10vyatta-op b/etc/bash_completion.d/10vyatta-op index 5a672c3..52be05a 100644 --- a/etc/bash_completion.d/10vyatta-op +++ b/etc/bash_completion.d/10vyatta-op @@ -304,8 +304,6 @@ done eval $nullglob_save unset nullglob_save -alias no-more=cat - _vyatta_op_init $@ ### Local Variables: diff --git a/scripts/count b/scripts/count new file mode 100755 index 0000000..1ab3796 --- /dev/null +++ b/scripts/count @@ -0,0 +1,4 @@ +#!/bin/bash + +wc -l "$@" + diff --git a/scripts/match b/scripts/match new file mode 100755 index 0000000..c452824 --- /dev/null +++ b/scripts/match @@ -0,0 +1,4 @@ +#!/bin/bash + +grep -E -e "$@" + diff --git a/scripts/no-match b/scripts/no-match new file mode 100755 index 0000000..528d80c --- /dev/null +++ b/scripts/no-match @@ -0,0 +1,4 @@ +#!/bin/bash + +grep -E -v -e "$@" + diff --git a/scripts/no-more b/scripts/no-more new file mode 100755 index 0000000..59f51e8 --- /dev/null +++ b/scripts/no-more @@ -0,0 +1,4 @@ +#!/bin/bash + +cat "$@" + |