#!/bin/bash # # Setup our build user and install sudo etc # USER=og adduser ${USER} echo ${USER}:redherring | chpasswd yum -y install epel-release yum -y install sudo banner echo "${USER} ALL = NOPASSWD: ALL" > /etc/sudoers.d/build if [ -e /etc/sysconfig/selinux ]; then sed -i "s/enforcing$/permissive/g" /etc/sysconfig/selinux echo "Run the next step as username: ${USER}" banner "Rebooting" reboot else banner "Continue as ${USER}" #su -c "bash <(curl -s https://dji.retroroms.info/_export/code/og/ipabuild/start?codeblock=1)" -s /bin/bash ${USER} su - ${USER} fi