mirror of
https://github.com/ovh/the-bastion.git
synced 2025-01-06 07:22:14 +08:00
chore: packages-check.sh: remove obsolete -t and -v options
This commit is contained in:
parent
da5cb3c232
commit
37842c29d3
1 changed files with 0 additions and 14 deletions
|
@ -9,16 +9,12 @@ basedir=$(readlink -f "$(dirname "$0")"/../..)
|
||||||
opt_dev=0
|
opt_dev=0
|
||||||
opt_install=0
|
opt_install=0
|
||||||
opt_syslogng=0
|
opt_syslogng=0
|
||||||
opt_ttyrec=0
|
|
||||||
opt_supervisor=0
|
|
||||||
while builtin getopts "distv" opt; do
|
while builtin getopts "distv" opt; do
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
"d") opt_dev=1;;
|
"d") opt_dev=1;;
|
||||||
"i") opt_install=1;;
|
"i") opt_install=1;;
|
||||||
"s") opt_syslogng=1;;
|
"s") opt_syslogng=1;;
|
||||||
"t") opt_ttyrec=1;;
|
|
||||||
"v") opt_supervisor=1;;
|
|
||||||
*) echo "Error $opt"; exit 1;;
|
*) echo "Error $opt"; exit 1;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -55,8 +51,6 @@ if echo "$DISTRO_LIKE" | grep -q -w debian; then
|
||||||
wanted_list="$wanted_list liblinux-prctl-perl libpam-google-authenticator pamtester"
|
wanted_list="$wanted_list liblinux-prctl-perl libpam-google-authenticator pamtester"
|
||||||
fi
|
fi
|
||||||
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng syslog-ng-core"
|
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng syslog-ng-core"
|
||||||
[ "$opt_ttyrec" = 1 ] && wanted_list="$wanted_list ovh-ttyrec"
|
|
||||||
[ "$opt_supervisor" = 1 ] && wanted_list="$wanted_list supervisor"
|
|
||||||
|
|
||||||
if [ "$opt_install" = 1 ]; then
|
if [ "$opt_install" = 1 ]; then
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
@ -83,8 +77,6 @@ elif echo "$DISTRO_LIKE" | grep -q -w rhel; then
|
||||||
wanted_list="$wanted_list util-linux-user"
|
wanted_list="$wanted_list util-linux-user"
|
||||||
fi
|
fi
|
||||||
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
|
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
|
||||||
[ "$opt_ttyrec" = 1 ] && wanted_list="$wanted_list ovh-ttyrec"
|
|
||||||
[ "$opt_supervisor" = 1 ] && wanted_list="$wanted_list supervisor"
|
|
||||||
|
|
||||||
if [ "$opt_install" = 1 ]; then
|
if [ "$opt_install" = 1 ]; then
|
||||||
if [ "$DISTRO_VERSION_MAJOR" = 8 ]; then
|
if [ "$DISTRO_VERSION_MAJOR" = 8 ]; then
|
||||||
|
@ -125,14 +117,8 @@ elif echo "$DISTRO_LIKE" | grep -q -w suse; then
|
||||||
perl-Time-HiRes perl-Unix-Syslog hostname perl-LWP-Protocol-https \
|
perl-Time-HiRes perl-Unix-Syslog hostname perl-LWP-Protocol-https \
|
||||||
google-authenticator-libpam tar"
|
google-authenticator-libpam tar"
|
||||||
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
|
[ "$opt_syslogng" = 1 ] && wanted_list="$wanted_list syslog-ng"
|
||||||
[ "$opt_ttyrec" = 1 ] && wanted_list="$wanted_list ovh-ttyrec"
|
|
||||||
[ "$opt_supervisor" = 1 ] && wanted_list="$wanted_list python-supervisor python-setuptools"
|
|
||||||
|
|
||||||
if [ "$opt_install" = 1 ]; then
|
if [ "$opt_install" = 1 ]; then
|
||||||
if [ "$opt_supervisor" = 1 ]; then
|
|
||||||
zypper addrepo https://download.opensuse.org/repositories/home:bmanojlovic/openSUSE_Leap_15.0/home:bmanojlovic.repo
|
|
||||||
zypper refresh
|
|
||||||
fi
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
zypper install -y $wanted_list
|
zypper install -y $wanted_list
|
||||||
exit $?
|
exit $?
|
||||||
|
|
Loading…
Reference in a new issue