diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-04 12:23:59 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2011-03-04 12:23:59 +0100 |
commit | ecef8d6d31c82ae40afd1734a476c366f8995018 (patch) | |
tree | 8378e23d685671edea04600368bafada1f6eb2a3 /config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay | |
parent | 5af8a9348fe074f94cbbf35da8cd23f7b87a3633 (diff) | |
download | kanotix-ecef8d6d31c82ae40afd1734a476c366f8995018.zip kanotix-ecef8d6d31c82ae40afd1734a476c366f8995018.tar.gz |
added support for multiple overlays in one container
Diffstat (limited to 'config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay')
-rwxr-xr-x | config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay index d648beb..9e4d913 100755 --- a/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay +++ b/config/chroot_local-includes/usr/share/initramfs-tools/scripts/live-bottom/01gfxoverlay @@ -1,14 +1,25 @@ #!/bin/sh -if [ -e /etc/gfxoverlay ]; then - overlay="$(echo /root/live/image/gfxoverlay/$(cat /etc/gfxoverlay).*)" - if [ -f "$overlay" ]; then - #overlay_dev="$(losetup -f)" - #losetup "$overlay_dev" "$overlay" - mkdir -p /live/gfxoverlay /root/live/gfxoverlay +[ ! -f /etc/gfxoverlay ] && exit 0 + +gfx="$(cat /etc/gfxoverlay)" +bit=32 +[ "$(uname -m)" = "x86_64" ] && bit=64 + +mkdir -p /live/gfxoverlay /root/live/gfxoverlay +for overlay in /root/live/image/gfxoverlay.* /root/live/image/gfxoverlay/$gfx.* +do + [ ! -e "$overlay" ] && continue mount -o loop "$overlay" /live/gfxoverlay - mount -o remount,add:1:/live/gfxoverlay /root - mount -n -o move /live/gfxoverlay /root/live/gfxoverlay - fi -fi + for dir in /live/gfxoverlay/overlay$bit-$gfx /live/gfxoverlay/$gfx /live/gfxoverlay + do + if [ -d $dir/lib ]; then + mount -o remount,add:1:$dir /root + mount -n -o move /live/gfxoverlay /root/live/gfxoverlay + exit 0 + fi + done + umount /live/gfxoverlay +done +rmdir /live/gfxoverlay /root/live/gfxoverlay |