# HG changeset patch
# User Christophe Lincoln
-*/2 * * * * /usr/bin/cooker +* */2 * * * /usr/bin/cooker ++ +
+ The Cooker environment and deamon can automaticaly started at boot time. You + must have cookutils installed on the host and use standard SliTaz to make it + work properly (cooking goes in /home/slitaz/cooking). The deamon script will + mount virtual filesystems if needed as well as source and packages. Sources + files are in /home/slitaz/src and binded into the chroot so you can share + packages source between several version (stable, cooking, undiguest). To + start the daemon you must have a cron file definition for root in the chroot, + the deamon script work like all other system daemon and can be handled with: +
++# /etc/init.d/cooker [start|stop|restart]diff -r f1c83137e788 -r 9ee293e79359 init.d/cooker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/init.d/cooker Sun May 15 15:21:18 2011 +0200 @@ -0,0 +1,49 @@ +#!/bin/sh +# /etc/init.d/cooker: Start, stop or restart Cooker daemon. +# +. /etc/slitaz/cook.conf + +case "$i" in + start) + # When 4.0: for version in stable cooking undigest + for version in cooking + do + if [ -d "$SLITAZ/$version/chroot" ]; then + echo "Starting $version cooker..." + rootfs=$SLITAZ/$version/chroot + if [ ! -d $rootfs/proc/1 ]; then + mount -t proc proc $rootfs/proc + mount -t sysfs sysfs $rootfs/sys + mount -t devpts devpts $rootfs/dev/pts + mount -t tmpfs shm $rootfs/dev/shm + fi + if [ ! $(mount | grep -q ${roots}$SLITAZ/src) ] + mount -o bind $SLITAZ/src ${rootfs}$SLITAZ/src + mount -o bind $SLITAZ/$version/packages \ + ${rootfs}$SLITAZ/packages + fi + # Start cron in chroot. + chroot $rootfs /etc/init.d/cron start + fi + done ;; + stop) + for version in cooking + do + rootfs=$SLITAZ/$version/chroot + if [ -d "$SLITAZ/$version/chroot" ]; then + echo "Stoping $version cooker..." + # Stop cron in chroot. + chroot $rootfs /etc/init.d/cron stop + for i in /dev/shm /dev/pts /sys /proc $SLITAZ/src $SLITAZ/packages + do + umount ${rootfs}$i + done + fi + done ;; + restart) + $0 stop && sleep 2 && $0 start ;; + *) + echo "Usage: $0 [start|stop|restart]" ;; +esac + +exit 0