Browse Source

Improved initramfs output format to support .ln overlay files as symlinks, including the referenced location as content

karasz/new-early
Alejandro Mery 18 years ago
parent
commit
aba629a15e
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      target/share/initramfs.in

+ 7
- 3
target/share/initramfs.in

@ -2,7 +2,7 @@
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: target/share/initramfs.in
# Copyright (C) 2007 The OpenSDE Project
# Copyright (C) 2007 - 2008 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
@ -35,14 +35,14 @@ initramfs_install_flist() {
initramfs_install_overlay() {
local overlaydir="$1" rootfs="$2"
local file= source= target= ext=
local type= mode=
local type= mode= ref=
for file in $overlaydir/*; do
source="${file##*/}"
ext="${file##*.}"
case "$ext" in
sh|exec|txt|patch)
sh|exec|txt|patch|ln)
case "$ext" in
sh|exec) type='exec'; mode=0755 ;;
*) type="$ext"; mode=0644 ;;
@ -58,6 +58,10 @@ initramfs_install_overlay() {
cp -f "$file" "$rootfs/$target"
chmod $mode "$rootfs/$target"
;;
ln) ref=$( cat "$file" )
echo_status "injecting $target -> $ref"
ln -snf "$ref" "$rootfs/$target"
;;
patch)
echo_status "$(patch -p1 -d "${rootfs}" 2>&1 < $file )"
;;

Loading…
Cancel
Save