From c8b7c7fab0050f4b9a23dd1a9c0908fb80e6f1f8 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Wed, 1 Feb 2012 11:37:45 +0100 Subject: [PATCH] [scripts/*beagle*] properly setup openrc cache before finalizing the image --- scripts/mkloopcard_beagleboard_xm_chroot_hook.sh | 14 ++++++++++++++ scripts/mkloopcard_beaglebone_chroot_hook.sh | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh b/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh index e890804..3aea819 100755 --- a/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh +++ b/scripts/mkloopcard_beagleboard_xm_chroot_hook.sh @@ -39,6 +39,19 @@ setup_boot() { rc-update --update } +setup_startup_caches() { + mount -t proc proc /proc + /lib/rc/bin/rc-depend -u + # Generate openrc cache + touch /lib/rc/init.d/softlevel + /etc/init.d/savecache start + /etc/init.d/savecache zap + ldconfig + ldconfig + umount /proc +} + + setup_users() { # setup root password to... root! echo root:root | chpasswd @@ -64,6 +77,7 @@ setup_displaymanager setup_users setup_boot setup_serial +setup_startup_caches exit 0 diff --git a/scripts/mkloopcard_beaglebone_chroot_hook.sh b/scripts/mkloopcard_beaglebone_chroot_hook.sh index dc4a087..b017487 100755 --- a/scripts/mkloopcard_beaglebone_chroot_hook.sh +++ b/scripts/mkloopcard_beaglebone_chroot_hook.sh @@ -31,6 +31,19 @@ setup_users() { ) } +setup_startup_caches() { + mount -t proc proc /proc + /lib/rc/bin/rc-depend -u + # Generate openrc cache + touch /lib/rc/init.d/softlevel + /etc/init.d/savecache start + /etc/init.d/savecache zap + ldconfig + ldconfig + umount /proc +} + + setup_serial() { # Setup serial login echo "s0:12345:respawn:/sbin/agetty 115200 ttyO0 vt100" >> /etc/inittab @@ -39,6 +52,7 @@ setup_serial() { setup_boot setup_users setup_serial +setup_startup_caches exit 0