Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH 6/6] Make shdir a complete path to ease it's use.
Date: Thu, 11 Sep 2014 04:01:25
Message-Id: 1410408068-3441-7-git-send-email-dolsen@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 0/6] Various changes towards 3.0 branch by Brian Dolbec
1 Add a "shdir" setting to config.
2 This is to make moving the bash code around easier.
3 It also reduces more hardcoded paths in the bash scripts.
4 Migrate all target shell scripts to use the new shdir setting
5 ---
6 etc/catalyst.conf | 8 ++++++--
7 targets/embedded/embedded-controller.sh | 22 ++++++++++-----------
8 targets/grp/grp-controller.sh | 6 +++---
9 targets/livecd-stage1/livecd-stage1-controller.sh | 4 ++--
10 targets/livecd-stage2/livecd-stage2-controller.sh | 22 ++++++++++-----------
11 targets/netboot/netboot-combine.sh | 6 +++---
12 targets/netboot/netboot-controller.sh | 24 +++++++++++------------
13 targets/netboot2/netboot2-controller.sh | 16 +++++++--------
14 targets/stage1/stage1-controller.sh | 8 ++++----
15 targets/stage2/stage2-controller.sh | 6 +++---
16 targets/stage3/stage3-controller.sh | 6 +++---
17 targets/stage4/stage4-controller.sh | 22 ++++++++++-----------
18 targets/support/bootloader-setup.sh | 6 +++---
19 targets/support/create-iso.sh | 4 ++--
20 targets/support/functions.sh | 2 +-
21 targets/support/netboot2-final.sh | 4 ++--
22 targets/support/target_image_setup.sh | 4 ++--
23 targets/tinderbox/tinderbox-controller.sh | 6 +++---
24 18 files changed, 90 insertions(+), 86 deletions(-)
25
26 diff --git a/etc/catalyst.conf b/etc/catalyst.conf
27 index 2d377b2..d52a5c8 100644
28 --- a/etc/catalyst.conf
29 +++ b/etc/catalyst.conf
30 @@ -73,10 +73,14 @@ options="autoresume bindist kerncache pkgcache seedcache snapcache"
31 # portdir specifies the source portage tree used by the snapshot target.
32 portdir="/usr/portage"
33
34 -# sharedir specifies where all of the catalyst runtime executables are. Most
35 -# users do not need to change this.
36 +# sharedir specifies where all of the catalyst runtime executables
37 +# and other shared lib objects are.
38 +# Most users do not need to change this.
39 sharedir="/usr/lib/catalyst"
40
41 +# shdir specifies where all of the catalyst runtime executables are.
42 +shdir="%(sharedir)s/targets"
43 +
44 # snapshot_cache specifies where the snapshots will be cached to if snapcache is
45 # enabled in the options.
46 snapshot_cache="/var/tmp/catalyst/snapshot_cache"
47 diff --git a/targets/embedded/embedded-controller.sh b/targets/embedded/embedded-controller.sh
48 index 2a0c5fe..c0b62ea 100755
49 --- a/targets/embedded/embedded-controller.sh
50 +++ b/targets/embedded/embedded-controller.sh
51 @@ -1,7 +1,7 @@
52 #!/bin/bash
53
54 -source ${clst_sharedir}/targets/support/functions.sh
55 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
56 +source ${clst_shdir}/support/functions.sh
57 +source ${clst_shdir}/support/filesystem-functions.sh
58
59 case ${1} in
60 enter)
61 @@ -11,7 +11,7 @@ case ${1} in
62 shift
63 export clst_packages="$*"
64 exec_in_chroot \
65 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
66 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
67 ;;
68
69 preclean)
70 @@ -21,7 +21,7 @@ case ${1} in
71 # export root_fs_path="${clst_chroot_path}/tmp/mergeroot"
72 # install -d ${clst_image_path}
73
74 -# ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh \
75 +# ${clst_shdir}/embedded/embedded-fs-runscript.sh \
76 # ${clst_embedded_fs_type} || exit 1
77 # imagesize=`du -sk ${clst_image_path}/root.img | cut -f1`
78 # echo "Created ${clst_embedded_fs_type} image at \
79 @@ -31,12 +31,12 @@ case ${1} in
80
81 pre-kmerge)
82 # Sets up the build environment before any kernels are compiled
83 - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
84 + exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
85 ;;
86
87 post-kmerge)
88 # Cleans up the build environment after the kernels are compiled
89 - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
90 + exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
91 ;;
92
93 kernel)
94 @@ -47,18 +47,18 @@ case ${1} in
95 then
96 cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
97 fi
98 - exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
99 + exec_in_chroot ${clst_shdir}/support/kmerge.sh
100 delete_from_chroot tmp/linuxrc
101 ;;
102
103 target_image_setup)
104 shift
105 - ${clst_sharedir}/targets/support/target_image_setup.sh ${1}
106 + ${clst_shdir}/support/target_image_setup.sh ${1}
107
108 ;;
109 livecd-update)
110 # Now, finalize and tweak the livecd fs (inside of the chroot)
111 - exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
112 + exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
113 ;;
114
115 bootloader)
116 @@ -66,12 +66,12 @@ case ${1} in
117 # Here is where we poke in our identifier
118 touch ${1}/livecd
119
120 - ${clst_sharedir}/targets/support/bootloader-setup.sh ${1}
121 + ${clst_shdir}/support/bootloader-setup.sh ${1}
122 ;;
123
124 iso)
125 shift
126 - ${clst_sharedir}/targets/support/create-iso.sh ${1}
127 + ${clst_shdir}/support/create-iso.sh ${1}
128 ;;
129
130 clean)
131 diff --git a/targets/grp/grp-controller.sh b/targets/grp/grp-controller.sh
132 index 541429a..0f1a5b5 100755
133 --- a/targets/grp/grp-controller.sh
134 +++ b/targets/grp/grp-controller.sh
135 @@ -1,6 +1,6 @@
136 #!/bin/bash
137
138 -source ${clst_sharedir}/targets/support/functions.sh
139 +source ${clst_shdir}/support/functions.sh
140
141 case $1 in
142 enter)
143 @@ -15,11 +15,11 @@ case $1 in
144 shift
145
146 export clst_grp_packages="$*"
147 - exec_in_chroot ${clst_sharedir}/targets/grp/grp-chroot.sh
148 + exec_in_chroot ${clst_shdir}/grp/grp-chroot.sh
149 ;;
150
151 preclean)
152 - exec_in_chroot ${clst_sharedir}/targets/grp/grp-preclean-chroot.sh
153 + exec_in_chroot ${clst_shdir}/grp/grp-preclean-chroot.sh
154 ;;
155
156 clean)
157 diff --git a/targets/livecd-stage1/livecd-stage1-controller.sh b/targets/livecd-stage1/livecd-stage1-controller.sh
158 index f3b1f40..19b8dd1 100755
159 --- a/targets/livecd-stage1/livecd-stage1-controller.sh
160 +++ b/targets/livecd-stage1/livecd-stage1-controller.sh
161 @@ -1,5 +1,5 @@
162
163 -source ${clst_sharedir}/targets/support/functions.sh
164 +source ${clst_shdir}/support/functions.sh
165
166 ## START RUNSCRIPT
167
168 @@ -9,7 +9,7 @@ case $1 in
169 export clst_packages="$*"
170 mkdir -p ${clst_chroot_path}/usr/livecd ${clst_chroot_path}/tmp
171 exec_in_chroot \
172 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
173 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
174 echo "${clst_packages}" > ${clst_chroot_path}/tmp/packages.txt
175 ;;
176
177 diff --git a/targets/livecd-stage2/livecd-stage2-controller.sh b/targets/livecd-stage2/livecd-stage2-controller.sh
178 index 57dcff7..a98cb47 100755
179 --- a/targets/livecd-stage2/livecd-stage2-controller.sh
180 +++ b/targets/livecd-stage2/livecd-stage2-controller.sh
181 @@ -1,16 +1,16 @@
182
183 -source ${clst_sharedir}/targets/support/functions.sh
184 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
185 +source ${clst_shdir}/support/functions.sh
186 +source ${clst_shdir}/support/filesystem-functions.sh
187
188 case $1 in
189 pre-kmerge)
190 # Sets up the build environment before any kernels are compiled
191 - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
192 + exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
193 ;;
194
195 post-kmerge)
196 # Cleans up the build environment after the kernels are compiled
197 - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
198 + exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
199 ;;
200
201 kernel)
202 @@ -22,7 +22,7 @@ case $1 in
203 then
204 cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
205 fi
206 - exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
207 + exec_in_chroot ${clst_shdir}/support/kmerge.sh
208 delete_from_chroot tmp/linuxrc
209
210 extract_modules ${clst_chroot_path} ${clst_kname}
211 @@ -79,7 +79,7 @@ case $1 in
212
213 livecd-update)
214 # Now, finalize and tweak the livecd fs (inside of the chroot)
215 - exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
216 + exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
217
218 # Move over the xinitrc (if applicable)
219 # This is moved here, so we can override any default xinitrc
220 @@ -92,7 +92,7 @@ case $1 in
221 ;;
222
223 rc-update)
224 - exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
225 + exec_in_chroot ${clst_shdir}/support/rc-update.sh
226 ;;
227
228 fsscript)
229 @@ -182,23 +182,23 @@ case $1 in
230 ;;
231 esac
232
233 - ${clst_sharedir}/targets/support/bootloader-setup.sh $1
234 + ${clst_shdir}/support/bootloader-setup.sh $1
235 ;;
236
237 unmerge)
238 shift
239 export clst_packages="$*"
240 - exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
241 + exec_in_chroot ${clst_shdir}/support/unmerge.sh
242 ;;
243
244 target_image_setup)
245 shift
246 - ${clst_sharedir}/targets/support/target_image_setup.sh $1
247 + ${clst_shdir}/support/target_image_setup.sh $1
248 ;;
249
250 iso)
251 shift
252 - ${clst_sharedir}/targets/support/create-iso.sh $1
253 + ${clst_shdir}/support/create-iso.sh $1
254 ;;
255 esac
256 exit $?
257 diff --git a/targets/netboot/netboot-combine.sh b/targets/netboot/netboot-combine.sh
258 index e4294ca..d5312fb 100755
259 --- a/targets/netboot/netboot-combine.sh
260 +++ b/targets/netboot/netboot-combine.sh
261 @@ -1,8 +1,8 @@
262 #!/bin/bash
263
264 -source ${clst_sharedir}/targets/support/chroot-functions.sh
265 -source ${clst_sharedir}/targets/support/functions.sh
266 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
267 +source ${clst_shdir}/support/chroot-functions.sh
268 +source ${clst_shdir}/support/functions.sh
269 +source ${clst_shdir}/support/filesystem-functions.sh
270
271 update_env_settings
272
273 diff --git a/targets/netboot/netboot-controller.sh b/targets/netboot/netboot-controller.sh
274 index edf1f21..93feb26 100755
275 --- a/targets/netboot/netboot-controller.sh
276 +++ b/targets/netboot/netboot-controller.sh
277 @@ -1,7 +1,7 @@
278 #!/bin/bash
279
280 -source ${clst_sharedir}/targets/support/functions.sh
281 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
282 +source ${clst_shdir}/support/functions.sh
283 +source ${clst_shdir}/support/filesystem-functions.sh
284
285
286 case ${1} in
287 @@ -11,7 +11,7 @@ case ${1} in
288 clst_root_path="/" \
289 clst_packages="$*" \
290 exec_in_chroot \
291 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
292 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
293 ;;
294
295 busybox)
296 @@ -30,26 +30,26 @@ case ${1} in
297 clst_myemergeopts="${clst_myemergeopts} -O" \
298 clst_packages="busybox" \
299 exec_in_chroot \
300 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
301 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
302 ;;
303
304 pre-kmerge)
305 # Sets up the build environment before any kernels are compiled
306 - #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
307 + #exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
308 ;;
309
310 post-kmerge)
311 # Cleans up the build environment after the kernels are compiled
312 - #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
313 + #exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
314 ;;
315
316 kernel)
317 shift
318 export clst_kname="$1"
319 export clst_root_path="/"
320 - #exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
321 - #exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
322 - #exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
323 + #exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
324 + #exec_in_chroot ${clst_shdir}/support/kmerge.sh
325 + #exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
326 #extract_kernels kernels
327 ;;
328
329 @@ -61,15 +61,15 @@ case ${1} in
330 clst_myemergeopts="${clst_myemergeopts} --nodeps" \
331 clst_packages="netboot-base" \
332 exec_in_chroot \
333 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
334 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
335
336 clst_files="${@}" \
337 exec_in_chroot \
338 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh
339 + ${clst_shdir}/${clst_target}/${clst_target}-image.sh
340 ;;
341
342 finish)
343 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-combine.sh
344 + ${clst_shdir}/${clst_target}/${clst_target}-combine.sh
345 ;;
346
347 clean)
348 diff --git a/targets/netboot2/netboot2-controller.sh b/targets/netboot2/netboot2-controller.sh
349 index 2ffcb0d..be5f91d 100755
350 --- a/targets/netboot2/netboot2-controller.sh
351 +++ b/targets/netboot2/netboot2-controller.sh
352 @@ -1,7 +1,7 @@
353 #!/bin/bash
354
355 -source ${clst_sharedir}/targets/support/functions.sh
356 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
357 +source ${clst_shdir}/support/functions.sh
358 +source ${clst_shdir}/support/filesystem-functions.sh
359
360 case ${1} in
361 build_packages)
362 @@ -10,17 +10,17 @@ case ${1} in
363 clst_root_path="/" \
364 clst_packages="$*" \
365 exec_in_chroot \
366 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-pkg.sh
367 + ${clst_shdir}/${clst_target}/${clst_target}-pkg.sh
368 ;;
369
370 pre-kmerge)
371 # Sets up the build environment before any kernels are compiled
372 - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
373 + exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
374 ;;
375
376 post-kmerge)
377 # Cleans up the build environment after the kernels are compiled
378 - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
379 + exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
380 ;;
381
382 kernel)
383 @@ -37,7 +37,7 @@ case ${1} in
384 cp ${clst_busybox_config} ${clst_chroot_path}/tmp/busy-config
385 fi
386
387 - exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
388 + exec_in_chroot ${clst_shdir}/support/kmerge.sh
389
390 delete_from_chroot tmp/linuxrc
391 delete_from_chroot tmp/busy-config
392 @@ -56,13 +56,13 @@ case ${1} in
393 # Copy remaining files over to the initramfs target
394 clst_files="${@}" \
395 exec_in_chroot \
396 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-copyfile.sh
397 + ${clst_shdir}/${clst_target}/${clst_target}-copyfile.sh
398 ;;
399
400 final)
401 # For each arch, fetch the kernel images and put them in builds/
402 echo -e ">>> Copying completed kernels to ${clst_target_path} ..."
403 - ${clst_sharedir}/targets/support/netboot2-final.sh
404 + ${clst_shdir}/support/netboot2-final.sh
405 ;;
406
407 clean)
408 diff --git a/targets/stage1/stage1-controller.sh b/targets/stage1/stage1-controller.sh
409 index d029545..09a121d 100755
410 --- a/targets/stage1/stage1-controller.sh
411 +++ b/targets/stage1/stage1-controller.sh
412 @@ -1,13 +1,13 @@
413 #!/bin/bash
414
415 -source ${clst_sharedir}/targets/support/functions.sh
416 +source ${clst_shdir}/support/functions.sh
417
418 case $1 in
419 enter)
420 ;;
421
422 run)
423 - cp ${clst_sharedir}/targets/stage1/build.py ${clst_chroot_path}/tmp
424 + cp ${clst_shdir}/stage1/build.py ${clst_chroot_path}/tmp
425
426 # Setup "ROOT in chroot" dir
427 install -d ${clst_chroot_path}${clst_root_path}/etc
428 @@ -18,12 +18,12 @@ case $1 in
429
430 # Enter chroot, execute our build script
431 exec_in_chroot \
432 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh \
433 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh \
434 || exit 1
435 ;;
436
437 preclean)
438 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh || exit 1
439 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh || exit 1
440 ;;
441
442 clean)
443 diff --git a/targets/stage2/stage2-controller.sh b/targets/stage2/stage2-controller.sh
444 index 69ba7c9..25e5120 100755
445 --- a/targets/stage2/stage2-controller.sh
446 +++ b/targets/stage2/stage2-controller.sh
447 @@ -1,6 +1,6 @@
448 #!/bin/bash
449
450 -source ${clst_sharedir}/targets/support/functions.sh
451 +source ${clst_shdir}/support/functions.sh
452
453 # Only put commands in this section that you want every target to execute.
454 # This is a global default file and will affect every target
455 @@ -13,11 +13,11 @@ case $1 in
456 shift
457 export clst_packages="$*"
458 exec_in_chroot \
459 - ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
460 + ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
461 ;;
462
463 preclean)
464 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh
465 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh
466 ;;
467
468 clean)
469 diff --git a/targets/stage3/stage3-controller.sh b/targets/stage3/stage3-controller.sh
470 index ff546f8..df1479e 100755
471 --- a/targets/stage3/stage3-controller.sh
472 +++ b/targets/stage3/stage3-controller.sh
473 @@ -1,6 +1,6 @@
474 #!/bin/bash
475
476 -source ${clst_sharedir}/targets/support/functions.sh
477 +source ${clst_shdir}/support/functions.sh
478
479 # Only put commands in this section that you want every target to execute.
480 # This is a global default file and will affect every target
481 @@ -12,11 +12,11 @@ case $1 in
482 run)
483 shift
484 export clst_packages="$*"
485 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
486 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
487 ;;
488
489 preclean)
490 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh
491 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh
492 ;;
493
494 clean)
495 diff --git a/targets/stage4/stage4-controller.sh b/targets/stage4/stage4-controller.sh
496 index ff8dc03..d42f302 100755
497 --- a/targets/stage4/stage4-controller.sh
498 +++ b/targets/stage4/stage4-controller.sh
499 @@ -1,6 +1,6 @@
500 #!/bin/bash
501
502 -source ${clst_sharedir}/targets/support/functions.sh
503 +source ${clst_shdir}/support/functions.sh
504
505 # Only put commands in this section that you want every target to execute.
506 # This is a global default file and will affect every target
507 @@ -11,12 +11,12 @@ case $1 in
508
509 pre-kmerge)
510 # Sets up the build environment before any kernels are compiled
511 - exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
512 + exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
513 ;;
514
515 post-kmerge)
516 # Cleans up the build environment after the kernels are compiled
517 - exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
518 + exec_in_chroot ${clst_shdir}/support/post-kmerge.sh
519 ;;
520
521 kernel)
522 @@ -27,7 +27,7 @@ case $1 in
523 then
524 cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
525 fi
526 - exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
527 + exec_in_chroot ${clst_shdir}/support/kmerge.sh
528 delete_from_chroot tmp/linuxrc
529 extract_modules ${clst_chroot_path} ${clst_kname}
530 # Do we need this one?
531 @@ -37,15 +37,15 @@ case $1 in
532 build_packages)
533 shift
534 export clst_packages="$*"
535 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
536 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-chroot.sh
537 ;;
538
539 preclean)
540 - exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
541 + exec_in_chroot ${clst_shdir}/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
542 ;;
543
544 rc-update)
545 - exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
546 + exec_in_chroot ${clst_shdir}/support/rc-update.sh
547 ;;
548
549 fsscript)
550 @@ -54,7 +54,7 @@ case $1 in
551
552 livecd-update)
553 # Now, finalize and tweak the livecd fs (inside of the chroot)
554 - exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
555 + exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
556
557 # Move over the xinitrc (if applicable)
558 # This is moved here, so we can override any default xinitrc
559 @@ -71,18 +71,18 @@ case $1 in
560
561 target_image_setup)
562 shift
563 - ${clst_sharedir}/targets/support/target_image_setup.sh $1
564 + ${clst_shdir}/support/target_image_setup.sh $1
565 ;;
566
567 unmerge)
568 shift
569 export clst_packages="$*"
570 - exec_in_chroot ${clst_sharedir}/targets/support/unmerge.sh
571 + exec_in_chroot ${clst_shdir}/support/unmerge.sh
572 ;;
573
574 iso)
575 shift
576 - ${clst_sharedir}/targets/support/create-iso.sh $1
577 + ${clst_shdir}/support/create-iso.sh $1
578 ;;
579
580 clean)
581 diff --git a/targets/support/bootloader-setup.sh b/targets/support/bootloader-setup.sh
582 index a0bc5f5..857ce6f 100755
583 --- a/targets/support/bootloader-setup.sh
584 +++ b/targets/support/bootloader-setup.sh
585 @@ -1,7 +1,7 @@
586 #!/bin/bash
587
588 -source ${clst_sharedir}/targets/support/functions.sh
589 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
590 +source ${clst_shdir}/support/functions.sh
591 +source ${clst_shdir}/support/filesystem-functions.sh
592
593 # $1 is the destination root
594
595 @@ -455,7 +455,7 @@ case ${clst_hostarch} in
596 [ -d "${1}/boot" ] && rmdir ${1}/boot
597
598 # Source the arcload source file to generated required sections of arc.cf
599 - source ${clst_sharedir}/targets/support/mips-arcload_conf.sh
600 + source ${clst_shdir}/support/mips-arcload_conf.sh
601
602 # Generate top portions of the config
603 echo -e "${topofconfig}${serial}${dbg}${cmt1}" >> ${scratch}/arc.cf
604 diff --git a/targets/support/create-iso.sh b/targets/support/create-iso.sh
605 index fe1f0fc..08598e5 100755
606 --- a/targets/support/create-iso.sh
607 +++ b/targets/support/create-iso.sh
608 @@ -1,7 +1,7 @@
609 #!/bin/bash
610
611 -source ${clst_sharedir}/targets/support/functions.sh
612 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
613 +source ${clst_shdir}/support/functions.sh
614 +source ${clst_shdir}/support/filesystem-functions.sh
615
616 ## START RUNSCRIPT
617
618 diff --git a/targets/support/functions.sh b/targets/support/functions.sh
619 index 0894b35..9419b2b 100755
620 --- a/targets/support/functions.sh
621 +++ b/targets/support/functions.sh
622 @@ -24,7 +24,7 @@ exec_in_chroot(){
623
624 echo "Copying ${file_name} to ${destdir}"
625 copy_to_chroot ${1} ${destdir}
626 - copy_to_chroot ${clst_sharedir}/targets/support/chroot-functions.sh \
627 + copy_to_chroot ${clst_shdir}/support/chroot-functions.sh \
628 ${destdir}
629
630 chroot_path=${clst_chroot_path}${subdir}
631 diff --git a/targets/support/netboot2-final.sh b/targets/support/netboot2-final.sh
632 index 2ee207e..55835d2 100755
633 --- a/targets/support/netboot2-final.sh
634 +++ b/targets/support/netboot2-final.sh
635 @@ -1,7 +1,7 @@
636 #!/bin/bash
637
638 -source ${clst_sharedir}/targets/support/functions.sh
639 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
640 +source ${clst_shdir}/support/functions.sh
641 +source ${clst_shdir}/support/filesystem-functions.sh
642
643
644 extract_kernels ${clst_target_path}boot
645 diff --git a/targets/support/target_image_setup.sh b/targets/support/target_image_setup.sh
646 index b9e2781..b428d4e 100755
647 --- a/targets/support/target_image_setup.sh
648 +++ b/targets/support/target_image_setup.sh
649 @@ -1,6 +1,6 @@
650
651 -source ${clst_sharedir}/targets/support/functions.sh
652 -source ${clst_sharedir}/targets/support/filesystem-functions.sh
653 +source ${clst_shdir}/support/functions.sh
654 +source ${clst_shdir}/support/filesystem-functions.sh
655
656 # Make the directory if it doesnt exist
657 mkdir -p $1
658 diff --git a/targets/tinderbox/tinderbox-controller.sh b/targets/tinderbox/tinderbox-controller.sh
659 index d7d89cb..3dbc76f 100755
660 --- a/targets/tinderbox/tinderbox-controller.sh
661 +++ b/targets/tinderbox/tinderbox-controller.sh
662 @@ -1,14 +1,14 @@
663 #!/bin/bash
664
665 -source ${clst_sharedir}/targets/support/functions.sh
666 +source ${clst_shdir}/support/functions.sh
667
668 case $1 in
669 run)
670 shift
671 - exec_in_chroot ${clst_sharedir}/targets/tinderbox/tinderbox-chroot.sh
672 + exec_in_chroot ${clst_shdir}/tinderbox/tinderbox-chroot.sh
673 ;;
674 preclean)
675 - #exec_in_chroot ${clst_sharedir}/targets/tinderbox/tinderbox-preclean-chroot.sh
676 + #exec_in_chroot ${clst_shdir}/tinderbox/tinderbox-preclean-chroot.sh
677 delete_from_chroot /tmp/chroot-functions.sh
678 ;;
679 clean)
680 --
681 2.1.0