File: fai-cd

package info (click to toggle)
fai 6.5.4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,076 kB
  • sloc: sh: 6,720; perl: 5,626; makefile: 138
file content (37 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/bash

# create fai-cd

. ./debian/tests/common.sh
trap "cp -vp fai-cd.log $AUTOPKGTEST_ARTIFACTS" INT QUIT EXIT

mdir=/tmp/mirror

if [ ! -d /srv/fai/config ]; then
    fai-mk-configspace
fi
if [ ! -d /srv/fai/nfsroot ]; then
    fai-make-nfsroot -zg
fi
chk-size /srv/fai/nfsroot 750
chk-file /srv/fai/nfsroot/var/tmp/packages.nfsroot
chk-file /srv/fai/nfsroot/var/tmp/base-pkgs.lis

if [ ! -d $mdir ]; then
    echo "Creating package mirror $mdir"
    su $AUTOPKGTEST_NORMAL_USER -s /bin/bash -c "fai-mirror -v -s$CS -m1 -xARM64,I386,ROCKY,UBUNTU,FOCAL,CLOUD,CHROOT,STANDARD,NONFREE,GNOME $mdir >& /tmp/mirror.log"
fi
chk-size $mdir 550

# - - - - - - - - - - - - - - - - -
echo "Call fai-cd"
fai-cd -m $mdir faicd64-small.iso >& fai-cd.log
echo fai-cd exit code: $?


# test the results of the commands called
chk-size faicd64-small.iso 830

if [ X$NO_CLEANUP != X1 ]; then
    rm -rf $mdir
fi