From 718a50b9d03891a458ac5c215659496af056c7f2 Mon Sep 17 00:00:00 2001 From: Michael Shigorin Date: Wed, 10 Oct 2012 12:06:55 +0300 Subject: [PATCH] relname: tweak the fix/diagnostics The culprit would be that $RELNAME isn't really set there ($GLOBAL_RELNAME is), and sh -u will treat that as error. --- features.in/relname/stage2/image-scripts.d/91-relname | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/features.in/relname/stage2/image-scripts.d/91-relname b/features.in/relname/stage2/image-scripts.d/91-relname index 9f501cda..416b7cf4 100755 --- a/features.in/relname/stage2/image-scripts.d/91-relname +++ b/features.in/relname/stage2/image-scripts.d/91-relname @@ -1,9 +1,14 @@ -#!/bin/sh -efu +#!/bin/sh -ef # create a postinstall script to perform the change afterwards +if [ -z "$GLOBAL_RELNAME" ]; then + echo "** warning: relname feature enabled but RELNAME not set" >&2 + exit 0 +fi + if [ -n "$GLOBAL_VERBOSE" ]; then - echo "** Change /etc/altlinux-release contents to 'RELNAME'" -fi >&2 + echo "** Change /etc/altlinux-release contents to the release name" >&2 +fi SCRIPT="/usr/share/install2/postinstall.d/91-relname" cat > "$SCRIPT" << EOF