From 146fba7d481676850179e62ed36b7de1d5386838 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 20 Oct 2021 19:43:06 +0200 Subject: [PATCH] regenconf: yunohost hook was failing because grep may return exit code != 0 --- data/hooks/conf_regen/01-yunohost | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index ad10fa863..1aba1f03c 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -61,9 +61,11 @@ do_init_regen() { # Change dpkg vendor # see https://wiki.debian.org/Derivatives/Guidelines#Vendor - readlink -f /etc/dpkg/origins/default | grep -q debian \ - && rm -f /etc/dpkg/origins/default \ - && ln -s /etc/dpkg/origins/yunohost /etc/dpkg/origins/default + if readlink -f /etc/dpkg/origins/default | grep -q debian; + then + rm -f /etc/dpkg/origins/default \ + ln -s /etc/dpkg/origins/yunohost /etc/dpkg/origins/default + fi } do_pre_regen() { @@ -238,9 +240,11 @@ do_post_regen() { # Change dpkg vendor # see https://wiki.debian.org/Derivatives/Guidelines#Vendor - readlink -f /etc/dpkg/origins/default | grep -q debian \ - && rm -f /etc/dpkg/origins/default \ - && ln -s /etc/dpkg/origins/yunohost /etc/dpkg/origins/default + if readlink -f /etc/dpkg/origins/default | grep -q debian; + then + rm -f /etc/dpkg/origins/default + ln -s /etc/dpkg/origins/yunohost /etc/dpkg/origins/default + fi } do_$1_regen ${@:2}