41 Commits

Author SHA1 Message Date
c43fb3b724 hotfix-1.9.3 2018-05-10 22:47:24 +02:00
ec93ab93a8 Merge branch 'bugfix-1.9.2' into develop
docu
2018-05-10 18:51:44 +02:00
a5345457d4 docu 2018-05-10 18:51:34 +02:00
c5c5327826 spelling 2018-05-10 18:36:34 +02:00
7905649b4e Merge branch 'bugfix-1.9.2' into develop
finished bugfix-1.9.2
2018-05-10 17:14:21 +02:00
81d0a5c8c3 add Doc "Server Bedienung" 2018-05-10 17:13:52 +02:00
98e0b6c835 exec singel func 2018-05-10 17:13:19 +02:00
49901e1f32 scripts 2018-05-10 14:19:14 +02:00
07e4e0d663 lib header 2018-05-08 00:28:32 +02:00
41e020e645 del test vars 2018-05-07 03:01:16 +02:00
26d0950665 code format bug 2018-05-07 02:56:46 +02:00
1d392d7460 docu... 2018-05-07 02:43:27 +02:00
bfdad6d547 Update License 2018-05-07 02:42:10 +02:00
41946e6584 docu ... 2018-05-07 02:34:25 +02:00
c4f2f7367a docu ... 2018-05-07 02:08:20 +02:00
c6103a8fb4 source cant use variables (p5-final) 2018-05-07 01:58:55 +02:00
6616478014 source cant use variables (p4) 2018-05-07 01:49:19 +02:00
80d8a9bedf code format 2018-05-07 01:34:59 +02:00
1aff83904c source cant use variables (p3) 2018-05-07 01:30:50 +02:00
b6eb652c50 atom-beautify 2018-05-07 01:11:25 +02:00
801da8e4af source cant use variables (p2) 2018-05-07 01:09:19 +02:00
4b9bbe22af atom-beautify 2018-05-06 19:31:13 +02:00
838a1e709a source cant use variables (p1) 2018-05-06 19:26:21 +02:00
f2b3b5f530 Split main func (no os/proj dependency) 2018-04-30 18:57:01 +02:00
b5ab4f1ec9 - bugfix '"'
- def lib-header
2018-04-30 18:12:45 +02:00
aecc9d5b9c rename gendeb to autogen 2018-04-28 11:32:26 +02:00
be87936dc4 2018-04-05 2018-04-27 14:01:08 +02:00
074b92b984 smal fixes 2018-04-27 09:33:02 +02:00
da68365153 restructure: seperate config 2018-04-26 20:58:19 +02:00
1c4dc6ac56 create docu p2 2018-04-26 19:46:17 +02:00
eedeecbcb6 ... 2018-04-26 18:43:56 +02:00
b05a5cfb7b create docu p1
mk placeholder
2018-04-26 17:16:09 +02:00
432e01e762 Beschreibung aktualisert 2018-04-26 13:33:08 +02:00
f6b3415c17 add build 2018-04-26 13:23:51 +02:00
b38a62aa8b restructure ... begin 2018-04-26 13:04:35 +02:00
c52b58b9f5 1.8.1 2018-03-26 14:53:48 +02:00
479ed25411 v1.8.0 2018-03-26 14:52:46 +02:00
d0b6c3d271 v1.7.3 2018-03-26 14:50:34 +02:00
f13555f4d8 v1.7.2 2018-03-26 14:48:41 +02:00
da464c6a4b v1.7.1 2018-03-26 14:47:46 +02:00
819ade4198 v1.7.0 2018-03-26 14:44:52 +02:00
37 changed files with 2152 additions and 1724 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

View File

