[scripts] mkloopcard: add local.d script for setting up openrc at first boot
This commit is contained in:
parent
c7efe90982
commit
48b9252b28
12
boot/arm_startup/00-board-setup.start
Normal file
12
boot/arm_startup/00-board-setup.start
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# The first boot is actually a reboot, to let openrc realize that
|
||||||
|
# clock is screwed. This fixes xdm startup.
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Hello, this is the first boot. System is being configured"
|
||||||
|
echo "A reboot will happen shortly. Thanks"
|
||||||
|
echo
|
||||||
|
rc-update --update
|
||||||
|
|
||||||
|
# kill myself
|
||||||
|
rm -f /etc/local.d/00-board-setup.start
|
@ -140,6 +140,16 @@ mount "${ext_part}" "${tmp_dir}"
|
|||||||
rsync -a -H -A -X --delete-during "${CHROOT_DIR}"/ "${tmp_dir}"/ --exclude "/proc/*" --exclude "/sys/*" \
|
rsync -a -H -A -X --delete-during "${CHROOT_DIR}"/ "${tmp_dir}"/ --exclude "/proc/*" --exclude "/sys/*" \
|
||||||
--exclude "/dev/pts/*" --exclude "/dev/shm/*" || exit 1
|
--exclude "/dev/pts/*" --exclude "/dev/shm/*" || exit 1
|
||||||
|
|
||||||
|
# Configure 00-board-setup.start
|
||||||
|
source_board_setup="/sabayon/boot/arm_startup/00-board-setup.start"
|
||||||
|
dest_board_setup="${CHROOT_DIR}/etc/local.d/00-board-setup.start"
|
||||||
|
if [ -f "${source_board_setup}" ]; then
|
||||||
|
echo "Setting up ${dest_board_setup}"
|
||||||
|
cp "${source_board_setup}" "${dest_board_setup}" || exit 1
|
||||||
|
chmod 755 "${dest_board_setup}" || exit 1
|
||||||
|
chown root:root "${dest_board_setup}" || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# execute PACKAGES_TO_ADD and PACKAGES_TO_REMOVE
|
# execute PACKAGES_TO_ADD and PACKAGES_TO_REMOVE
|
||||||
export ETP_NONINTERACTIVE=1
|
export ETP_NONINTERACTIVE=1
|
||||||
# Entropy doesn't like non-UTF locale encodings
|
# Entropy doesn't like non-UTF locale encodings
|
||||||
|
Loading…
Reference in New Issue
Block a user