Skip to content

Commit d78b4d0

Browse files
committed
fix: quote backup filename in hostname-setup.sh to handle spaces in path
1 parent bee8f93 commit d78b4d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup/system/hostname-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ while true; do
7070
echo "2️⃣ Updating /etc/hosts..."
7171

7272
# Backup /etc/hosts
73-
sudo cp /etc/hosts /etc/hosts.backup.$(date +%Y%m%d%H%M%S)
73+
sudo cp /etc/hosts "/etc/hosts.backup.$(date +%Y%m%d%H%M%S)"
7474

7575
# Replace old hostname with new hostname in /etc/hosts
7676
# Handle both 127.0.1.1 format and other variations

0 commit comments

Comments
 (0)