Create /etc/system-release in stage2.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 30 Sep 2013 19:16:03 +0000 (21:16 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 30 Sep 2013 19:16:03 +0000 (21:16 +0200)
config/rootfiles/common/armv5tel/installer [deleted file]
config/rootfiles/common/configroot
lfs/stage2
make.sh
tools/make-functions

diff --git a/config/rootfiles/common/armv5tel/installer b/config/rootfiles/common/armv5tel/installer
deleted file mode 100644 (file)
index 59b5a02..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#etc/system-release
-#opt/pakfire/db/core/mine
index 0791661..7796d86 100644 (file)
@@ -199,4 +199,3 @@ var/ipfire/wakeonlan
 var/ipfire/wireless
 #var/ipfire/wireless/config
 #var/ipfire/wireless/settings
-etc/system-release
index 8d302eb..5c15f41 100644 (file)
@@ -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 edee082..9bae8a6 100755 (executable)
--- 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() {
index 0385528..3a16c02 100644 (file)
@@ -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" \