hostname: fix sed call
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds
Some checks are pending
continuous-integration/laminar-eldarion Build failed with exit code 123 after 3 seconds
This commit is contained in:
parent
afb3d96060
commit
8cdbd588ee
1 changed files with 2 additions and 2 deletions
|
@ -5,10 +5,10 @@ new_hostname="$(ask_text "Set system hostname" "Enter this system's new hostname
|
|||
|
||||
task_begin "Updating hostname to ${new_hostname}";
|
||||
|
||||
hostnamectl set-hostname "${new_hostname}";
|
||||
hostname "${new_hostname}";
|
||||
|
||||
cp /etc/hosts /etc/hosts.bak;
|
||||
|
||||
sed "0,/${old_hostname}/{s/${old_hostname}/${new_hostname/}}" /etc/hosts.bak >/etc/hosts;
|
||||
sed "0,/${old_hostname}/{s/${old_hostname}/${new_hostname}/g}" /etc/hosts.bak >/etc/hosts;
|
||||
|
||||
task_end "${?}";
|
||||
|
|
Loading…
Reference in a new issue