File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ update_qubesconfig() {
114114 if ! grep -q localhost /etc/hosts; then
115115
116116 cat << EOF > /etc/hosts
117- 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 $( hostname)
117+ 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 $( cat /etc/ hostname)
118118::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
119119EOF
120120
@@ -126,10 +126,10 @@ EOF
126126 if ! is_protected_file /etc/hostname ; then
127127 for ip in ' 127\.0\.0\.1' ' ::1' ; do
128128 if grep -q " ^${ip} \(\s\|$\)" /etc/hosts; then
129- sed -i " /^${ip} \s/,+0s/\(\s$( hostname) \)\+\(\s\|$\)/\2/g" /etc/hosts
130- sed -i " s/^${ip} \(\s\|$\).*$/\0 $( hostname) /" /etc/hosts
129+ sed -i " /^${ip} \s/,+0s/\(\s$( cat /etc/ hostname) \)\+\(\s\|$\)/\2/g" /etc/hosts
130+ sed -i " s/^${ip} \(\s\|$\).*$/\0 $( cat /etc/ hostname) /" /etc/hosts
131131 else
132- echo " ${ip} $( hostname) " >> /etc/hosts
132+ echo " ${ip} $( cat /etc/ hostname) " >> /etc/hosts
133133 fi
134134 done
135135 fi
You can’t perform that action at this time.
0 commit comments