-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_media.sh
More file actions
executable file
·47 lines (35 loc) · 1.38 KB
/
create_media.sh
File metadata and controls
executable file
·47 lines (35 loc) · 1.38 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
# ---------------------------------------------
# Script to Produce Live Media for Dapper Linux
# ---------------------------------------------
#!/bin/bash
# Variables
project=Dapper-Linux
version=29
location=./Kickstarts/dapper-live-workstation.ks
flatfile=./Kickstarts/dapper-live-workstation-flat.ks
builddir=/var/dapper
name=Dapper-Linux-Live
DATE=`date +%Y-%m-%d`
# Copy Base Install Class to PyAnaconda Location
cp dapperlinux.py /usr/lib64/python3.7/site-packages/pyanaconda/installclasses/
# Patch pylorax to Accept dapper-dracut-live for dracut-live
sed -i "s/dracut-live/dapper-dracut-live/g" /usr/lib/python3.7/site-packages/pylorax/creator.py
# Remove Previous Logfiles
rm livemedia.log
rm program.log
rm -rf anaconda
# Remove Previous Image
rm -rf $builddir
# Disable SELinux Because of Policy Reasons
setenforce 0
# Flatten the Kickstart files into one
ksflatten --config $location --output $flatfile
# Produce the livecd
livemedia-creator --ks $flatfile --no-virt --resultdir $builddir --project $project --make-iso --volid $name --iso-only --iso-name $name-$version-$DATE.iso --releasever $version --title $name --macboot
# Get the Livecd
cp $builddir/$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