From f6e56798fd1eada749d811ae5263a86dbc8d52b2 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Tue, 2 Feb 2016 11:55:23 +0100 Subject: [PATCH] Keep previous /etc/hostname and /etc/localtime --- vps2arch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vps2arch b/vps2arch index 4305281..45ccee5 100755 --- a/vps2arch +++ b/vps2arch @@ -99,6 +99,10 @@ save_root_pass() { chmod 0600 "/root.$cpu_type/root.passwd" } +backup_old_files() { + cp -fL /etc/hostname /etc/localtime "/root.$cpu_type/etc/" || true +} + delete_all() { # Remove immutable flag from any files / directories if command -v chattr >/dev/null 2>&1; then @@ -320,6 +324,7 @@ cd / download_and_extract_bootstrap configure_chroot save_root_pass +backup_old_files delete_all install_packages restore_root_pass