* [PATCH] fix unportability in gen_initramfs_list.sh
@ 2008-04-02 12:50 Felix Fietkau
0 siblings, 0 replies; only message in thread
From: Felix Fietkau @ 2008-04-02 12:50 UTC (permalink / raw)
To: linux-kernel
On a Mac OS X machine the output of ls -l is different from a standard
Linux machine. Use readlink instead of parsing a hardcoded field number
from the ls output.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
diff --git a/scripts/gen_initramfs_list.sh b/scripts/gen_initramfs_list.sh
index 684fb9c..5f3415f 100644
--- a/scripts/gen_initramfs_list.sh
+++ b/scripts/gen_initramfs_list.sh
@@ -135,7 +135,7 @@ parse() {
str="${ftype} ${name} ${str} ${dev} ${maj} ${min}"
;;
"slink")
- local target=`field 11 $(LC_ALL=C ls -l "${location}")`
+ local target=`readlink "${location}"`
str="${ftype} ${name} ${target} ${str}"
;;
*)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-02 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02 12:50 [PATCH] fix unportability in gen_initramfs_list.sh Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox