Compare commits
22 Commits
v1.00
..
v0.05-ALPHA
| Author | SHA1 | Date | |
|---|---|---|---|
| 799434029f | |||
| f9a3310a0a | |||
| 5d2d7b14c9 | |||
| 4d06a97213 | |||
| 10363febf1 | |||
| 85957d4373 | |||
| ddfdf83463 | |||
| 51473b2403 | |||
| ca15a97fcd | |||
| 9f39e8ed29 | |||
| b6c30b6b6c | |||
| 830f0c9cc9 | |||
| fc5fac0667 | |||
| 15f85a19a4 | |||
| b71931b0b5 | |||
| ba7ad82e8b | |||
| d5d4563399 | |||
| 374906b15b | |||
| 998484d315 | |||
| 307f1e836f | |||
| 51fad1aced | |||
| 1d8692b8e6 |
@@ -75,8 +75,7 @@ LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
|||||||
REGUSR="${UXNAME}"
|
REGUSR="${UXNAME}"
|
||||||
|
|
||||||
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
||||||
# If you wish to have a blank password, use the string '{[BLANK]}'.
|
# If you wish to have a blank password, use the string "{[BLANK]}".
|
||||||
# You MUST USE SINGLE-QUOTES, OR ESCAPE SHELL-EXPANDED CHARACTERS (e.g. $,*,etc.)
|
|
||||||
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
|
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string
|
||||||
# in a shadow-compatible format.
|
# in a shadow-compatible format.
|
||||||
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
|
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
|
||||||
@@ -100,11 +99,11 @@ REGUSR="${UXNAME}"
|
|||||||
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
|
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
|
||||||
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
|
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
|
||||||
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
|
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
|
||||||
REGUSR_PASS=''
|
REGUSR_PASS=""
|
||||||
|
|
||||||
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
|
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
|
||||||
# specified, password login will be disabled, etc.).
|
# specified, password login will be disabled, etc.).
|
||||||
ROOT_PASS=''
|
ROOT_PASS=""
|
||||||
|
|
||||||
# Do we have enough horsepower on the build system to jack up the resources we throw at building?
|
# Do we have enough horsepower on the build system to jack up the resources we throw at building?
|
||||||
# Enabling this will give absolute CPU preference to building the kernels and do make-time
|
# Enabling this will give absolute CPU preference to building the kernels and do make-time
|
||||||
|
|||||||
+2
-2
@@ -157,7 +157,7 @@ lsscsi
|
|||||||
lxde
|
lxde
|
||||||
lynx
|
lynx
|
||||||
lz4
|
lz4
|
||||||
#lzip
|
lzip
|
||||||
lzo
|
lzo
|
||||||
lzop
|
lzop
|
||||||
macchanger
|
macchanger
|
||||||
@@ -193,7 +193,7 @@ nettle
|
|||||||
networkmanager
|
networkmanager
|
||||||
nginx-devel
|
nginx-devel
|
||||||
ngrep
|
ngrep
|
||||||
nmap
|
nmap-nogui
|
||||||
nmon
|
nmon
|
||||||
ntfs-3g
|
ntfs-3g
|
||||||
ntfsfixboot
|
ntfsfixboot
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ function jenny_craig () {
|
|||||||
# DISABLE when no longer building custom kernel
|
# DISABLE when no longer building custom kernel
|
||||||
find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \;
|
find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \;
|
||||||
find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \;
|
find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \;
|
||||||
sed -i -e '/^MAKEFLAGS=.*$/d' ${BUILDDIR}/etc/makepkg.conf
|
|
||||||
rm -rf ${BUILDDIR}/usr/share/locale/*
|
rm -rf ${BUILDDIR}/usr/share/locale/*
|
||||||
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
|
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
|
||||||
rm -rf ${BUILDDIR}/var/cache/pacman/*
|
rm -rf ${BUILDDIR}/var/cache/pacman/*
|
||||||
|
|||||||
+16
-23
@@ -182,15 +182,6 @@ EOF
|
|||||||
${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# And let's do some more optimization.
|
|
||||||
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
|
||||||
then
|
|
||||||
CPUCNT=$(grep processor /proc/cpuinfo | wc -l)
|
|
||||||
((CPUCNT++))
|
|
||||||
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR64}/etc/makepkg.conf
|
|
||||||
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# preprocessing
|
# preprocessing
|
||||||
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
||||||
# both
|
# both
|
||||||
@@ -199,11 +190,11 @@ EOF
|
|||||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||||
do
|
do
|
||||||
echo -n "...Packages installing to ${i}..."
|
echo -n "...Packages installing to ${i}..."
|
||||||
${CHROOTCMD} ${i}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm customizepkg-scripting" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm customizepkg-scripting" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
echo -n "Compiling kernel sources..."
|
echo -n "Compiling kernel sources..."
|
||||||
set +e
|
set +e
|
||||||
${CHROOTCMD} ${i}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
set -e
|
set -e
|
||||||
# Uncomment if you wish to use the mkpasswd binary from within the chroot...
|
# Uncomment if you wish to use the mkpasswd binary from within the chroot...
|
||||||
#${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
@@ -212,7 +203,6 @@ EOF
|
|||||||
set +e
|
set +e
|
||||||
${CHROOTCMD} ${i}/ bash -c "yes '' | yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "yes '' | yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
# User creation
|
|
||||||
set -e
|
set -e
|
||||||
echo -n "...Creating ${REGUSR} user..."
|
echo -n "...Creating ${REGUSR} user..."
|
||||||
${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
@@ -222,23 +212,21 @@ EOF
|
|||||||
echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR}
|
echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR}
|
||||||
if [ -n "${REGUSR_PASS}" ];
|
if [ -n "${REGUSR_PASS}" ];
|
||||||
then
|
then
|
||||||
#${CHROOTCMD} ${i}/ "/usr/bin/echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ "echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
sed -i -e "s|^${REGUSR}::|${REGUSR}:${REGUSR_PASS}:|g" ${i}/etc/shadow
|
|
||||||
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
|
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
continue
|
||||||
else
|
else
|
||||||
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
sed -i -e "s/^${REGUSR}::/${REGUSR}:!:/g" ${i}/etc/shadow
|
||||||
fi
|
fi
|
||||||
if [ -n "${ROOT_PASS}" ];
|
if [ -n "${ROOT_PASS}" ];
|
||||||
then
|
then
|
||||||
#${CHROOTCMD} ${i}/ "/usr/bin/echo root:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ "echo ${root}:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
sed -i -e "s|^root::|root:${ROOT_PASS}:|g" ${i}/etc/shadow
|
|
||||||
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
|
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
continue
|
||||||
else
|
else
|
||||||
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
sed -i -e 's/^root::/root:!:/g' ${i}/etc/shadow
|
||||||
fi
|
fi
|
||||||
# The following is supposed to do the same as the above, but "cleaner". However, it currently fails with "execv() failed: No such file or directory"
|
# The following is supposed to do the same as the above, but "cleaner". However, it currently fails with "execv() failed: No such file or directory"
|
||||||
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
@@ -247,7 +235,8 @@ EOF
|
|||||||
|
|
||||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||||
do
|
do
|
||||||
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
echo "[DEBUG] ${i}: mkinitcpio" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
${CHROOTCMD} ${i}/ bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
# 32-bit
|
# 32-bit
|
||||||
@@ -255,10 +244,12 @@ EOF
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
echo "[DEBUG] 32-bit: installing packages" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
|
echo "[DEBUG] 32-bit: pacorig move" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
set -e
|
set -e
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
@@ -267,10 +258,12 @@ EOF
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
echo "[DEBUG] 64-bit: installing packages" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
${CHROOTCMD} ${CHROOTDIR64}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
|
echo "[DEBUG] 64-bit: pacorig move" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
set -e
|
set -e
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user