mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 20:20:09 +01:00
contrib/nm-live-vm: write /etc/fstab
Everytime you call mock again, the fstab file will be reset. So, we have to write it shortly before creating the image. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
0178d73699
commit
cd7c97eb1d
2 changed files with 8 additions and 2 deletions
|
|
@ -92,7 +92,14 @@ do_live_vm() {
|
|||
echo "Preparing kernel and initrd..." || exit 1
|
||||
mkdir -p $NAME || exit 1
|
||||
cp $TREE/boot/vmlinuz* $NAME/vmlinuz || exit 1
|
||||
mock -r "$ROOT" --chroot "{ ( cd / ; find -not \( -path ./tmp/initramfs.img -o -path './var/cache/yum/*' -o -path './boot' \) -xdev -print0 | cpio -o0c ) || exit 1; } | gzip > /tmp/initramfs.img || exit 1" || die "error creating initramfs"
|
||||
mock -r "$ROOT" --chroot "{ ( cd / ; \
|
||||
echo '/dev/sda1 /mnt/sda1 vfat defaults 0 0' >> /etc/fstab ; \
|
||||
find -not \( \
|
||||
-path ./tmp/initramfs.img -o \
|
||||
-path './var/cache/yum/*' -o \
|
||||
-path './boot' \
|
||||
\) -xdev -print0 | \
|
||||
cpio -o0c ) || exit 1; } | gzip > /tmp/initramfs.img || exit 1" || die "error creating initramfs"
|
||||
cp "$TREE/tmp/initramfs.img" "$NAME/" || exit 1
|
||||
cp run.sh $NAME/run.sh
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,5 @@ sed -e 's/^#\?\(RateLimitInterval *= *\).*/\10/' \
|
|||
-i /etc/systemd/journald.conf
|
||||
|
||||
mkdir /mnt/sda1
|
||||
echo "/dev/sda1 /mnt/sda1 vfat defaults 0 0" >> /etc/fstab
|
||||
|
||||
git gc
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue