diff --git a/changes/remaster.md b/Changelog.md similarity index 100% rename from changes/remaster.md rename to Changelog.md diff --git a/doc/notes b/doc/notes new file mode 100644 index 0000000..afd4b2e --- /dev/null +++ b/doc/notes @@ -0,0 +1,2 @@ +initrd: +https://help.ubuntu.com/community/LiveCDCustomization#Removing_the_.28Casper.29_Autologina diff --git a/script/set_version.sh b/script/set_version.sh index e012b21..78d3442 100755 --- a/script/set_version.sh +++ b/script/set_version.sh @@ -9,16 +9,17 @@ date=`date +%Y-%m-%d` #nummer sed -i "/#@version\ /c\#@version\ $version_sed" src/remaster.sh + sed -i "/echo\ Remaster\ /c\ \ \ \ \ \ \ \ \ \ echo\ Remaster\ $version_sed" src/remaster.sh #datum sed -i "/#@date\ /c\#@date\ $date" src/remaster.sh } -[ -e "changes/remaster.md" ] && { +[ -e "Changelog.md" ] && { - echo >> changes/remaster.md - echo $date - $version >> changes/remaster.md - editor changes/remaster.md + echo >> Changelog.md + echo $date - $version >> Changelog.md + $EDITOR Changelog.md } [ -f "DEBIAN/control" ] && { diff --git a/src/config.sample.cfg b/src/config.sample.cfg index 30cbfbb..d7d44ce 100644 --- a/src/config.sample.cfg +++ b/src/config.sample.cfg @@ -1,36 +1,39 @@ -#cfg ######################################################### ## sample-config rename it to config.cfg after changes ## ######################################################### -#CD/DVD -#entweder iso_source oder squashfs_path alls quelle -# -> bei iso gen erforderlich! -iso_source="/data/remaster/desinfect-2017.iso" -#destination optinal -iso_aim="/data/remaster/result/custom_desinfect_`date '+%Y-%m-%d'`.iso" +## Quelle der Project CD/DVD +iso_source="/data/local/Desinfect_Remaster/tmp/desinfect-2017.iso" + +## Pfad zum gepakten Live System +## (kann anstat einer ISO auch als Quelle dienen, dann aber auch zwingend als Ziel) +# squashfs_path="/data/local/Desinfect_Remaster/tmp/filesystem.squashfs" + +## Ziel, Lable der zu erstellenden CD/DVD +iso_aim="/data/local/Desinfect_Remaster/tmp/custom_desinfect_`date '+%Y-%m-%d'`.iso" iso_lable="DESINFECT_`date '+%Y-%m-%d'`" -#Filesystem (for pxe) -#entweder iso_source oder squashfs_path alls quelle -squashfs_path="/data/remaster/result/filesystem.squashfs" -#Network -proxy_host="proxy.local" -proxy_port="8080" -domain="local" -nameserver="10.x.x.2,10.x.x.1" +## Netzwerk Sinstellungen +## Proxy: +# proxy_host="10.40.8.108" +# proxy_port="8080" +domain="fritz.box" +nameserver="10.40.255.254" -#remaster_script +## Project / Distro +## Aktuell unterstützt: debian; ubuntu; ubuntu.14.04; ubuntu.16.04; desinfect.17 project="desinfect.17" -#LOG -log_file="/data/remaster/logs/`date '+%Y-%m-%d'`.log" -log_mail_source="desinfect@email.clocal" -log_mail_smtp="smtp.mail.local:25" -log_mail_aim="6543@email.clocal" -log_mail_subject="Desinfect_Remaster" +## LOG Einstellungen +## log_file ist optionall +log_file="/data/local/Desinfect_Remaster/tmp/logs/`date '+%Y-%m-%d'`.log" +## Senden mit sendmail einen Report +# log_mail_source="desinfect@email.clocal" +# log_mail_smtp="smtp.mail.local:25" +# log_mail_aim="6543@email.clocal" +# log_mail_subject="Desinfect_Remaster" #Sonstiges tools_list="xrdp clamav nano htop nmon iftop tmux dsniff nmap openssh-server tightvncserver rsync e2fsprogs foremost gddrescue recoverjpeg safecopy sleuthkit testdisk arp-scan" diff --git a/src/func/check_update b/src/func/check_update index 79d6d99..b8b11fd 100755 --- a/src/func/check_update +++ b/src/func/check_update @@ -7,7 +7,7 @@ function check_update() { if curl https://raw.githubusercontent.com/6543/remaster/master/changes/remaster.md | diff - <(zcat /usr/share/doc/remaster/changelog.gz ); then echo 'INFO: Programm Aktuell' else - echo 'WARNUNG: neue Version verfügbar' + echo 'WARNUNG: Ausgeführte Version entspricht nicht dem offiziellen Release' fi } diff --git a/src/func/clear_config b/src/func/clear_config new file mode 100755 index 0000000..e059ff4 --- /dev/null +++ b/src/func/clear_config @@ -0,0 +1,35 @@ +#!/bin/bash +#remaster lib +[ -d "" ] || { echo "LIBDIR not exist"; exit 1; } + +#check_config +function clear_config() { + + ## Source & Aim options + iso_source= + squashfs_path= + iso_aim= + iso_lable= + + ## network + proxy_host= + proxy_port= + domain= + nameserver= + + ## Project / Distro + project= + + ## LOG Settings + log_file= + log_mail_source= + log_mail_smtp= + log_mail_aim= + log_mail_subject= + +} + +#this func is standalone executable +[ -n "$1" ] && { + clear_config $@ +} diff --git a/src/func/filesystem_extract b/src/func/filesystem_extract index 2ca5bdb..acc43fb 100755 --- a/src/func/filesystem_extract +++ b/src/func/filesystem_extract @@ -2,6 +2,9 @@ #remaster lib [ -d "" ] || { echo "LIBDIR not exist"; exit 1; } +#dependency +source /func/filesystem_get_type + #filesystem_extract [filesystem_img_source] [chroot_path] function filesystem_extract() { echo "extract filesystem ..." diff --git a/src/remaster.sh b/src/remaster.sh index 0d5558f..fd2a92c 100755 --- a/src/remaster.sh +++ b/src/remaster.sh @@ -43,6 +43,38 @@ fi fi } +##################################################################################### +################## H e l p & I n f o ############################################## +##################################################################################### + + + case $(echo $1 | tr -d '-') in + '') ;; + version|V) + echo Remaster 2.0.4 + exit 0 + ;; + config|c) + if [ -f "$2" ]; then + source /func/clear_config + source "$2" + else + echo "ERROR Config \"$2\" not found" + exit 1 + fi + else + ;; + *) + echo 'Remaster update Live Systems' + echo ' more information at: https://github.com/6543/remaster/' + echo '' + echo ' --version|-V show current version' + echo ' --config|-c run remaster with custom config' + exit 0 + ;; +esac + + ##################################################################################### ################## F u n c t i o n s ################################################ #####################################################################################