slitaz-base-files rev 291
ldd: use $PATH
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Dec 24 10:30:54 2015 +0100 (2015-12-24) |
parents | eecec1b9437a |
children | 5bc2687bfecf |
files | rootfs/etc/fstab rootfs/usr/bin/ipinfo rootfs/usr/bin/ldd |
line diff
1.1 --- a/rootfs/etc/fstab Wed Dec 23 22:02:35 2015 +0100 1.2 +++ b/rootfs/etc/fstab Thu Dec 24 10:30:54 2015 +0100 1.3 @@ -3,7 +3,7 @@ 1.4 proc /proc proc defaults 0 0 1.5 sysfs /sys sysfs defaults 0 0 1.6 devpts /dev/pts devpts rw,gid=5,mode=0620 0 0 1.7 -tmpfs /dev/shm tmpfs defaults 0 0 1.8 +tmpfs /dev/shm tmpfs noexec,nosuid 0 0 1.9 tmpfs /var/lock tmpfs defaults 0 0 1.10 /dev/cdrom /media/cdrom iso9660 user,ro,noauto 0 0 1.11 #/dev/sda3 /home ext3 defaults 0 2
2.1 --- a/rootfs/usr/bin/ipinfo Wed Dec 23 22:02:35 2015 +0100 2.2 +++ b/rootfs/usr/bin/ipinfo Thu Dec 24 10:30:54 2015 +0100 2.3 @@ -10,6 +10,6 @@ 2.4 iface="$INTERFACE" 2.5 fi 2.6 2.7 -ifconfig ${iface} | fgrep 'inet addr:' | cut -d: -f2 | awk '{print $1}' 2.8 +ifconfig ${iface} | awk '/inet addr/{print substr($1,6)}' 2.9 2.10 exit 0
3.1 --- a/rootfs/usr/bin/ldd Wed Dec 23 22:02:35 2015 +0100 3.2 +++ b/rootfs/usr/bin/ldd Thu Dec 24 10:30:54 2015 +0100 3.3 @@ -1,17 +1,17 @@ 3.4 #!/bin/sh 3.5 # 3.6 # Tiny ldd fake. 3.7 -# Copyright (C) 2010-2014 SliTaz GNU/Linux. 3.8 +# Copyright (C) 2010-2015 SliTaz GNU/Linux. 3.9 # 3.10 3.11 -echo "" 3.12 +echo 3.13 file="$@" 3.14 for file do 3.15 - case $file in 3.16 - */*) : ;; 3.17 - *) file=./$file ;; 3.18 + case "$file" in 3.19 + */*) ;; 3.20 + *) [ -f "./$file" ] && file="./$file" 3.21 esac 3.22 - echo "$file:" | sed 's%^./%%' 3.23 - LD_TRACE_LOADED_OBJECTS=1 /lib/ld*.so "$file" 3.24 - echo "" 3.25 + which "$file" | sed 's%^./%%;s%$%:%' 3.26 + LD_TRACE_LOADED_OBJECTS=1 "$file" 3.27 + echo 3.28 done