Skip to content

Commit 164656c

Browse files
committed
Eatmydata
1 parent 60e0900 commit 164656c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

simpleimage/make_rootfs.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,10 @@ EOF
134134
chmod a+x "$DEST/usr/sbin/policy-rc.d"
135135

136136
do_chroot() {
137-
cmd="$@"
138137
mount -o bind /tmp "$DEST/tmp"
139138
chroot "$DEST" mount -t proc proc /proc
140139
chroot "$DEST" mount -t sysfs sys /sys
141-
chroot "$DEST" $cmd
140+
chroot "$DEST" $CHROOT_PREFIX "$@"
142141
chroot "$DEST" umount /sys
143142
chroot "$DEST" umount /proc
144143
umount "$DEST/tmp"
@@ -156,12 +155,20 @@ case $DISTRO in
156155
DEB=ubuntu
157156
DEBUSER=pine64
158157
DEBUSERPW=pine64
158+
159+
do_chroot apt-get -y update
160+
do_chroot apt-get -y install eatmydata
161+
162+
export DEBIAN_FRONTEND=noninteractive
163+
export CHROOT_PREFIX="eatmydata --"
164+
165+
do_chroot locale-gen en_US.UTF-8
166+
159167
cat > "$DEST/second-phase" <<EOF
160168
#!/bin/bash
161169
set -ex
162170
export DEBIAN_FRONTEND=noninteractive
163171
locale-gen en_US.UTF-8
164-
apt-get -y update
165172
apt-get install -y software-properties-common dirmngr
166173
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BF428671
167174
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 56A3D45E

0 commit comments

Comments
 (0)