Little enhancement on customization process

Post there if you plan to contribute to this SystemCd
kfgz
Posts: 69
Joined: 02 Mar 2008, 18:00

Little enhancement on customization process

Postby kfgz » 26 Aug 2012, 22:58

Hi,

Since portage is not included and must be downloaded and extracted if someone wants to install other software, I wrote a little script which can speedup this process

Code: Select all

#!/bin/sh
_date=`LC_ALL=C date --date="-2 day" +%Y%m%d`

cd /root

wget -c ftp://ftp.proxad.net/mirrors/ftp.gentoo.org/snapshots/portage-$_date.tar.xz

OUT=$?
if [ $OUT -ne 0 ];then
   echo
   echo "Error while downloading portage."
   exit 1
fi

tar xfJp portage-$_date.tar.xz -C /mnt/custom/customcd/files/usr/

OUT=$?
if [ $OUT -ne 0 ];then
   echo
   echo "Error while unpacking portage."
   exit 1
fi


As you can see mirror is hardcoded.

EDIT:

Two more scripts: prepare chroot and exit chroot

Code: Select all

#!/bin/sh
mkdir -p /mnt/custom/customcd/files/proc
mkdir -p /mnt/custom/customcd/files/dev
mkdir -p /mnt/custom/customcd/files/sys
mount -o bind /proc /mnt/custom/customcd/files/proc
mount -o bind /dev /mnt/custom/customcd/files/dev
mount -o bind /sys /mnt/custom/customcd/files/sys


Code: Select all

#!/bin/sh
umount /mnt/custom/customcd/files/proc
umount /mnt/custom/customcd/files/dev
umount /mnt/custom/customcd/files/sys

Return to “Contributions”

Who is online

Users browsing this forum: No registered users and 1 guest