2019-11-27

next64 - cookutils - uname


cookutils - uname

can't open '/home/slitaz/wok/linux/receipt'
Linux slitaz -slitaz
#2 SMP Sat Jul 21 03:23:55 UTC 2018 x86_64 GNU/Linux


tux@slitaz:~$ uname -a
/bin/uname: .: line 8: can't open '/home/slitaz/wok/linux/receipt'
Linux slitaz -slitaz #2 SMP Sat Jul 21 03:23:55 UTC 2018 x86_64 GNU/Linux

tux@slitaz:~$ ls -l /home/slitaz/wok/linux/receipt
ls: /home/slitaz/wok/linux/receipt: No such file or directory

tux@slitaz:~$ ls /home
tux

tux@slitaz:~$ cat /bin/uname
#!/bin/sh
# uname - special "fake" wrapper for using inside SliTaz cooker chroot.
# Although SliTaz cooker *host arch* is 64-bit, SliTaz *target arch* may be
# 32-bit and some configuration tools using uname could be improperly configured.
# This also applies to the kernel versions of the host and the target systems.

. /etc/slitaz/cook.conf
kernel_version=$(. /home/slitaz/wok/linux/receipt; echo $VERSION)
uname_r=$(/bin/busybox uname -r)
/bin/busybox uname $@ | sed "s|x86_64|$ARCH|g; s|$uname_r|$kernel_version-slitaz|g"
tux@slitaz:~$