git.annexia.org
/
febootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stop febootstrap-run from accepting -g and -i options in error.
[febootstrap.git]
/
febootstrap-to-initramfs.sh
diff --git
a/febootstrap-to-initramfs.sh
b/febootstrap-to-initramfs.sh
index
1fdd50e
..
93d415a
100755
(executable)
--- a/
febootstrap-to-initramfs.sh
+++ b/
febootstrap-to-initramfs.sh
@@
-18,21
+18,25
@@
#
# Written by Richard W.M. Jones <rjones@redhat.com>
#
# Written by Richard W.M. Jones <rjones@redhat.com>
+unset CDPATH
+
if [ $# -ne 1 ]; then
echo "febootstrap-to-initramfs DIR > initrd.img"
exit 1
fi
if [ $# -ne 1 ]; then
echo "febootstrap-to-initramfs DIR > initrd.img"
exit 1
fi
-cd "$1"
+cd "$1"
> /dev/null
if [ ! -f fakeroot.log -a $(id -u) -ne 0 ]; then
echo "no fakeroot.log and not running as root"
exit 1
fi
if [ ! -f fakeroot.log -a $(id -u) -ne 0 ]; then
echo "no fakeroot.log and not running as root"
exit 1
fi
+set -e
+
if [ -f fakeroot.log ]; then
fakeroot -i fakeroot.log \
if [ -f fakeroot.log ]; then
fakeroot -i fakeroot.log \
- sh -c 'find -not -name fakeroot.log -a -print0 | cpio -o
0
c | gzip --best'
+ sh -c 'find -not -name fakeroot.log -a -print0 | cpio -o
-0 -H new
c | gzip --best'
else
else
- find -not -name fakeroot.log -a -print0 | cpio -o
0
c | gzip --best
+ find -not -name fakeroot.log -a -print0 | cpio -o
-0 -H new
c | gzip --best
fi
fi