Modify profile for builder mode

Changing patch for /etc/init.d/root to profile.
master
parent 8947e7200b
commit f513727833

@ -3,6 +3,7 @@ CHANGE LOG
1.2.12
* Настройка eix-sync скопирована в профиль ISO.
* Изменен диапазон версий для патча kdelibs.
* Добавлен профиль /etc/init.d/root для режима Builder, удален его патч.
1.2.11
* Добавлен режим загрузки Builder для liveCD CDS.

@ -0,0 +1,27 @@
#!/sbin/runscript
#-title-#
description="Mount the root fs read/write"
depend()
{
need fsck
keyword nojail noopenvz noprefix novserver
}
start()
{
if echo 2>/dev/null >/.test.$$; then
rm -f /.test.$$ /fastboot /forcefsck
return 0
fi
ebegin "Remounting root filesystem read/write"
case "${RC_UNAME}" in
Linux) mount -n -o remount,rw /;;
*) mount -u -o rw /;;
esac
if eend $? "Root filesystem could not be mounted read/write"; then
rm -f /fastboot /forcefsck
fi
}

@ -1,27 +0,0 @@
--- root.orig
+++ root
@@ -19,7 +19,23 @@ start()
ebegin "Remounting root filesystem read/write"
case "${RC_UNAME}" in
- Linux) mount -n -o remount,rw /;;
+ Linux) SCRATCH_ROOT=`sed -nr 's/(\S+)\s+\/newroot\s+.*/\1/p' /proc/mounts`
+ if [ "$SCRATCH_ROOT" -a "${SCRATCH_ROOT}" != "tmpfs" ];
+ then
+ mount -n $SCRATCH_ROOT /mnt/scratch
+ if [[ -n `cat /proc/mounts | grep "none / aufs"` ]];
+ then
+ mount -n -t aufs -o remount,rw none /
+ mount -n -t aufs -o remount,rw none /mnt/builder
+ else
+ mount -n -t unionfs -o remount,dirs=/mnt/scratch/workspace=rw:/mnt/scratch/delta=ro:/mnt/scratch/calculate=ro unionfs /
+ mount -n -t unionfs -o remount,dirs=/mnt/scratch/delta=rw:/mnt/scratch/calculate=ro unionfs /mnt/builder
+ fi
+ mount -o loop -t squashfs /mnt/scratch/livecd.squashfs /mnt/scratch/calculate
+ else
+ mount -n -o remount,rw /
+ fi
+ ;;
*) mount -u -o rw /;;
esac
if eend $? "Root filesystem could not be mounted read/write"; then
Loading…
Cancel
Save