Makefile: ALlow for creation of swap-less appliances.

Also fix a bug where fstab (and hostname) were not (always) being updated.
This commit is contained in:
Albert Hopkins 2013-09-01 16:06:08 +00:00
parent 5dec02b5eb
commit 5c52a3d2fa
1 changed files with 7 additions and 7 deletions

View File

@ -136,9 +136,11 @@ ifdef PKGDIR
endif
touch portage
preproot: stage3 mounts portage
preproot: stage3 mounts portage fstab
cp -L /etc/resolv.conf $(CHROOT)/etc/
$(inroot) sed -i 's/root:.*/root::9797:0:::::/' /etc/shadow
cp fstab $(CHROOT)/etc/fstab
echo hostname=\"$(HOSTNAME)\" > $(CHROOT)/etc/conf.d/hostname
touch preproot
stage3-$(ARCH)-latest.tar.bz2:
@ -194,15 +196,13 @@ endif
touch kernel
$(SWAP_FILE): preproot
ifneq ($(SWAP_SIZE),0)
@./echo Creating swap file: $(SWAP_FILE)
dd if=/dev/zero of=$(SWAP_FILE) bs=1M count=$(SWAP_SIZE)
/sbin/mkswap $(SWAP_FILE)
$(CHROOT)/etc/fstab: fstab preproot
cp fstab $(CHROOT)/etc/fstab
$(CHROOT)/etc/conf.d/hostname: preproot
echo hostname=\"$(HOSTNAME)\" > $(CHROOT)/etc/conf.d/hostname
else
sed -i '/swap/d' $(CHROOT)/etc/fstab
endif
sysconfig: preproot acpi.start $(SWAP_FILE) $(CHROOT)/etc/fstab $(CHROOT)/etc/conf.d/hostname
@echo $(VIRTIO)