From df44e16f881e0f9bce43b5817c71cda8b090d3ef Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Fri, 11 Jan 2019 11:43:53 +0200 Subject: [PATCH] S03hostname: use prepare_conf --- board/common/overlay/etc/init.d/S03hostname | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/board/common/overlay/etc/init.d/S03hostname b/board/common/overlay/etc/init.d/S03hostname index 8b886e838d..a730cc65c0 100755 --- a/board/common/overlay/etc/init.d/S03hostname +++ b/board/common/overlay/etc/init.d/S03hostname @@ -10,13 +10,7 @@ case "$1" in start) msg_begin "Setting hostname" - if ! [[ -f $hostname_file ]]; then - if [[ -f $boot_hostname_file ]]; then - cp $boot_hostname_file $hostname_file - elif [[ -f $sys_hostname_file ]]; then - cp $sys_hostname_file $hostname_file - fi - fi + prepare_conf $hostname_file $sys_hostname_file $boot_hostname_file if [[ -f $hostname_file ]]; then hostname=$(cat $hostname_file)