patch_initrd.sh 404 Bytes
Newer Older
Daniel Schulte's avatar
Daniel Schulte committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
mkdir initrd_edit
cd initrd_edit
echo "Extracting initrd..."
lzma -dc -S .lz ../initrd.lz | cpio -imvd --no-absolute-filenames
mv ../initrd.lz ../initrd.lz.org
echo "OK!"
echo "Patching..."
pwd
patch scripts/casper-bottom/25adduser ../adduser.patch
echo "OK!"
echo "Recompressing..."
find . | cpio --quiet --dereference -o -H newc | lzma -7 > ../initrd.lz
echo "OK!"
cd ..
echo "Done"
exit 0