Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dcbe73c7b | |||
| 3133e4a962 |
@@ -71,7 +71,7 @@ RSYNC_DEST="${BASEDIR}"
|
|||||||
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
|
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
|
||||||
LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
||||||
|
|
||||||
# What should the regular username be? (Automatically logged in on boot)
|
# What should the regular username be? (Can be automatically logged in on boot; see below)
|
||||||
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!
|
||||||
|
|||||||
@@ -2,21 +2,26 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo -n "...Packages installing to ${i}..."
|
|
||||||
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
||||||
|
|
||||||
echo -n "Compiling kernel sources..."
|
echo -n "Compiling kernel sources..."
|
||||||
set +e
|
set +e
|
||||||
## Uncomment below and remove manual ABS/makepkg when https://github.com/oshazard/apacman/issues/2 is fulfulled
|
## Uncomment below and remove manual ABS/makepkg when https://github.com/oshazard/apacman/issues/2 is fulfulled
|
||||||
apacman --noconfirm --noedit -S --needed --noconfirm linux
|
#apacman --noconfirm --noedit -S --needed linux
|
||||||
|
|
||||||
ABSROOT=/tmp
|
export ABSROOT=/tmp
|
||||||
abs core/linux
|
abs core/linux
|
||||||
|
|
||||||
cd /tmp/core/linux
|
cd /tmp/core/linux
|
||||||
customizepkg --modify
|
customizepkg --modify
|
||||||
|
|
||||||
|
chown -R nobody:nobody /tmp/core/linux
|
||||||
sudo -u nobody makepkg
|
sudo -u nobody makepkg
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
for i in $(ls -1 linux-*.pkg.tar.xz | sort);
|
||||||
|
do
|
||||||
|
pacman --noconfirm -U ${i}
|
||||||
|
done
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ function jenny_craig () {
|
|||||||
# sync over new changes and trim out the fat
|
# sync over new changes and trim out the fat
|
||||||
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
|
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
|
||||||
set +e
|
set +e
|
||||||
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime
|
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime > /dev/null 2>&1
|
||||||
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime
|
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime > /dev/null 2>&1
|
||||||
set -e
|
set -e
|
||||||
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
|
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
|
||||||
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
|
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
|
||||||
@@ -45,6 +45,7 @@ function jenny_craig () {
|
|||||||
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/*
|
||||||
rm -rf ${BUILDDIR}/var/cache/pkgfile/*
|
rm -rf ${BUILDDIR}/var/cache/pkgfile/*
|
||||||
|
rm -rf ${BUILDDIR}/var/cache/apacman/pkg/*
|
||||||
rm -rf ${BUILDDIR}/var/lib/pacman/*
|
rm -rf ${BUILDDIR}/var/lib/pacman/*
|
||||||
mkdir -p ${BUILDDIR}/var/lib/pacman/local
|
mkdir -p ${BUILDDIR}/var/lib/pacman/local
|
||||||
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
|
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
|
||||||
@@ -54,6 +55,8 @@ function jenny_craig () {
|
|||||||
rm -rf ${BUILDDIR}/var/abs/*
|
rm -rf ${BUILDDIR}/var/abs/*
|
||||||
rm -rf ${BUILDDIR}/run/*
|
rm -rf ${BUILDDIR}/run/*
|
||||||
rm -rf ${BUILDDIR}/boot/*
|
rm -rf ${BUILDDIR}/boot/*
|
||||||
|
#rm -rf ${BUILDDIR}/root/*
|
||||||
|
rm -rf ${BUILDDIR}/root/post-build.sh
|
||||||
rm -rf ${BUILDDIR}/usr/src/*
|
rm -rf ${BUILDDIR}/usr/src/*
|
||||||
rm -rf ${BUILDDIR}/var/log/*
|
rm -rf ${BUILDDIR}/var/log/*
|
||||||
rm -rf ${BUILDDIR}/.git
|
rm -rf ${BUILDDIR}/.git
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ function mentos {
|
|||||||
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
|
chmod 600 ${CHROOTDIR64}/etc/ssh/*
|
||||||
|
chmod 600 ${CHROOTDIR32}/etc/ssh/*
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ EOF
|
|||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
else
|
else
|
||||||
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
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
|
||||||
@@ -307,6 +307,8 @@ EOF
|
|||||||
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
|
chmod 600 ${CHROOTDIR64}/etc/ssh/*
|
||||||
|
chmod 600 ${CHROOTDIR32}/etc/ssh/*
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user