From 12adb07a4c9671dad6fb348b433077c988dcf9d2 Mon Sep 17 00:00:00 2001 From: Bob Mottram <bob@freedombone.net> Date: Wed, 29 Aug 2018 18:26:05 +0100 Subject: [PATCH] Single quotes --- src/freedombone-adduser | 2 +- src/freedombone-controlpanel | 4 ++-- src/freedombone-controlpanel-user | 2 +- src/freedombone-installer | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/freedombone-adduser b/src/freedombone-adduser index 0b3245400..71c2baedc 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -113,7 +113,7 @@ if [ "$SSH_PUBLIC_KEY" ]; then chown -R "$ADD_USERNAME":"$ADD_USERNAME" "/home/$ADD_USERNAME/.ssh" echo $'ssh public key installed' else - if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then + if [[ "$SSH_PUBLIC_KEY" == 'ssh-'* ]]; then mkdir "/home/$ADD_USERNAME/.ssh" echo "$SSH_PUBLIC_KEY" > "/home/$ADD_USERNAME/.ssh/authorized_keys" chown -R "$ADD_USERNAME":"$ADD_USERNAME" "/home/$ADD_USERNAME/.ssh" diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index dc5286b95..0bf1bf7df 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -186,7 +186,7 @@ function add_user { "${PROJECT_NAME}-adduser" "$new_user_username" any_key else - if [[ "$new_user_ssh_public_key" == "ssh-"* ]]; then + if [[ "$new_user_ssh_public_key" == 'ssh-'* ]]; then clear "${PROJECT_NAME}-adduser" "$new_user_username" "$new_user_ssh_public_key" any_key @@ -554,7 +554,7 @@ function change_ssh_public_key { dialog --title $"Change ssh public key" \ --msgbox $"ssh public key was installed" 6 40 else - if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then + if [[ "$SSH_PUBLIC_KEY" == 'ssh-'* ]]; then if [ ! -d "/home/$SELECTED_USERNAME/.ssh" ]; then mkdir "/home/$SELECTED_USERNAME/.ssh" fi diff --git a/src/freedombone-controlpanel-user b/src/freedombone-controlpanel-user index 1b2884971..7724d9dce 100755 --- a/src/freedombone-controlpanel-user +++ b/src/freedombone-controlpanel-user @@ -559,7 +559,7 @@ function add_ssh_key { 0) SSH_PUBLIC_KEY=$(<"$data") if [ ${#SSH_PUBLIC_KEY} -gt 20 ]; then - if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then + if [[ "$SSH_PUBLIC_KEY" == 'ssh-'* ]]; then if [ ! -d "/home/$USER/.ssh" ]; then mkdir "/home/$USER/.ssh" fi diff --git a/src/freedombone-installer b/src/freedombone-installer index 1d0b746de..826831bb1 100755 --- a/src/freedombone-installer +++ b/src/freedombone-installer @@ -1682,7 +1682,7 @@ function update_enable_ssh { ssh_public_key=$(cat "$ssh_file" | awk -F ',' '{print $2}') if [ ${#ssh_public_key} -gt 20 ]; then - if [[ "$ssh_public_key" == "ssh-"* ]]; then + if [[ "$ssh_public_key" == 'ssh-'* ]]; then if [ ! -d "/home/$ADMIN_USERNAME/.ssh" ]; then mkdir "/home/$ADMIN_USERNAME/.ssh" fi -- GitLab