1
|
CLONEZILLA_SOURCE="https://downloads.sourceforge.net/project/clonezilla/clonezilla_live_stable/2.6.2-15/clonezilla-live-2.6.2-15-i686.zip?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fclonezilla%2Ffiles%2Fclonezilla_live_stable%2F2.6.2-15%2Fclonezilla-live-2.6.2-15-i686.zip%2Fdownload%3Fuse_mirror%3Dnetix&ts=1568208151"
|
2
|
CLONEZILLA_SAVE_TO="../clonezilla-orig.zip"
|
3
|
|
4
|
|
5
|
all:
|
6
|
|
7
|
|
8
|
full-clean:
|
9
|
rm -f ${CLONEZILLA_SAVE_TO}
|
10
|
rm -rf live
|
11
|
|
12
|
|
13
|
download:
|
14
|
test -e ${CLONEZILLA_SAVE_TO} || wget -O ${CLONEZILLA_SAVE_TO} ${CLONEZILLA_SOURCE}
|
15
|
|
16
|
|
17
|
prepare-clonezilla: download
|
18
|
test -e live || unzip ${CLONEZILLA_SAVE_TO} live/*
|
19
|
rm -f live/filesystem.packages live/filesystem.packages-remove live/filesystem.size live/freedos.img live/ipxe.efi live/ipxe.lkn live/memtest
|
20
|
|
21
|
|
22
|
rebuild-squashfs: prepare-clonezilla
|
23
|
useradd clonezilla || true
|
24
|
cd live; test -e squashfs-root || unsquashfs filesystem.squashfs
|
25
|
cd live/squashfs-root; test -e home/clonezilla/.ssh || mkdir -p home/clonezilla/.ssh
|
26
|
cd live/squashfs-root/home/clonezilla/.ssh; test -e id_rsa || ssh-keygen -t rsa -N "" -f id_rsa -C "clonezilla@fucc-live"
|
27
|
chmod 700 live/squashfs-root/home/clonezilla/.ssh
|
28
|
chmod 600 live/squashfs-root/home/clonezilla/.ssh/id_rsa
|
29
|
chmod 644 live/squashfs-root/home/clonezilla/.ssh/id_rsa.pub
|
30
|
chown -R clonezilla. live/squashfs-root/home/clonezilla/.ssh
|
31
|
cd live; rm -f filesystem.squashfs; mksquashfs squashfs-root filesystem.squashfs -comp zstd
|
32
|
rm -f live/squashfs-root/home/clonezilla/.ssh/id_rsa
|
33
|
cp live/squashfs-root/home/clonezilla/.ssh/id_rsa.pub utils/clonezilla_live.pub
|