+++ /dev/null
-current_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
-
-.PHONY: all root slave bios initrd clean
-help:
- @echo This make file contains severals targets:
- @echo ' - help: print this help;'
- @echo ' - root: creates root tarball;'
- @echo ' - slave: creates slave tarballs;'
- @echo ' - bios: creates bios tarball;'
- @echo ' - initrd: update initrd;'
- @echo ' - clean: remove created tarballs, and cleanup file system in order to build ISO.'
-
-
-all: root slave bios
-
-root slave bios:
- $(current_dir)bin/create_$@_tarball.sh
-
-initrd:
- update-initramfs -u
-
-clean:
- service trc6500 stop
- -rm /opt/tftp/*.tgz
- aptitude remove $(shell apt-mark showmanual trc6500\*|egrep -v webconfig\|rproxy) ace tao myccm
- cp -f /etc/dhcp/dhcpd.conf.blank /etc/dhcp/dhcpd.conf
- chown webconfig: /etc/dhcp/dhcpd.conf*
- echo "Etc/Zulu" > /etc/timezone
- sed -i 's/XKBLAYOUT=.*/XKBLAYOUT="us"/;s/XKBVARIANT=.*/XKBVARIANT=""/;s/XKBOPTIONS=.*/XKBOPTIONS=""/' /etc/default/keyboard
- find -P /dump/ -mindepth 2 -maxdepth 2 -print -exec rm -rf -v {} \;
- find -P /home/ -mindepth 1 -maxdepth 1 ! -wholename '/home/trc6500' -exec rm -rf -v {} \;
- find -P /opt/ -mindepth 1 -maxdepth 1 -regextype posix-egrep ! -regex '.*/(bios|cluster|ipmi|tftp)$$' -exec rm -rf -v {} \;
- find -P /root/ -mindepth 1 -maxdepth 1 -name ".*" -o -name bin -o -exec rm -rf -v {} \;
- -mkdir --parents /opt/trc6500/debian-rep
- rm -f /root/.bash_history
- rm -rf $(shell mount|awk '/type ext/ {print $$3 "/lost+found/*"}')
- rm -rf /var/lib/nfs/v4recovery/*
- find /var/log/ -type f -exec rm -f {} \;
- touch /var/log/btmp /var/log/wtmp /var/log/lastlog
- chmod ug+rw,o-rw,a-x /var/log/btmp
- chmod ug+rw,o+r,o-w,a-x /var/log/wtmp /var/log/lastlog
- chown root:utmp /var/log/btmp /var/log/wtmp /var/log/lastlog
- find / -name trc6500_list_patched_files.txt -exec rm -f {} \;