| author | J. Ali Harlow <ali@juiblex.co.uk> |
| Wed Oct 22 12:09:47 2014 +0100 (2014-10-22) | |
| changeset 460 | b8638c3c7eee |
| parent 352 | 4866573c6944 |
| child 475 | 008c75a5e08d |
| permissions | -rwxr-xr-x |
1 #!/bin/sh
2 if [ $# -gt 0 ]; then
3 razor="$1"
4 else
5 razor=../src/razor
6 fi
7 check_filesystem()
8 {
9 if [ ! -e "$RAZOR_ROOT$1" ]; then
10 echo $1: Not in filesystem >&2
11 exit 1
12 fi
13 }
14 check_file()
15 {
16 ../src/razor list-files | grep -x "$1" > /dev/null
17 if [ $? -ne 0 ]; then
18 echo $1: Not in database >&2
19 exit 1
20 fi
21 check_filesystem "$1"
22 }
23 export RAZOR_ROOT=`mktemp -dt` || exit 1
24 $razor init || exit 1
25 export YUM_URL="file://localhost/`pwd`"
26 $razor import-yum || exit 1
27 $razor install filesystem || exit 1
28 check_file /etc
29 check_file /usr/bin
30 check_file /usr/lib
31 check_file /usr/include
32 check_filesystem /media/cdrom
33 rm -rf "$RAZOR_ROOT"