Makefile: make changing of root password and removing or portage tree both optional

This commit is contained in:
Albert Hopkins 2010-12-19 23:04:11 -05:00
parent f9ef73eb07
commit 76be9a9aa0
1 changed files with 11 additions and 2 deletions

View File

@ -13,6 +13,8 @@ SWAP_FILE = $(CHROOT)/.swap
ARCH = amd64
MAKEOPTS = -j4
PRUNE_CRITICAL = NO
REMOVE_PORTAGE_TREE = YES
CHANGE_PASSWORD = YES
HEADLESS = NO
ACCEPT_KEYWORDS = amd64
@ -45,6 +47,14 @@ else
COPY_LOOP = rsync -ax --exclude-from=rsync-excludes gentoo/ loop/
endif
ifeq ($(CHANGE_PASSWORD),YES)
change_password = chroot $(CHROOT) passwd -d root; chroot $(CHROOT) passwd -e root
endif
ifeq ($(REMOVE_PORTAGE_TREE),YES)
COPY_LOOP += --exclude=usr/portage
endif
ifeq ($(VIRTIO),YES)
VIRTIO_FSTAB = sed -i 's/sda/vda/' $(CHROOT)/etc/fstab
VIRTIO_GRUB = sed -i 's/sda/vda/' $(CHROOT)/boot/grub/grub.conf
@ -193,8 +203,7 @@ software: systools issue etc-update.conf $(CRITICAL) $(WORLD)
$(gcc_config)
chroot $(CHROOT) etc-update
$(MAKE) -C $(APPLIANCE) postinstall
chroot $(CHROOT) passwd -d root
chroot $(CHROOT) passwd -e root
$(change_password)
$(UNMERGE_CRITICAL)
touch software