@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
{one line to give the program's name and a brief idea of what it does.} {one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author} Copyright (C) 2018 6543@obermui.de
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode: notice like this when it starts in an interactive mode:
{project} Copyright (C) {year} {fullname} remaster Copyright (C) 2018 6543@obermui.de
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.

View File

@ -1,9 +1,31 @@
# remaster # remaster
for testing ...
## Description
This script updates/change Live Linux CDs The aim of this Project is to create a daemon for a server, witch update live systems. You should only have to install the modules for different OS/Live-Projects. It also set the right network settings (Proxy, DNS, ...) and will be extendible wit PXE menu. additional: Web Interface (Create/Change/Delete Jobs; Download Latest ISO; Start/Stop PXE Server)
(At the moment only Ubuntu/Debian; Desinfect15,16)
Perhaps this will be split in parts and an config file in /etc/remaster/ controls it ... ## Dependencys
- squashfs-tools
- xorriso
- wget
- sed
- sendemail
## To Do
- Support more Projects
- Debian
- Ubuntu
- Desinfect17
- CentOS
- Add Job-Scheduler
## At the Moment
- Ubuntu/Debian
- Desinfect17
- one config file

77
autogen.sh Executable file
View File

@ -0,0 +1,77 @@
#!/bin/bash
# at the moment only generate dir structure in /build
#make ...
function clean() {
echo "clear build"
[ -d build ] && rm -v -R build
mkdir build
}
function build() {
echo "build ..."
## skripte copieren ##
# remaster
mkdir -p build/usr/bin/
cp -v src/remaster.sh build/usr/bin/remaster
chmod +x build/usr/bin/remaster
# modules
mkdir -p build/usr/lib/remaster/
for i in proj func mods; do
mkdir -p build/usr/lib/remaster/$i
cp -v src/$i/* build/usr/lib/remaster/$i/
done
# setting
mkdir -p build/etc/remaster/
cp -v src/config.sample.cfg build/etc/remaster/config.sample.cfg
}
#config ...
function set_rootdir() {
sed -i "s#<ROOTDIR>#$1#g" build/usr/bin/remaster
for i in proj func mods; do
sed -i "s#<ROOTDIR>#$1#g" build/usr/lib/remaster/$i/*
done
}
function set_libdir() {
sed -i "s#<LIBDIR>#$1#g" build/usr/bin/remaster
for i in proj func mods; do
sed -i "s#<LIBDIR>#$1#g" build/usr/lib/remaster/$i/*
done
}
#modes
function debug() {
clean
build
set_rootdir "`pwd`/build"
set_libdir "`pwd`/build/usr/lib/remaster"
}
function install() {
clean
build
set_rootdir ""
set_libdir "/usr/lib/remaster"
#cp -f -r build/* /
}
case "$1" in
install)
install || exit 1
;;
clean)
clean || exit 1
;;
debug)
debug || exit 1
;;
build)
build || exit 1
;;
*)
echo "Usage: install | clean | debug | build"
exit 1
esac

8
changes/remaster.md Normal file
View File

@ -0,0 +1,8 @@
2018-04-26 - 1.9.1
* seperate script and config
2018-05-10 - 1.9.2
* exec singel func
2018-05-10 - 1.9.3
* hotfix-1.9.3

BIN
doc/Server Bedienung.odt Normal file

Binary file not shown.

BIN
doc/Server Bedienung.pdf Normal file

Binary file not shown.

28
doc/Strukture.md Normal file
View File

@ -0,0 +1,28 @@
# Src
raw scripts ..
## functions
- creat iso
- burn cd ...
- clean workspace ...
## distros
scripts vor distros
- update
- set network settings
- set OS settings
## mods
- for example: install & enable xrdp
- set default passwd
- ...
## web
placeholder for webfiles ...
## pxe
placeholder for pxefiles ...

12
doc/buid_vars.md Normal file
View File

@ -0,0 +1,12 @@
variablen, welche um zu funktionieren mit statischen pfaden
ausgetauscht werden müssen:
remaster.sh
* <ROOTDIR>
-(install)> ""
-(debug)> 'pwd'/build
remaster.sh; <LIBDIR>/*/*;
* <LIBDIR>
-(install)> /usr/lib/remaster
-(debug)> 'pwd'/build/usr/lib/remaster

5
doc/lib-header.txt Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#beginn func

File diff suppressed because it is too large Load Diff

22
script/set_version.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
version=$1
date=`date +%Y-%m-%d`
[ -e "src/remaster.sh" ] && {
version_sed=`echo $version | sed 's/\./\\./g'`
#nummer
sed -i "s/@version\ .\..\../@version\ $version_sed/g" src/remaster.sh
#datum
sed -i "s/@date\ ....-..-../@date\ $date/g" src/remaster.sh
}
[ -e "changes/remaster.md" ] && {
echo >> changes/remaster.md
echo $date - $version >> changes/remaster.md
echo pleace update changes/remaster.md
}

39
src/config.sample.cfg Normal file
View File

@ -0,0 +1,39 @@
#cfg
#########################################################
## sample-config rename it to config.cfg after changes ##
#########################################################
## MODUS
modus_default="update_pxe"
#CD/DVD
#entweder iso_source oder filesystem_source alls quelle
# -> bei iso gen erforderlich!
iso_source="/data/remaster/desinfect-2017.iso"
#destination optinal
iso_destination="/data/remaster/result/custom_desinfect_`date '+%Y-%m-%d'`.iso"
iso_lable="DESINFECT_`date '+%Y-%m-%d'`"
#Filesystem (for pxe)
#entweder iso_source oder filesystem_source alls quelle
filesystem_source="/data/remaster/result/filesystem.squashfs"
#Network
proxy_host="proxy.local"
proxy_port="8080"
domain="local"
nameserver="10.x.x.2,10.x.x.1"
#remaster_script
distro="desinfect2017"
#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"
#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"

20
src/func/check_dependency Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#check_dependency
# -> 0 | -> 16
function check_dependency() {
for packet in squashfs-tools xorriso wget sed sendemail; do
[ "`dpkg -l $packet 2>&1`" == "dpkg-query: Kein Paket gefunden, das auf $packet passt" ] && {
echo "### ERROR ### Packet $packet not installed"
return 16
}
done
return 0
}
[ -n "$1" ] && {
echo param
$1
}

17
src/func/check_user Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#check_user
function check_user() {
#check root
[ "`whoami`" == "root" ] || {
echo "### ERROR ### Remaster need ROOT permision!"
return 10
}
}
[ -n "$1" ] && {
echo param
$1
}

22
src/func/chroot_clean Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_clean [chroot_dir]
function chroot_clean() {
echo "clean chroot ... "
chroot_dir="$1"
chroot "$chroot_dir" /bin/bash -c "apt-get clean"
chroot "$chroot_dir" /bin/bash -c "rm -r /var/cache/apt/*"
chroot "$chroot_dir" /bin/bash -c "apt-get update"
chroot "$chroot_dir" /bin/bash -c "apt-get check"
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

31
src/func/chroot_initial Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_initial [chroot_dir]
function chroot_initial() {
echo -n "initial chroot ... "
#check chroot dir
chroot_dir="$1"
[ -d "$chroot_dir" ] || {
echo "### ERROR ### chroot_initial: chroot directory not exist"
return 12
}
#mount virus definitions
mount -t tmpfs tmpfs "$chroot_dir/tmp"
mount -t tmpfs tmpfs "$chroot_dir/root"
mount --bind /dev "$chroot_dir/dev"
mount --bind /proc "$chroot_dir/proc"
rm "$chroot_dir/etc/resolv.conf"
cp "/etc/resolv.conf" "$chroot_dir/etc/resolv.conf"
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

22
src/func/chroot_is_mounted Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_is_mounted [chroot_dir]
#(Boolean)-> true | false
function chroot_is_mounted() {
#$1 = chroot directory
if [ "`mount | grep "$1"`" != "" ] ; then
#ther is smething mounted
echo "true"
else
#nothing mounted
echo "false"
fi
}
[ -n "$1" ] && {
echo param
$1
}

29
src/func/chroot_sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_sh [chroot_dir] [command]
function chroot_sh() {
#check chroot dir
chroot_dir="$1"
[ -d "$chroot_dir" ] || {
echo "### ERROR ### chroot_sh: chroot directory not exist!"
return 12
}
command="$2"
[ -f "$chroot_dir/tmp/env.sh" ] || {
#if not exist create environment skript
cat "$chroot_dir/etc/environment" | grep -v "#" | grep "=" > "$chroot_dir/tmp/env"
while read line; do echo export $line; done < "$chroot_dir/tmp/env" > "$chroot_dir/tmp/env.sh"
chmod +x "$chroot_dir/tmp/env.sh" && rm "$chroot_dir/tmp/env"
}
chroot "$chroot_dir" /bin/bash --login -c ". /tmp/env.sh; $command"
}
[ -n "$1" ] && {
echo param
$1
}

31
src/func/chroot_umount Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_umount [chroot_dir]
function chroot_umount() {
echo -n "unmount chroot ... "
#check chroot dir
chroot_dir="$1"
[ -d "$chroot_dir" ] || {
echo "### ERROR ### chroot_umount: chroot directory not exist!"
return 12
}
for d in "$chroot_dir/tmp" "$chroot_dir/root" "$chroot_dir/proc" "$chroot_dir/dev" ; do
umount $d
retval=$?
[ "$retval" -gt 0 ] && {
echo "### ERROR ### chroot_umount: can't umount \"$d\"!"
return 21
}
done
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

65
src/func/error_code Executable file
View File

@ -0,0 +1,65 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#error_code [error_level]
function error_code() {
code="$1"
case $code in
"")
echo $'ID:\tDescription\n----------------------------------------------------\n1\tAllgemeiner Fehler\n2\tNo Paramters / wrong parameters'
echo $'3\tWrong Settings\n4\tProgramm missing\n\n10\tno root\n11\tfile no found\n12\tdir not found\n13\tcant create/delete file/dir'
echo $'14\tcorrupt file (unsquashfs, mount iso, ...)\n15\twrong file (iso has no squashfs-file ...)\n16\trequired Packet not found\n\n20\tmount error\n21\tunmoun error\n22\twrong filesystem'
;;
1)
echo "Allgemeiner Fehler"
;;
2)
echo "No Paramters / wrong parameters"
;;
3)
echo "Wrong Settings"
;;
4)
echo "Programm missing"
;;
10)
echo "not executed as Root"
;;
11)
echo "file no found"
;;
12)
echo "dir not found"
;;
13)
echo "cant create/delete file/dir"
;;
14)
echo "corrupt file (unsquashfs, mount iso, ...)"
;;
15)
echo "wrong file (iso has no squashfs-file ...)"
;;
16)
echo "required Packet not found"
;;
20)
echo "tmount error"
;;
21)
echo "unmoun error"
;;
22)
echo "wrong filesystem"
;;
*)
echo $'No Defined Error Code.\nPerhaps an Error ocure on a Command wich was started by this Skritp.'
;;
esac
}
[ -n "$1" ] && {
echo param
$1
}

