mirror of
https://github.com/MiSTer-devel/Scripts_MiSTer.git
synced 2026-04-19 03:05:34 +00:00
Merge pull request #1 from makigumo/patch-1
security-fixes.sh: require a terminal to run
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
# You can download the latest version of this script from:
|
||||
# https://github.com/MiSTer-devel/Scripts_MiSTer
|
||||
|
||||
# Version 1.2.5 - 2019-04-08 - Allow to run from any terminal, not only SSH.
|
||||
# Version 1.2.4 - 2019-04-08 - Refined the check for standard root password.
|
||||
# Version 1.2.3 - 2019-04-04 - Refined the check for standard root password.
|
||||
# Version 1.2.2 - 2019-04-03 - Updated openssl deb package URL.
|
||||
@@ -38,10 +39,10 @@ then
|
||||
echo "on a MiSTer system."
|
||||
exit 1
|
||||
fi
|
||||
if [ "$SSH_CLIENT" == "" ]
|
||||
if [[ ! (-t 0 && -t 1 && -t 2) ]]
|
||||
then
|
||||
echo "This script must be run"
|
||||
echo "from a SSH terminal"
|
||||
echo "from a SSH/UART terminal"
|
||||
echo "because it will ask"
|
||||
echo "some questions."
|
||||
exit 2
|
||||
@@ -396,4 +397,4 @@ fi
|
||||
echo ""
|
||||
echo "Done!"
|
||||
echo "You can reboot now for actually applying changes."
|
||||
exit 0
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user