public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 391560854f64ad2385adb3ff25dbbcec0ff92668
Date: Mon, 02 Jan 2017 19:14:30 +0000	[thread overview]
Message-ID: <20170102191431.2C3CD1078E80@git01.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2843 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  391560854f64ad2385adb3ff25dbbcec0ff92668 (commit)
      from  9a015b5bd54887495c8670aee91335cfabf9d6f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 391560854f64ad2385adb3ff25dbbcec0ff92668
Author: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
Date:   Mon Jan 2 16:17:08 2017 +0100

    Improvement of backup iso script
    
    The backup iso script did not check the arch of the host. On x86_64 host
    the wrong iso was downloaded.
    
    Furthermore, there were some if clauses which could cause trouble which
    I also tried to improve.
    (For example: -e is valid if we have a directory or a file, but we want
    to check for a file only )
    
    Fixes: 11258
    
    Signed-off-by: Jonatan Schlag <jonatan.schlag(a)ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 src/scripts/backupiso | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

Difference in files:
diff --git a/src/scripts/backupiso b/src/scripts/backupiso
index 014e8e9..1a682d0 100644
--- a/src/scripts/backupiso
+++ b/src/scripts/backupiso
@@ -1,9 +1,25 @@
 #!/bin/sh
+arch=$(uname -m)
+
+case $arch in
+	"i?86")
+		arch="i586"
+		echo "Your arch is $arch"
+		;;
+	"x86_64")
+		arch="x86_64"
+		echo "Your arch is $arch"
+		;;
+	*)
+		echo "Arch is not supported"
+		exit 1
+		;;
+esac
 
 COREVER=$(cat /opt/pakfire/db/core/mine)
 # FIXME: edit this lines before release
 URL="http://download.ipfire.org/releases/ipfire-2.x/2.19-core$COREVER/"
-ISO="ipfire-2.19.i586-full-core$COREVER.iso"
+ISO="ipfire-2.19.$arch-full-core$COREVER.iso"
 
 if [ -z $1 ]; then
 	echo usage: $0 backup-file
@@ -15,7 +31,7 @@ TS=$1
 mkdir -p /var/tmp/backupiso
 cd /var/tmp/backupiso
 
-if [ ! -e ${ISO} ]
+if [ ! -f ${ISO} ]
 then
 	echo "Fetching ${URL}${ISO}"
 	wget --quiet -c ${URL}${ISO}
@@ -26,7 +42,7 @@ wget --quiet -O ${ISO}.md5 ${URL}${ISO}.md5
 
 echo "Checking md5 of ${ISO}"
 md5sum --status -c ${ISO}.md5
-if [ $? -eq 0 -o $? -eq 24 ]
+if [ $? -eq 0 ] || [ $? -eq 24 ]
 then
 	echo "md5 is OK"
 else
@@ -35,7 +51,7 @@ else
 	wget --quiet -O ${ISO} ${URL}${ISO}
 	echo "Checking again md5 of ${ISO}"
 	md5sum --status -c ${ISO}.md5
-	if [ $? -eq 0 -o $? -eq 24 ]
+	if [ $? -eq 0 ] || [ $? -eq 24 ]
 	then
 		echo "md5 is OK"
 	else


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2017-01-02 19:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170102191431.2C3CD1078E80@git01.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox