mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
Ask for keyboard layout change (#139)
This commit is contained in:
parent
7de9dc0cd9
commit
339ea296f3
@ -507,13 +507,23 @@ clear
|
||||
|
||||
# Set keyboard layout
|
||||
echo "Current keyboard layout is $(localectl status | grep "Layout" | awk '{print $3}')"
|
||||
echo "You must change keyboard layout to your language"
|
||||
echo -e "\e[32m"
|
||||
read -p "Press any key to change keyboard layout... " -n1 -s
|
||||
echo -e "\e[0m"
|
||||
dpkg-reconfigure keyboard-configuration
|
||||
echo
|
||||
function ask_yes_or_no() {
|
||||
read -p "$1 ([y]es or [N]o): "
|
||||
case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
|
||||
y|yes) echo "yes" ;;
|
||||
*) echo "no" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "no" == $(ask_yes_or_no "Do you want to change keyboard layout?") ]]
|
||||
then
|
||||
echo "Not changing keyboard layout..."
|
||||
sleep 1
|
||||
clear
|
||||
else
|
||||
dpkg-reconfigure keyboard-configuration
|
||||
clear
|
||||
fi
|
||||
|
||||
# Pretty URLs
|
||||
echo "Setting RewriteBase to "/" in config.php..."
|
||||
@ -657,9 +667,9 @@ clear
|
||||
|
||||
# Change password
|
||||
echo -e "\e[0m"
|
||||
echo "For better security, change the Linux password for [$UNIXUSER]"
|
||||
echo "For better security, change the system user password for [$UNIXUSER]"
|
||||
echo -e "\e[32m"
|
||||
read -p "Press any key to change password for Linux... " -n1 -s
|
||||
read -p "Press any key to change password for system user... " -n1 -s
|
||||
echo -e "\e[0m"
|
||||
sudo passwd $UNIXUSER
|
||||
if [[ $? > 0 ]]
|
||||
|
||||
@ -200,14 +200,24 @@ sudo mv sources.list /etc/apt/
|
||||
clear
|
||||
|
||||
# Set keyboard layout
|
||||
echo "Current keyboard layout is: $(localectl status | grep "Layout" | awk '{print $3}')"
|
||||
echo "You must change keyboard layout to your language"
|
||||
echo -e "\e[32m"
|
||||
read -p "Press any key to change keyboard layout... " -n1 -s
|
||||
echo -e "\e[0m"
|
||||
dpkg-reconfigure keyboard-configuration
|
||||
echo
|
||||
echo "Current keyboard layout is $(localectl status | grep "Layout" | awk '{print $3}')"
|
||||
function ask_yes_or_no() {
|
||||
read -p "$1 ([y]es or [N]o): "
|
||||
case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
|
||||
y|yes) echo "yes" ;;
|
||||
*) echo "no" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
if [[ "no" == $(ask_yes_or_no "Do you want to change keyboard layout?") ]]
|
||||
then
|
||||
echo "Not changing keyboard layout..."
|
||||
sleep 1
|
||||
clear
|
||||
else
|
||||
dpkg-reconfigure keyboard-configuration
|
||||
clear
|
||||
fi
|
||||
|
||||
# Update system
|
||||
apt update -q2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user