]> git.ipfire.org Git - people/dweismueller/ipfire-2.x.git/commitdiff
coreutils: hack uname for build on hosts with linux kernel 3.x.
authorArne Fitzenreiter <arne_f@git.ipfire.org>
Thu, 8 Sep 2011 12:31:56 +0000 (14:31 +0200)
committerArne Fitzenreiter <arne_f@git.ipfire.org>
Thu, 8 Sep 2011 12:31:56 +0000 (14:31 +0200)
lfs/coreutils

index 9b6ddc7c4fa96175090125402dba01a8da0f2601..5e97941d2e0f3f416e0fb388548acf629f671d2f 100644 (file)
@@ -105,14 +105,16 @@ ifeq "$(ROOT)" ""
        #ln -sf ../../bin/install /usr/bin
        mv -f /bin/uname /bin/uname.bak
        echo '#!/bin/bash'                              >  /bin/uname
-       echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g'' >> /bin/uname
+       echo 'kernel=`/bin/uname.bak -r`' >> /bin/uname
+       echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g' | sed "s/$$kernel/2.6.32.45-ipfire/g"' >> /bin/uname
        chmod 755 /bin/uname
        dircolors -p > /etc/dircolors
 else
        rm /tools/bin/hostname
        mv -f /tools/bin/uname /tools/bin/uname.bak
        echo '#!/bin/bash'                                      >  /tools/bin/uname
-       echo '/tools/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g''     >> /tools/bin/uname
+       echo 'kernel=`/tools/uname.bak -r`' >> /bin/uname
+       echo '/tools/uname.bak $$* | sed 's/i.86/$(MACHINE)/g' | sed "s/$$kernel/2.6.32.45-ipfire/g"' >> /bin/uname
        chmod 755 /tools/bin/uname
 endif
        @rm -rf $(DIR_APP)