and more cleanup for some pkg lists etc.
This commit is contained in:
parent
c8637e9779
commit
770293e2d8
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
|
||||||
ln -s /usr/lib/libdialog.so.1.2 /usr/lib/libdialog.so
|
|
||||||
|
|
||||||
echo "Done."
|
|
@ -71,7 +71,7 @@ else
|
|||||||
TGT_ARCH='i686'
|
TGT_ARCH='i686'
|
||||||
fi
|
fi
|
||||||
# Install some stuff we need for the ISO.
|
# Install some stuff we need for the ISO.
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.both | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/iso.pkgs.both | tr '\n' ' ')
|
||||||
if [[ -n "${PKGLIST}" ]];
|
if [[ -n "${PKGLIST}" ]];
|
||||||
then
|
then
|
||||||
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
@ -79,13 +79,23 @@ then
|
|||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
fi
|
fi
|
||||||
# And install arch-specific packages for the ISO, if there are any.
|
# And install arch-specific packages for the ISO, if there are any.
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.${TGT_ARCH} | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/iso.pkgs.arch | tr '\n' ' ')
|
||||||
if [[ -n "${PKGLIST}" ]];
|
if [[ -n "${PKGLIST}" ]];
|
||||||
then
|
then
|
||||||
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
apacman --gendb
|
apacman --gendb
|
||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
fi
|
fi
|
||||||
|
# Do some post tasks before continuing
|
||||||
|
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
||||||
|
ln -s /usr/lib/libdialog.so.1.2 /usr/lib/libdialog.so
|
||||||
|
cleanPacorigs
|
||||||
|
apacman --noconfirm --noedit --skipinteg -S --needed linux
|
||||||
|
apacman --gendb
|
||||||
|
cp -a /boot/vmlinuz-linux /boot/vmlinuz-linux-${DISTNAME}
|
||||||
|
cp -af /boot/initramfs-linux.img /boot/initramfs-linux-${DISTNAME}.img
|
||||||
|
cleanPacorigs
|
||||||
|
|
||||||
# And install EXTRA functionality packages, if there are any.
|
# And install EXTRA functionality packages, if there are any.
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/packages.both | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/packages.both | tr '\n' ' ')
|
||||||
if [[ -n "${PKGLIST}" ]];
|
if [[ -n "${PKGLIST}" ]];
|
||||||
@ -94,3 +104,41 @@ then
|
|||||||
apacman --gendb
|
apacman --gendb
|
||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
fi
|
fi
|
||||||
|
# Add the regular user
|
||||||
|
useradd -m -s /bin/bash -c "Default user" ${REGUSR}
|
||||||
|
usermod -aG users,games,video,audio ${REGUSR}
|
||||||
|
passwd -d ${REGUSR}
|
||||||
|
# Add them to sudoers
|
||||||
|
mkdir -p /etc/sudoers.d
|
||||||
|
chmod 750 /etc/sudoers.d
|
||||||
|
printf "Defaults:${REGUSR} \041lecture\n${REGUSR} ALL=(ALL) ALL\n" >> /etc/sudoers.d/${REGUSR}
|
||||||
|
# Set the password, if we need to.
|
||||||
|
if [[ -n "${REGUSR_PASS}" && "${REGUSR_PASS}" != 'BLANK' ]];
|
||||||
|
then
|
||||||
|
sed -i -e "s|^${REGUSR}::|${REGUSR}:${REGUSR_PASS}:|g" /etc/shadow
|
||||||
|
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
|
||||||
|
then
|
||||||
|
passwd -d ${REGUSR}
|
||||||
|
else
|
||||||
|
usermod -L ${REGUSR}
|
||||||
|
fi
|
||||||
|
# Set the root password, if we need to.
|
||||||
|
if [[ -n "${ROOT_PASS}" && "${ROOT_PASS}" != 'BLANK' ]];
|
||||||
|
then
|
||||||
|
sed -i -e "s|^root::|root:${ROOT_PASS}:|g" /etc/shadow
|
||||||
|
elif [[ "${ROOT_PASS}" == 'BLANK' ]];
|
||||||
|
then
|
||||||
|
passwd -d root
|
||||||
|
else
|
||||||
|
usermod -L root
|
||||||
|
fi
|
||||||
|
cleanPacorigs
|
||||||
|
cp -af /boot/initramfs-linux.img /boot/initramfs-linux-${DISTNAME}.img
|
||||||
|
# And install arch-specific extra packages, if there are any.
|
||||||
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/packages.arch | tr '\n' ' ')
|
||||||
|
if [[ -n "${PKGLIST}" ]];
|
||||||
|
then
|
||||||
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
|
apacman --gendb
|
||||||
|
cleanPacorigs
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user