diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-03 12:33:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-03 12:33:25 +0000 |
commit | 7b5d5fe45409a8883f38d1ffe162f31bf8aa00d5 (patch) | |
tree | 297f6b2b1961a230bb64f7027954f9816953cf50 /mkinitfs.in | |
parent | d64e5baefc7e1ca75e6f1ca50f28e96b30991c6a (diff) | |
download | mkinitfs-7b5d5fe45409a8883f38d1ffe162f31bf8aa00d5.tar.bz2 mkinitfs-7b5d5fe45409a8883f38d1ffe162f31bf8aa00d5.tar.xz |
mkinitfs: another fix for -b
Diffstat (limited to 'mkinitfs.in')
-rwxr-xr-x | mkinitfs.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mkinitfs.in b/mkinitfs.in index 0332151..3a3bcd3 100755 --- a/mkinitfs.in +++ b/mkinitfs.in @@ -24,7 +24,7 @@ _cp() { for i in "$@"; do local dest="$tmpdir"/${i%/*} mkdir -p "$dest" - cp -flLpR "$basedir"/"$i" "$dest" 2>/dev/null || cp -pR "$i" "$dest" + cp -flLpR "$basedir"/"$i" "$dest" 2>/dev/null || cp -pR "$basedir"/"$i" "$dest" done } @@ -35,7 +35,7 @@ feature_files() { if [ ! -f "$dir/$f" ]; then continue fi - for glob in $(cat "$dir/$f"); do + for glob in $(sed 's:^/\+::' "$dir/$f"); do for file in $glob; do if [ -d $file ]; then find $file -type f @@ -55,6 +55,7 @@ initfs_base() { done [ -z "$list_sources" ] && mkdir -p $dirs + cd "$basedir" for file in $(feature_files "$filelists_dir"); do _cp $file done @@ -75,7 +76,7 @@ initfs_base() { } find_kmod_deps() { - awk ' + awk -v modulesdep="$basedir/lib/modules/$kernel/modules.dep" ' function recursedeps(k, j, dep) { if (k in visited) return; @@ -102,7 +103,7 @@ BEGIN { END { for (i in mod) recursedeps(i); -}' -v modulesdep="$basedir/lib/modules/$kernel/modules.dep" +}' } find_kmods() { |