installer/mk-finalize-system.sh
f4d17450
 #!/bin/bash
 #################################################
 #       Title:  mk-finalize-system              #
 #        Date:  2014-11-26                      #
 #     Version:  1.0                             #
 #      Author:  mbassiouny@vmware.com           #
 #     Options:                                  #
 #################################################
cad80a3b
 #   Overview
 #       Finalize the system after the installation
 #   End
f4d17450
 #
cad80a3b
 set -o errexit      # exit if error...insurance ;
 set -o nounset      # exit if variable not initalized
 set +h          # disable hashall
f4d17450
 source config.inc
cad80a3b
 PRGNAME=${0##*/}    # script name minus the path
 LOGFILE=/var/log/"${PRGNAME}-${LOGFILE}"    #   set log file name
 #LOGFILE=/dev/null      #   uncomment to disable log file
 [ ${EUID} -eq 0 ]   || fail "${PRGNAME}: Need to be root user: FAILURE"
6b3c4668
 
f4d17450
 /sbin/ldconfig
 /usr/sbin/pwconv
 /usr/sbin/grpconv
 /bin/systemd-machine-id-setup
33d03777
 /usr/bin/touch /etc/locale.conf
 /bin/echo "LANG=en_US.UTF-8" > /etc/locale.conf
 
1d82d2ef
 # Importing the pubkey
 rpm --import /etc/pki/rpm-gpg/*
 
c1e53a34
 #locale-gen.sh needs /usr/share/locale/locale.alias which is shipped with
 #  glibc-lang rpm, in some photon installations glibc-lang rpm is not installed
 #  by default. Call localedef directly here to define locale environment.
 /usr/bin/localedef -c -i en_US -f UTF-8 en_US.UTF-8
1ab56d8a
 #/sbin/locale-gen.sh
 
 #TODO: This should be removed, systemd should be able to create this file
 #/usr/bin/touch /var/run/utmp
c1e53a34
 
f4d17450
 exit 0