From: Michael Tremer Date: Mon, 30 Sep 2013 19:16:03 +0000 (+0200) Subject: Create /etc/system-release in stage2. X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=d02853e73cd65332ebeda9490e3306931ebd7406 Create /etc/system-release in stage2. --- diff --git a/config/rootfiles/common/armv5tel/installer b/config/rootfiles/common/armv5tel/installer deleted file mode 100644 index 59b5a022a..000000000 --- a/config/rootfiles/common/armv5tel/installer +++ /dev/null @@ -1,2 +0,0 @@ -#etc/system-release -#opt/pakfire/db/core/mine diff --git a/config/rootfiles/common/configroot b/config/rootfiles/common/configroot index 07916611e..7796d8665 100644 --- a/config/rootfiles/common/configroot +++ b/config/rootfiles/common/configroot @@ -199,4 +199,3 @@ var/ipfire/wakeonlan var/ipfire/wireless #var/ipfire/wireless/config #var/ipfire/wireless/settings -etc/system-release diff --git a/lfs/stage2 b/lfs/stage2 index 8d302ebc6..5c15f4183 100644 --- a/lfs/stage2 +++ b/lfs/stage2 @@ -121,6 +121,9 @@ $(TARGET) : -mkdir -pv /usr/share/doc/licenses/ cp -vf $(DIR_SRC)/doc/COPYING /usr/share/doc/licenses/GPLv3 + # System release + echo "$(SYSTEM_RELEASE)" > /etc/system-release + # Pakfire -mkdir -pv /opt/pakfire/db/core echo "$(PAKFIRE_CORE)" > /opt/pakfire/db/core/mine diff --git a/make.sh b/make.sh index edee082f0..9bae8a679 100755 --- a/make.sh +++ b/make.sh @@ -83,6 +83,22 @@ if [ -z $EDITOR ]; then [ -z $EDITOR ] && exiterror "You should have installed an editor." fi +# Prepare string for /etc/system-release. +SYSTEM_RELEASE="${NAME} ${VERSION} (${MACHINE})" +if [ "$(git status -s | wc -l)" == "0" ]; then + GIT_STATUS="" +else + GIT_STATUS="-dirty" +fi +case "$GIT_BRANCH" in + core*|beta?|rc?) + SYSTEM_RELEASE="${SYSTEM_RELEASE} - $GIT_BRANCH$GIT_STATUS" + ;; + *) + SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" + ;; +esac + prepareenv() { ############################################################################ # # @@ -773,20 +789,6 @@ buildipfire() { ipfiremake wavemon ipfiremake iptraf-ng ipfiremake iotop - - if [ "$(git status -s | wc -l)" == "0" ]; then - GIT_STATUS="" - else - GIT_STATUS="-dirty" - fi - case "$GIT_BRANCH" in - core*|beta?|rc?) - echo "$NAME $VERSION ($MACHINE) - $GIT_BRANCH$GIT_STATUS" > $BASEDIR/build/etc/system-release - ;; - *) - echo "$NAME $VERSION ($MACHINE) - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS" > $BASEDIR/build/etc/system-release - ;; - esac } buildinstaller() { diff --git a/tools/make-functions b/tools/make-functions index 0385528a8..3a16c0207 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -415,6 +415,7 @@ lfsmake2() { TERM=$TERM PS1='\u:\w\$ ' \ PATH=/tools/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ VERSION=$VERSION PAKFIRE_CORE="${PAKFIRE_CORE}" \ + SYSTEM_RELEASE="${SYSTEM_RELEASE}" \ CONFIG_ROOT=$CONFIG_ROOT \ NAME="$NAME" SNAME="$SNAME" SLOGAN="$SLOGAN" \ CFLAGS="$C2FLAGS" CXXFLAGS="$CXX2FLAGS" \