cookbook/container: remove unexplained "exec >&2" lines.
These are often a good idea, but not necessary here and are distracting to the tutorial, so let's just take them out. Reported-by: Jeff Stearns <jeff.stearns@gmail.com>
This commit is contained in:
parent
1eeb1fb909
commit
537866b871
7 changed files with 7 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
exec >&2
|
exec >&2 # any output we produce is a log message
|
||||||
no_simple=
|
no_simple=
|
||||||
no_debian=
|
no_debian=
|
||||||
no_runlocal=
|
no_runlocal=
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
exec >&2
|
|
||||||
fs=${1%.fs}
|
fs=${1%.fs}
|
||||||
|
|
||||||
# let's *not* delete this directory; it's okay if previously-downloaded
|
# let's *not* delete this directory; it's okay if previously-downloaded
|
||||||
|
|
@ -10,5 +9,5 @@ debootstrap \
|
||||||
--download-only \
|
--download-only \
|
||||||
--keep-debootstrap-dir \
|
--keep-debootstrap-dir \
|
||||||
$(cat debootstrap.options) \
|
$(cat debootstrap.options) \
|
||||||
"$fs"
|
"$fs" >&2
|
||||||
redo-ifchange "$fs/debootstrap/debootstrap.log"
|
redo-ifchange "$fs/debootstrap/debootstrap.log"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
exec >&2
|
|
||||||
fs=${1%.fs}
|
fs=${1%.fs}
|
||||||
rm -rf "$fs" "$fs.fakeroot"
|
rm -rf "$fs" "$fs.fakeroot"
|
||||||
|
|
||||||
redo-ifchange debootstrap.fs
|
redo-ifchange debootstrap.fs
|
||||||
fakeroot -i debootstrap.fakeroot -s "$fs.fakeroot" cp -a debootstrap/. "$fs"
|
fakeroot -i debootstrap.fakeroot -s "$fs.fakeroot" \
|
||||||
|
cp -a debootstrap/. "$fs" >&2
|
||||||
|
|
||||||
# Work around bug (in fakechroot?) where /lib64 symlink ends up pointing
|
# Work around bug (in fakechroot?) where /lib64 symlink ends up pointing
|
||||||
# at an absolute path including $PWD, rather than inside the chroot.
|
# at an absolute path including $PWD, rather than inside the chroot.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
exec >&2
|
|
||||||
fs=${1%.fs}
|
fs=${1%.fs}
|
||||||
rm -rf "$fs" "$fs.fakeroot"
|
rm -rf "$fs" "$fs.fakeroot"
|
||||||
|
|
||||||
|
|
@ -7,7 +6,7 @@ cp -a debdownload/. "$fs"
|
||||||
eatmydata \
|
eatmydata \
|
||||||
fakechroot \
|
fakechroot \
|
||||||
fakeroot -s "$fs.fakeroot" \
|
fakeroot -s "$fs.fakeroot" \
|
||||||
debootstrap $(cat debootstrap.options) "$fs"
|
debootstrap $(cat debootstrap.options) "$fs" >&2
|
||||||
|
|
||||||
# Clean up installed package files
|
# Clean up installed package files
|
||||||
rm -f "$fs"/var/cache/apt/archives/*.deb \
|
rm -f "$fs"/var/cache/apt/archives/*.deb \
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
exec >&2
|
|
||||||
./need.sh python kvm busybox
|
./need.sh python kvm busybox
|
||||||
|
|
||||||
redo-ifchange "$2.initrd" memcalc.py
|
redo-ifchange "$2.initrd" memcalc.py
|
||||||
|
|
@ -7,7 +6,7 @@ rm -f "$3.out" "$3.code"
|
||||||
# Linux only allows an initrd of size < 50% of RAM,
|
# Linux only allows an initrd of size < 50% of RAM,
|
||||||
# so set a RAM amount based on the initrd size.
|
# so set a RAM amount based on the initrd size.
|
||||||
mem=$(./memcalc.py "$2.initrd")
|
mem=$(./memcalc.py "$2.initrd")
|
||||||
echo "$2: kvm memory required: $mem"
|
echo "$2: kvm memory required: $mem" >&2
|
||||||
|
|
||||||
kvm \
|
kvm \
|
||||||
-m "$mem" \
|
-m "$mem" \
|
||||||
|
|
@ -21,7 +20,7 @@ kvm \
|
||||||
-chardev file,id=char2,path="$3.code" \
|
-chardev file,id=char2,path="$3.code" \
|
||||||
-serial chardev:char0 \
|
-serial chardev:char0 \
|
||||||
-serial chardev:char1 \
|
-serial chardev:char1 \
|
||||||
-serial chardev:char2
|
-serial chardev:char2 >&2
|
||||||
read rv <$3.code || true
|
read rv <$3.code || true
|
||||||
[ -z "$rv" ] && exit 99
|
[ -z "$rv" ] && exit 99
|
||||||
if [ "$rv" -eq 0 ]; then
|
if [ "$rv" -eq 0 ]; then
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
exec >&2
|
|
||||||
|
|
||||||
fs=${1%.fs}
|
fs=${1%.fs}
|
||||||
redo-ifchange simple.fs
|
redo-ifchange simple.fs
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
exec >&2
|
|
||||||
|
|
||||||
# We can pull in the 'hello' binary built in an earlier
|
# We can pull in the 'hello' binary built in an earlier
|
||||||
# example. Notice that it's safe to have dependencies
|
# example. Notice that it's safe to have dependencies
|
||||||
# that cross directory boundaries, even when we're building
|
# that cross directory boundaries, even when we're building
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue