Makefile: make changing of root password and removing or portage tree both optional
This commit is contained in:
parent
f9ef73eb07
commit
76be9a9aa0
13
Makefile
13
Makefile
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue