mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2024-12-28 00:39:30 -05:00
make sure the hostname is set
This commit is contained in:
parent
46b4716ee9
commit
46e82d8893
@ -97,6 +97,8 @@ set -e -o pipefail
|
|||||||
if [ -f "/rw/config/protected-files.d/protect_hostname.txt" ] && rand="$RANDOM" && mv "/etc/hosts.lock" "/etc/hosts.lock.$rand" ; then
|
if [ -f "/rw/config/protected-files.d/protect_hostname.txt" ] && rand="$RANDOM" && mv "/etc/hosts.lock" "/etc/hosts.lock.$rand" ; then
|
||||||
name="PC-$rand"
|
name="PC-$rand"
|
||||||
echo "$name" > /etc/hostname
|
echo "$name" > /etc/hostname
|
||||||
|
hostname "$name"
|
||||||
|
#NOTE: NetworkManager may set it again after us based on DHCP or /etc/hostname, cf. `man NetworkManager.conf` @hostname-mode
|
||||||
|
|
||||||
#from /usr/lib/qubes/init/qubes-early-vm-config.sh
|
#from /usr/lib/qubes/init/qubes-early-vm-config.sh
|
||||||
if [ -e /etc/debian_version ]; then
|
if [ -e /etc/debian_version ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user