Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iAFhu-00078M-AF for mharc-grub-devel@gnu.org; Tue, 17 Sep 2019 11:47:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37399) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAFhh-000766-8r for grub-devel@gnu.org; Tue, 17 Sep 2019 11:47:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAFhg-0006Mi-8B for grub-devel@gnu.org; Tue, 17 Sep 2019 11:47:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56590) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iAFhe-0006MK-OH for grub-devel@gnu.org; Tue, 17 Sep 2019 11:47:43 -0400 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F14DC86679 for ; Tue, 17 Sep 2019 15:47:41 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id z8so1462254wrs.14 for ; Tue, 17 Sep 2019 08:47:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QkMoIu/t0XCQcZ49fwLlCUbqxTyd2hq01F0zsfsUHSg=; b=tmncIXwFxGQH4d9hHCLHiiIdDGqJS2/3BlEqbseBpZCUHT+Jkm0bBdkC0yqL9FRACH viIrk+69BOFsD3NWANtdrxQCtxyyaWuJhmRqHg0bGs9YrM96wgxBWZmuq0B6T21BtGR3 Zq4Umb44UneSIj5Dh9mmGYV+xqD8lMXKFj9XCf3ykpKi0Y89NYnzkLuKmKrsXckB4y9o k9jrGwoq6E9iAhLEOKOIXfRE2yoVQuQVlkFwxYODYNpxKhO4CHR9nxhPnhkyevKM0x3s V2D1vMsobCCCX/4QPTjL8n1E0zrvUWIFflZ1t6gVbEp1p+3+F/+kGkbsAAXMCJbHXkC4 4f1A== X-Gm-Message-State: APjAAAVQeSOlDGKPL/cjs0omN3QL855KoHmq08QdFF+L8jzxSRLLSVfg +YkwAy4mLnOXC/xoKLoVPXmwOzf1G66X47DFJZvT2JFKnipjC9CSW53BjrWdrTAlt6KVYGpMiBV Zfa6l6Src0M8= X-Received: by 2002:a05:600c:2911:: with SMTP id i17mr1549852wmd.68.1568735260238; Tue, 17 Sep 2019 08:47:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmcLP71jfWuOOo4SIRnSxT92nhC+FpTco0WmErVELDGUDtdO3fahw3Uqv7NB1HKweMZ3hLOQ== X-Received: by 2002:a05:600c:2911:: with SMTP id i17mr1549846wmd.68.1568735260080; Tue, 17 Sep 2019 08:47:40 -0700 (PDT) Received: from minerva.redhat.com ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id i74sm3259607wmg.44.2019.09.17.08.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 08:47:39 -0700 (PDT) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Marcel Kolaja , Javier Martinez Canillas , Vladimir Serbinenko , Daniel Kiper Subject: [PATCH] Honor a symlink when generating configuration by grub2-mkconfig Date: Tue, 17 Sep 2019 17:47:36 +0200 Message-Id: <20190917154736.962-1-javierm@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2019 15:47:46 -0000 From: Marcel Kolaja Honor a symlink when generating configuration by grub2-mkconfig, so that the -o option follows it rather than overwriting it with a regular file. Signed-off-by: Marcel Kolaja Signed-off-by: Javier Martinez Canillas --- util/grub-mkconfig.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 9f477ff0546..523d4e029bb 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -287,7 +287,8 @@ and /etc/grub.d/* files or please file a bug report w= ith exit 1 else # none of the children aborted with error, install the new grub.cfg - mv -f ${grub_cfg}.new ${grub_cfg} + cat ${grub_cfg}.new > ${grub_cfg} + rm -f ${grub_cfg}.new fi fi =20 --=20 2.21.0