Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
73d1c97f3a | |||
686d3ef8c2 | |||
27913b4a59 | |||
70c002bff2 | |||
|
9fbdea3a1d | ||
7fd11f9cd6 | |||
d34f7a39bd | |||
|
1af13587dc | ||
|
e0262554ce | ||
0caa4f6af2 | |||
67be4705a5 | |||
|
2a3aa53d2f | ||
df734f1f34 | |||
2ac2fd9cd2 | |||
90926de1d6 | |||
189fd6d56c | |||
ff5d90c312 | |||
ade9e795b6 | |||
e26f391b49 | |||
3643b745ae | |||
f5db5a154d | |||
3149285ab9 | |||
db0ae5e4fe | |||
18b42628a0 | |||
f809343015 | |||
4cb8816cc1 |
@ -30,3 +30,13 @@
|
||||
* restructure code
|
||||
* use proj templates
|
||||
* some help scripts
|
||||
|
||||
2019-09-20 - 2.1.0
|
||||
* fixes
|
||||
- filesystem_extract: filesystem_get_type
|
||||
- update dev scripts
|
||||
- work without arguments
|
||||
* check_update: acuret message
|
||||
* restruct sample config
|
||||
* add "Help & Info" menue/section (#24) (#20)
|
||||
* --config | custom config (#25)
|
@ -1,6 +1,6 @@
|
||||
Package: remaster
|
||||
Source: remaster
|
||||
Version: 2.0.4
|
||||
Version: 2.1.0
|
||||
Architecture: all
|
||||
Maintainer: 6543 <6543@obermui.de>
|
||||
Installed-Size: <SIZE>
|
||||
|
@ -1,5 +1,9 @@
|
||||
# remaster
|
||||
[](https://www.gnu.org/licenses/gpl-3.0)
|
||||
[](https://code.obermui.de/6543/remaster/releases)
|
||||
[](https://mh.obermui.de/publickey.gpg)
|
||||
[](https://app.fossa.io/projects/git%2Bgithub.com%2F6543%2Fremaster?ref=badge_shield)
|
||||
|
||||
# remaster
|
||||
|
||||
## Description
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,19 +0,0 @@
|
||||
maddl@NB-Maddl:~$ function a() { echo null; }
|
||||
maddl@NB-Maddl:~$ a
|
||||
null
|
||||
maddl@NB-Maddl:~$ function a_desinfect() { echo desinfect; }
|
||||
maddl@NB-Maddl:~$ a_desinfect
|
||||
desinfect
|
||||
maddl@NB-Maddl:~$ alias a=a_desinfect
|
||||
maddl@NB-Maddl:~$ a
|
||||
desinfect
|
||||
maddl@NB-Maddl:~$ alias --help
|
||||
bash: alias: --: Ungültige Option
|
||||
alias: Gebrauch: alias [-p] [Name[=Wert] ... ]
|
||||
maddl@NB-Maddl:~$ man alias
|
||||
Kein Handbucheintrag für alias vorhanden
|
||||
maddl@NB-Maddl:~$ alias a=a
|
||||
maddl@NB-Maddl:~$ a
|
||||
null
|
||||
maddl@NB-Maddl:~$
|
||||
|
@ -1,13 +1,13 @@
|
||||
Erorr Liste:
|
||||
Erorrs:
|
||||
|
||||
ID: Description
|
||||
----------------------------------------------------
|
||||
1 Allgemeiner Fehler
|
||||
2 No Paramters / wrong parameters
|
||||
3 Wrong Settings!
|
||||
4 Programm missing
|
||||
1 general error
|
||||
2 no paramters / wrong parameters
|
||||
3 wrong settings
|
||||
4 programm missing
|
||||
|
||||
10 no root
|
||||
10 need root permission
|
||||
11 file no found
|
||||
12 dir not found
|
||||
13 cant create/delete file/dir
|
@ -1,40 +1,38 @@
|
||||
# 1. Starte "remaster"
|
||||
## 1.1 Load base functions [-> #functions]
|
||||
|
||||
## 1.1 Lade Grundfunctionen [-> #functions]
|
||||
## 1.2 Check ...
|
||||
* for updates
|
||||
* for rights
|
||||
|
||||
## 1.2 Überprüfe ...
|
||||
* auf Updates
|
||||
* auf Rechte
|
||||
## 1.3 Load settings [-> #config]
|
||||
* lade /etc/remaster/<Conf>
|
||||
* verify config (Proj Exist; Mods Exist; ...)
|
||||
|
||||
## 1.3 Lade Richtige Einstellungen [-> #config]
|
||||
* Lade /etc/remaster/<Conf>
|
||||
* Überprüfe Conf. (Proj Exist; Mods Exist; ...)
|
||||
|
||||
## 1.4 Lade Proj-Func [-> #projects]
|
||||
* Überlade nach Abhängigkeit
|
||||
## 1.4 Load Proj-Func [-> #projects]
|
||||
* overload based on dependencys
|
||||
* (z.B. ubuntu.16.04 -> ubuntu -> debian)
|
||||
* Prüfe Conf. (Proj Conform)
|
||||
* verify config (Proj Conform)
|
||||
|
||||
## 1.5 Lade $n Mods (optional) [-> #mods]
|
||||
* Überprüfen
|
||||
* Spechern in MOD_LST
|
||||
## 1.5 Load $n Mods (optional) [-> #mods]
|
||||
* check
|
||||
* save in MOD_LST
|
||||
|
||||
# 2. Init Chroot
|
||||
|
||||
## 2.1 Dateien Entpacken
|
||||
## 2.1 Extrackt Files
|
||||
* ISO
|
||||
* Squashfs
|
||||
|
||||
## 2.2 Config für Chroot (chroot_initial)
|
||||
## 2.2 Config for Chroot (chroot_initial)
|
||||
* (lxc-conf / tmpdir)
|
||||
* Netzwerk
|
||||
* network
|
||||
|
||||
## 2.3 Starte Chroot
|
||||
## 2.3 Start Chroot
|
||||
* (lxc-start / mount ...)
|
||||
|
||||
# 3. Modivikationen
|
||||
|
||||
## 3.1 Netzwerk
|
||||
## 3.1 Network
|
||||
|
||||
## 3.2 Proj-Spez.
|
||||
* (z.B. Desinfect: conky_info)
|
||||
@ -44,22 +42,22 @@
|
||||
* Install
|
||||
* Delete
|
||||
|
||||
## 3.4 Weitere in $MOD_LST
|
||||
## 3.4 Next in $MOD_LST
|
||||
* z.B. xrdp
|
||||
* z.B. default pw
|
||||
|
||||
# 4. Finish
|
||||
|
||||
## 4.1 Aufreumen Live-Sys
|
||||
## 4.1 Clean-Up Live-System
|
||||
* tmpfiles
|
||||
* Packet Mgr
|
||||
|
||||
## 4.2 Stop chroot
|
||||
* Umount
|
||||
|
||||
## 4.3. Gen ISO/PXE
|
||||
## 4.3. Generate ISO/PXE
|
||||
|
||||
## 4.4. Del Chroot
|
||||
## 4.4. Delete Chroot
|
||||
|
||||
# 5. Send Log
|
||||
|
@ -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" ] && {
|
||||
|
@ -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"
|
||||
|
@ -7,7 +7,7 @@ function check_update() {
|
||||
if curl https://raw.githubusercontent.com/6543/remaster/master/changes/remaster.md | diff - <(zcat <ROOTDIR>/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
|
||||
}
|
||||
|
||||
|
35
src/func/clear_config
Executable file
35
src/func/clear_config
Executable file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
#remaster lib
|
||||
[ -d "<LIBDIR>" ] || { 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 $@
|
||||
}
|
@ -2,6 +2,9 @@
|
||||
#remaster lib
|
||||
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
|
||||
|
||||
#dependency
|
||||
source <LIBDIR>/func/filesystem_get_type
|
||||
|
||||
#filesystem_extract [filesystem_img_source] [chroot_path]
|
||||
function filesystem_extract() {
|
||||
echo "extract filesystem ..."
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#@version 2.0.4
|
||||
#@version 2.1.0
|
||||
#@autor 6543@obermui.de
|
||||
#@date 2018-05-22
|
||||
#@date 2019-09-20
|
||||
#@licence GNUv3
|
||||
|
||||
#####################################################################################
|
||||
@ -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.1.0
|
||||
exit 0
|
||||
;;
|
||||
config|c)
|
||||
if [ -f "$2" ]; then
|
||||
source <LIBDIR>/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 <config> run remaster with custom config'
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#####################################################################################
|
||||
################## F u n c t i o n s ################################################
|
||||
#####################################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user