tools-systemd: isolate systemd scripts to their own directory

This commit is contained in:
Anthony G. Basile 2016-03-09 05:00:05 -05:00
parent ed422ec6fb
commit 8d7e8ae3a3
3 changed files with 8 additions and 4 deletions

6
tools-systemd/clean.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
# This just removes the temporary conf err and log
# files generated during a run
rm -f *conf *err *log

48
tools-systemd/run-systemd.sh Executable file
View file

@ -0,0 +1,48 @@
#!/bin/bash
source common.sh
prepare_confs() {
local arch=$1
for s in 1 2 3; do
local cstage=stage${s}
local p=$(( s - 1 ))
[[ $p == 0 ]] && p=3
local pstage=stage${p}
local parch="${arch}"
[[ "${arch}" == "i686" ]] && parch="x86"
cat stage-all.conf.template | \
sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \
-e "s:CSTAGE:${cstage}:g" \
-e "s:PSTAGE:${pstage}:g" \
-e "s:SARCH:${arch}:g" \
-e "s:PARCH:${parch}:g" \
> stage${s}-${arch}-systemd.conf
done
}
main() {
>zzz.log
undo_grsec
catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err
for arch in amd64 i686; do
prepare_confs ${arch}
done
# The parallelization `( do_stages ... ) &` doesn't work here
# if catalyst is using snapcache, bug #519656
for arch in amd64 i686; do
do_stages ${arch}
[[ $? == 1 ]] && echo "FAILURE at ${arch}" | tee zzz.log
done
}
main $1 &

View file

@ -0,0 +1,7 @@
subarch: SARCH
target: CSTAGE
version_stamp: systemd
rel_type: systemd/SARCH
profile: default/linux/PARCH/13.0/systemd
snapshot: current
source_subpath: systemd/SARCH/PSTAGE-SARCH-systemd