Kaynağa Gözat

Backslashes

Bob Mottram 7 yıl önce
ebeveyn
işleme
cb56cd94eb
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3
    3
      src/freedombone-image-customise

+ 3
- 3
src/freedombone-image-customise Dosyayı Görüntüle

894
     # Produce a text file on the desktop listing users on the mesh
894
     # Produce a text file on the desktop listing users on the mesh
895
     cat <<EOF > $rootdir/usr/bin/list-tox-users
895
     cat <<EOF > $rootdir/usr/bin/list-tox-users
896
 #!/bin/bash
896
 #!/bin/bash
897
-ethernet_connected=$(cat /sys/class/net/eth0/carrier)
897
+ethernet_connected=\$(cat /sys/class/net/eth0/carrier)
898
 users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d | uniq)
898
 users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d | uniq)
899
 if [ ! \$users_list ]; then
899
 if [ ! \$users_list ]; then
900
     no_of_users=0
900
     no_of_users=0
1007
 
1007
 
1008
     # If ethernet is connected then add the invite icon to help enable
1008
     # If ethernet is connected then add the invite icon to help enable
1009
     # SSB nat traversal
1009
     # SSB nat traversal
1010
-    if [[ "$ethernet_connected" != "0" ]]; then
1010
+    if [[ "\$ethernet_connected" != "0" ]]; then
1011
         if [ ! -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
1011
         if [ ! -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
1012
             echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/invite.desktop
1012
             echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/invite.desktop
1013
             echo 'Version=1.0' >> /home/$MY_USERNAME/Desktop/invite.desktop
1013
             echo 'Version=1.0' >> /home/$MY_USERNAME/Desktop/invite.desktop
1054
     fi
1054
     fi
1055
 
1055
 
1056
     # If there is no ethernet then remove the invite icon
1056
     # If there is no ethernet then remove the invite icon
1057
-    if [[ "$ethernet_connected" == "0" ]]; then
1057
+    if [[ "\$ethernet_connected" == "0" ]]; then
1058
         if [ -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
1058
         if [ -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
1059
             rm /home/$MY_USERNAME/Desktop/invite.desktop
1059
             rm /home/$MY_USERNAME/Desktop/invite.desktop
1060
         fi
1060
         fi