48
src/func/filesystem_extract Executable file
View File

@ -0,0 +1,48 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#filesystem_extract [filesystem_img_source] [chroot_path]
function filesystem_extract() {
echo "extract filesystem ..."
#$1 = filesystem_img_source
#$2 = chroot_path
filesystem_img_source="$1"
chroot_path="$2"
filesystem_log="`mktemp`"
#Überfrüfen der Parameter
[ -f "$filesystem_img_source" ] || {
echo "### ERROR ### filesystem_extract: squashfs \"$filesystem_img_source\" not exist!"
return 11
}
[ "`mkdir -p "$chroot_path"`" != "" ] && {
echo "### ERROR ### filesystem_extract: chroot_path \"$chroot_path\" can't create!"
return 13
}
[ "`filesystem_get_type $chroot_path`" != "ext4" ] && [ "`filesystem_get_type $chroot_path`" != "btrfs" ] && {
echo "### ERROR ### filesystem_extract: wrong filesystem (`filesystem_get_type $chroot_path`)!"
return 22
}
rm -r "$chroot_path"
#eigendliches entpacken
unsquashfs -d "$chroot_path" "$filesystem_img_source" > "$filesystem_log" || {
echo "### ERROR ### filesystem_extract: unsquashfs failed!"
return 14
}
grep -v "\[" "$filesystem_log"
rm "$filesystem_log"
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

15
src/func/filesystem_get_type Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#filesystem_get_type [dir]
#(String)-> ext4, ext2, btfs, fuse, ...
function filesystem_get_type() {
fs_aTemp=(`df -T "$1"`)
echo ${fs_aTemp[9]}
}
[ -n "$1" ] && {
echo param
$1
}

37
src/func/filesystem_pack Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#filesystem_pack [chroot_path] [filesystem_img_destination]
function filesystem_pack() {
echo "pack filesystem ..."
#$1 = chroot_path
#$2 = filesystem_img_destination
chroot_path="$1"
filesystem_img_destination="$2"
filesystem_log="`mktemp`"
#Überfrüfen der Parameter
[ -d "$chroot_path" ] || {
echo "### ERROR ### filesystem_extract: chroot_path \"$chroot_path\" not exist!"
return 12
}
#loslegen ...
rm -f "$filesystem_img_destination"
mksquashfs "$chroot_path" "$filesystem_img_destination" > "$filesystem_log" || {
echo "### ERROR ### filesystem_pack: mksquashfs failed!"
return 13
}
grep -v "\[" "$filesystem_log"
rm "$filesystem_log"
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

31
src/func/iso_create Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#iso_create [chroot_path] [iso_extr_dir] [iso_destination] [iso_lable]
function iso_create() {
echo -n "create iso ..."
chroot_path="$1"
iso_extr_dir="$2"
iso_destination="$3"
iso_lable="$4"
[ -e "$iso_destination" ] && rm "$iso_destination"
xorriso -as mkisofs -graft-points -c isolinux/boot.cat -b isolinux/isolinux.bin \
-no-emul-boot -boot-info-table -boot-load-size 4 -isohybrid-mbr \
"$iso_extr_dir/isolinux/isolinux.bin" \
-eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
-isohybrid-gpt-basdat -V "$iso_lable" \
-o "$iso_destination" \
-r -J "$iso_extr_dir" \
--sort-weight 0 / --sort-weight 2 /boot --sort-weight 1 /isolinux
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

52
src/func/iso_extract Executable file
View File

@ -0,0 +1,52 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#iso_extract [iso_source] [iso_extr_dir]
function iso_extract() {
echo -n "extract iso ... "
#$1 = iso_source
#$2 = iso_extr_dir
#check root
[ "`whoami`" == "root" ] || {
echo "### ERROR ### iso_extract: need root permision!"
return 10
}
iso_source="$1"
[ -f "$iso_source" ] || {
echo "### ERROR ### iso_extract: ISO \"$iso_source\" not exist!"
return 11
}
iso_extr_dir="$2"
[ -d "$iso_extr_dir" ] || {
echo "### ERROR ### iso_extract: aim directory not exist!"
return 12
}
#mace tmp mountpoint
tmpdir="`mktemp -d`"
[ -d "$iso_extr_dir" ] && {
rm -r "$iso_extr_dir/"
mkdir "$iso_extr_dir"
}
#copy files ...
mount -o loop,ro "$iso_source" "$tmpdir"
cp -f -r "$tmpdir/"* "$iso_extr_dir"
#clear tmp mountpoint
umount "$iso_source"
rm -r "$tmpdir"
tmpdir=
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

34
src/func/on_exit Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#on_exit [error_level]
function on_exit() {
#send log and errorlevel[success/errorr xy]
if [ "$1" != "0" ]; then
log_mail_subject="$log_mail_subject [ERROR]"
else
log_mail_subject="$log_mail_subject [Success]"
fi
#Mail Body:
for mail_aim in `echo "$log_mail_aim" | tr "," " "`; do
{
echo "$log_mail_subject"
echo $'####################################################################################\n\n'
cat "$log_file"
} | sendemail -s "$log_mail_smtp" -f "$log_mail_source" -t "$mail_aim" -u "$log_mail_subject" -o tls=no
done
[ "$1" != "0" ] && {
chroot_umount$distro "$chroot_path" 2> /dev/null
workspace_erase "$iso_extr_dir/" "$chroot_path/" 2> /dev/null
}
exit $1
}
[ -n "$1" ] && {
echo param
$1
}

19
src/func/workspace_erase Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#workspace_erase [workspace_path]
function workspace_erase() {
echo -n "erase workspace ... "
for dir in "$@"; do
[ -d "$dir" ] && rm -r -f "$dir"
done
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

16
src/mods/xrdp Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
## ...
[ -n "$1" ] && {
echo param
$1
}

42
src/proj/debian Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
####################################
##### Base Template D E B I A N ####
####################################
# .
#tools_add [chroot_dir] [tools_list]
function tools_add() {
echo "add tools ... "
#$1 = chroot directory
chroot_dir="$1"
tools_list="$2"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get install -y $tools_list" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
echo "done"
}
#os_update [chroot_dir]
function os_update() {
echo "updating os ... "
#$1 = chroot directory
chroot_dir="$1"
chroot "$chroot_dir" /bin/bash -c "apt-get update" > /dev/null
[ "$?" == "0" ] && echo "apt-get update: success"
chroot "$chroot_dir" /bin/bash -c "apt-get dist-upgrade -y" | grep -v "wird eingerichtet ..." | grep -v "Vormals nicht ausgewähltes Paket" | grep -v "Entpacken von" | grep -v "Holen: " | grep -v "Trigger für" | grep -v "update-alternatives:"
chroot "$chroot_dir" /bin/bash -c "apt-get clean"
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

14
src/proj/desinfect.17 Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#desinfect.17
# . -Y ubuntu.16.04 -> ubuntu -> debian
source <LIBDIR>/proj/ubuntu.16.04
TEST2="na"
[ -n "$1" ] && {
echo param
$1
}

14
src/proj/ubuntu Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
####################################
##### Base Template U B U N T U ####
####################################
# . -> debian
source <LIBDIR>/proj/debian
[ -n "$1" ] && {
echo param
$1
}

12
src/proj/ubuntu.16.04 Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#ubuntu.16.04
# . -> ubuntu -> debian
source <LIBDIR>/proj/ubuntu
[ -n "$1" ] && {
echo param
$1
}

0
src/pxe/pxe.cfg Normal file
View File

1361
src/remaster.sh Executable file

File diff suppressed because it is too large Load Diff

0
src/web/index.html Normal file
View File