forked from suse-edge/Factory
106 lines
3.1 KiB
Bash
106 lines
3.1 KiB
Bash
#!/bin/bash
|
|
|
|
test -f /.kconfig && . /.kconfig
|
|
test -f /.profile && . /.profile
|
|
|
|
#======================================
|
|
# Greeting...
|
|
#--------------------------------------
|
|
echo "Configure image: [$kiwi_iname]..."
|
|
|
|
#==========================================
|
|
# setup build day
|
|
#------------------------------------------
|
|
baseSetupBuildDay
|
|
|
|
#======================================
|
|
# Mount system filesystems
|
|
#--------------------------------------
|
|
#baseMount
|
|
|
|
#==========================================
|
|
# remove unneded kernel files
|
|
#------------------------------------------
|
|
suseStripKernel
|
|
baseStripLocales en_US.utf-8 C.utf8
|
|
|
|
#======================================
|
|
# Setup baseproduct link
|
|
#--------------------------------------
|
|
suseSetupProduct
|
|
|
|
#======================================
|
|
# Add missing gpg keys to rpm
|
|
#--------------------------------------
|
|
suseImportBuildKey
|
|
|
|
#======================================
|
|
# Activate services
|
|
#--------------------------------------
|
|
baseInsertService openstack-ironic-python-agent
|
|
baseInsertService suse-ironic-image-setup
|
|
baseInsertService suse-network-setup
|
|
baseInsertService sshd
|
|
baseInsertService NetworkManager
|
|
#suseInsertService sshd
|
|
#suseInsertService openstack-ironic-python-agent
|
|
#suseInsertService suse-ironic-image-setup
|
|
|
|
echo 'DEFAULT_TIMEZONE="UTC"' >> /etc/sysconfig/clock
|
|
baseUpdateSysConfig /etc/sysconfig/clock HWCLOCK "-u"
|
|
baseUpdateSysConfig /etc/sysconfig/clock TIMEZONE UTC
|
|
baseUpdateSysConfig /etc/sysconfig/network/dhcp DHCLIENT_SET_HOSTNAME no
|
|
baseUpdateSysConfig /etc/sysconfig/network/dhcp WRITE_HOSTNAME_TO_HOSTS no
|
|
|
|
#==========================================
|
|
# generate autologin@ service
|
|
# based on getty@ service
|
|
#------------------------------------------
|
|
#sed 's/^ExecStart=.*/\0 --autologin root/' /usr/lib/systemd/system/getty@.service > /etc/systemd/system/autologin\@.service
|
|
sed -E 's/^(ExecStart=.*\/agetty).*(--noclear.*)/\1 \2 --autologin root/' /usr/lib/systemd/system/getty@.service > /etc/systemd/system/autologin\@.service
|
|
|
|
#==========================================
|
|
# add fstab entry for tmpfs based /tmp
|
|
#------------------------------------------
|
|
echo 'tmpfs /tmp tmpfs size=3G 0 0' >> /etc/fstab
|
|
|
|
#==========================================
|
|
# remove package docs and manuals
|
|
#------------------------------------------
|
|
#baseStripDocs
|
|
#baseStripMans
|
|
#baseStripInfos
|
|
|
|
#======================================
|
|
# only basic version of vim is
|
|
# installed; no syntax highlighting
|
|
#--------------------------------------
|
|
sed -i -e's/^syntax on/" syntax on/' /etc/vimrc
|
|
|
|
#======================================
|
|
# Remove yast if not in use
|
|
#--------------------------------------
|
|
#suseRemoveYaST
|
|
|
|
#======================================
|
|
# Remove package manager
|
|
#--------------------------------------
|
|
#suseStripPackager
|
|
|
|
#rm -f usr/lib/perl5/*/*/auto/Encode/??/??.so # 9MB
|
|
|
|
#======================================
|
|
# Umount kernel filesystems
|
|
#--------------------------------------
|
|
#baseCleanMount
|
|
|
|
ln -s /sbin/init /init
|
|
|
|
#==========================================
|
|
# umount
|
|
#------------------------------------------
|
|
umount /proc >/dev/null 2>&1
|
|
|
|
exit 0
|
|
|