2 # febootstrap-to-initramfs
3 # (C) Copyright 2009 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 # Written by Richard W.M. Jones <rjones@redhat.com>
25 --long files:,nocompress,help \
26 -n febootstrap-to-initramfs -- "$@"`
28 echo "febootstrap-to-initramfs: problem parsing the command line arguments"
38 echo "Usage: febootstrap-to-initramfs [--files=filelist] [--nocompress] DIR"
39 echo "Please read febootstrap-to-initramfs(8) man page for more information."
57 echo "Internal error!"
69 if [ ! -f fakeroot.log -a $(id -u) -ne 0 ]; then
70 echo "no fakeroot.log and not running as root"
77 if [ -f fakeroot.log ]; then
78 if [ -z "$files" ]; then
79 fakeroot -i fakeroot.log \
80 sh -c 'find -not -name fakeroot.log -a -print0 | cpio --quiet -o -0 -H newc'
82 fakeroot -i fakeroot.log \
83 sh -c 'cpio --quiet -o -H newc' < $files
86 if [ -z "$files" ]; then
87 find -not -name fakeroot.log -a -print0 | cpio --quiet -o -0 -H newc
89 cpio --quiet -o -H newc < $files
93 if [ "$compress" = "yes" ]; then