From 6ebabc5b94cea6cb94669bdfcbaa6e08ce19dc04 Mon Sep 17 00:00:00 2001 From: Kyle Rankin Date: Thu, 6 Dec 2018 16:51:43 -0800 Subject: [PATCH] Remove any duplicate config options from config.user --- initrd/etc/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initrd/etc/functions b/initrd/etc/functions index 553f4b27..1f7896ac 100755 --- a/initrd/etc/functions +++ b/initrd/etc/functions @@ -229,8 +229,8 @@ replace_config() { # then copy any remaining settings from the existing config file, minus the option you changed grep -v "^export ${CONFIG_OPTION}=" ${CONFIG_FILE} | grep -v "^${CONFIG_OPTION}=" >> ${CONFIG_FILE}.tmp || true - - mv ${CONFIG_FILE}.tmp ${CONFIG_FILE} + sort ${CONFIG_FILE}.tmp | uniq > ${CONFIG_FILE} + rm -f ${CONFIG_FILE}.tmp } combine_configs() { cat /etc/config* > /tmp/config