Lines 85-90
Link Here
|
85 |
|
85 |
|
86 |
} |
86 |
} |
87 |
|
87 |
|
|
|
88 |
exec_in_chroot() { |
89 |
# Takes the full path to the source file as its arguement |
90 |
# copies the file to the /tmp directory of the chroot |
91 |
# and executes it. |
92 |
|
93 |
local file_name=$(basename ${1}) |
94 |
cp -a ${1} ${clst_chroot_path}/tmp |
95 |
chmod 755 ${clst_chroot_path}/tmp/${file_name} |
96 |
echo "Running ${file_name} in chroot" |
97 |
${clst_CHROOT} ${clst_chroot_path} /tmp/${file_name} || exit 1 |
98 |
rm -f ${clst_chroot_path}/tmp/${file_name} |
99 |
} |
100 |
|
88 |
## START RUNSCRIPT |
101 |
## START RUNSCRIPT |
89 |
|
102 |
|
90 |
case $1 in |
103 |
case $1 in |
Lines 94-105
Link Here
|
94 |
shift |
107 |
shift |
95 |
|
108 |
|
96 |
# setup genkernel and do any pre-kernel merge opts |
109 |
# setup genkernel and do any pre-kernel merge opts |
97 |
cp -a ${clst_sharedir}/livecd/runscript-support/pre-kmerge.sh ${clst_chroot_path}/tmp |
110 |
exec_in_chroot ${clst_sharedir}/livecd/runscript-support/pre-kmerge.sh |
98 |
${clst_CHROOT} ${clst_chroot_path} /tmp/pre-kmerge.sh || exit 1 |
|
|
99 |
rm -f ${clst_chroot_path}/tmp/pre-kmerge.sh |
100 |
|
111 |
|
101 |
# the kernel merge process is done in a chroot |
112 |
# the kernel merge process is done in a chroot |
102 |
cp -a ${clst_sharedir}/livecd/runscript-support/kmerge.sh ${clst_chroot_path}/tmp |
|
|
103 |
count=0 |
113 |
count=0 |
104 |
while [ ${count} -lt ${numkernels} ] |
114 |
while [ ${count} -lt ${numkernels} ] |
105 |
do |
115 |
do |
Lines 109-123
Link Here
|
109 |
shift |
119 |
shift |
110 |
export clst_kextversion="$1" |
120 |
export clst_kextversion="$1" |
111 |
shift |
121 |
shift |
112 |
${clst_CHROOT} ${clst_chroot_path} /tmp/kmerge.sh || exit 1 |
122 |
exec_in_chroot ${clst_sharedir}/livecd/runscript-support/kmerge.sh |
113 |
count=$(( ${count} + 1 )) |
123 |
count=$(( ${count} + 1 )) |
114 |
done |
124 |
done |
115 |
rm -f ${clst_chroot_path}/tmp/kmerge.sh |
|
|
116 |
|
125 |
|
117 |
# clean up genkernel and do any post-kernel merge opts |
126 |
# clean up genkernel and do any post-kernel merge opts |
118 |
cp -a ${clst_sharedir}/livecd/runscript-support/post-kmerge.sh ${clst_chroot_path}/tmp |
127 |
exec_in_chroot ${clst_sharedir}/livecd/runscript-support/post-kmerge.sh |
119 |
${clst_CHROOT} ${clst_chroot_path} /tmp/post-kmerge.sh || exit 1 |
|
|
120 |
rm -f ${clst_chroot_path}/tmp/post-kmerge.sh |
121 |
;; |
128 |
;; |
122 |
|
129 |
|
123 |
preclean) |
130 |
preclean) |
Lines 154-178
Link Here
|
154 |
fi |
161 |
fi |
155 |
|
162 |
|
156 |
# now, finalize and tweak the livecd fs (inside of the chroot) |
163 |
# now, finalize and tweak the livecd fs (inside of the chroot) |
157 |
cp ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh ${clst_chroot_path}/tmp |
164 |
exec_in_chroot ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh |
158 |
${clst_CHROOT} ${clst_chroot_path} /tmp/livecdfs-update.sh || exit 1 |
|
|
159 |
rm -f ${clst_chroot_path}/tmp/livecdfs-update.sh |
160 |
|
165 |
|
161 |
# execute gamecdfs-update.sh if we're a gamecd |
166 |
# execute gamecdfs-update.sh if we're a gamecd |
162 |
if [ "${clst_livecd_type}" = "gentoo-gamecd" ] |
167 |
if [ "${clst_livecd_type}" = "gentoo-gamecd" ] |
163 |
then |
168 |
then |
164 |
cp ${clst_sharedir}/livecd/runscript-support/gamecdfs-update.sh ${clst_chroot_path}/tmp |
169 |
exec_in_chroot ${clst_sharedir}/livecd/runscript-support/gamecdfs-update.sh |
165 |
${clst_CHROOT} ${clst_chroot_path} /tmp/gamecdfs-update.sh || exit 1 |
|
|
166 |
rm -f ${clst_chroot_path}/tmp/gamecdfs-update.sh |
167 |
fi |
170 |
fi |
168 |
|
171 |
|
169 |
# if the user has their own fs update script, execute it |
172 |
# if the user has their own fs update script, execute it |
170 |
if [ -n "${clst_livecd_fsscript}" ] |
173 |
if [ -n "${clst_livecd_fsscript}" ] |
171 |
then |
174 |
then |
172 |
cp ${clst_livecd_fsscript} ${clst_chroot_path}/tmp/fsscript.sh |
175 |
exec_in_chroot ${clst_livecd_fsscript} |
173 |
chmod 755 ${clst_chroot_path}/tmp/fsscript.sh |
|
|
174 |
${clst_CHROOT} ${clst_chroot_path} /tmp/fsscript.sh || exit 1 |
175 |
rm -f ${clst_chroot_path}/tmp/fsscript.sh |
176 |
fi |
176 |
fi |
177 |
;; |
177 |
;; |