-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_server.sh
More file actions
executable file
·51 lines (40 loc) · 1.48 KB
/
create_server.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.48 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# ---------------------------------------------
# Script to Produce Server Media for Dapper Linux
# ---------------------------------------------
#!/bin/bash
# Variables
project=Dapper-Linux
version=29
variant=Server
name=$project-$variant
arch=x86_64
location=./Kickstarts/dapper-disk-server.ks
flatfile=./Kickstarts/dapper-disk-server-flat.ks
bugurl=https://github.com/dapperlinux/dapper-linux-issues
DATE=`date +%Y-%m-%d`
# Remove Previous Buildfiles
rm -rf $version
rm -rf fedora
rm -rf logs
rm -rf snippets
rm -rf updates
rm -rf work
# Remove Previous Remmanants
rm -rf $name-$version-*.iso*
# Disable SELinux Because of Policy Reasons
setenforce 0
# Flatten the Kickstart files into one
ksflatten --config $location --output $flatfile
# Copy Base Install Class to PyAnaconda Location
mkdir -p work/$variant/$arch/installtree/usr/lib64/python3.7/site-packages/pyanaconda/installclasses/
cp dapperlinux.py work/$variant/$arch/installtree/usr/lib64/python3.7/site-packages/pyanaconda/installclasses/
# Create ISO image
pungi --config $flatfile --name $name --family $project --flavor $variant --ver $version --bugurl $bugurl --nosource --nodebuginfo --isfinal
# Get the ISO
cp ./$version/$variant/$arch/iso/$name-DVD-$arch-$version.iso .
mv $name-DVD-$arch-$version.iso $name-$version-$DATE.iso
# Re-Enable SELinux
setenforce 1
# Generate CheckSums
openssl sha1 $name-$version-$DATE.iso > $name-$version-$DATE.iso.sha1.txt
openssl sha256 $name-$version-$DATE.iso > $name-$version-$DATE.iso.sha256.txt