59 Commits

Author SHA1 Message Date
c0ddfe7c1c v 2.0.3 2018-05-20 23:29:33 +02:00
d41fa9e1b0 Merge branch 'feature-check-config' into develop
add feature check_config
2018-05-20 23:26:44 +02:00
cee345cd25 fix until name change 2018-05-20 23:16:24 +02:00
20bb090cb3 fixes... 2018-05-20 23:12:12 +02:00
310b670631 aktivate 2018-05-20 23:04:52 +02:00
6ce556ef84 add lable; smal fix 2018-05-20 22:55:54 +02:00
242421fbab format... 2018-05-20 22:53:00 +02:00
cdf2cc900e add project check 2018-05-20 22:52:20 +02:00
8b782fa5e1 add live-system files check 2018-05-20 22:44:33 +02:00
74b3a8b12b log check at init 2018-05-20 22:43:33 +02:00
d11b96947c add log check 2018-05-20 21:53:56 +02:00
832decf3d1 Merge branch 'feature-script-add-function' into develop 2018-05-20 21:17:07 +02:00
89053e3ed1 add script 2018-05-20 21:16:19 +02:00
051f8636a2 init check_config 2018-05-20 21:02:45 +02:00
3510f44ef8 appropriate name 2018-05-20 20:50:06 +02:00
fb4afed081 subvers 2018-05-20 20:32:55 +02:00
6bb0f2ab06 Merge branch 'feature-proxy-optional' into develop 2018-05-20 14:15:24 +02:00
22c8d8081e Load check_update func 2018-05-20 12:24:51 +02:00
d65cddc2f5 proxy optional 2018-05-20 11:59:47 +02:00
28f59fb94b Merge branch 'doc-struckture' into develop
add draft
2018-05-20 01:34:46 +02:00
6aa13ce326 draft_v3 2018-05-20 01:34:10 +02:00
ff9a384ce6 draft_v2 2018-05-20 01:29:25 +02:00
897ddfd3a6 format 2018-05-20 01:13:03 +02:00
5767355c21 draft 2018-05-20 00:43:38 +02:00
d0c53279b5 update Dependencys <- update feature 2018-05-19 22:45:42 +02:00
1d52508d77 Merge remote-tracking branch 'origin/feature-mail-optional' into develop 2018-05-19 22:30:40 +02:00
ca02c443d3 make mail optional 2018-05-17 01:05:56 +02:00
55a17ad2ce beautysh 2018-05-17 01:04:21 +02:00
fcbfdff33a Merge branch 'hotfix-2.0.2' into develop 2018-05-13 00:40:39 +02:00
b3894fedc9 hotfix-2.0.2 2018-05-13 00:33:39 +02:00
d2f7a45d6c hotfix-2.0.2 2018-05-13 00:30:53 +02:00
cdd40d5195 Merge branch 'feature-check-update' into develop 2018-05-13 00:05:14 +02:00
a2517232a1 add feature check_update 2018-05-13 00:05:02 +02:00
66372fadcc add update check 2018-05-13 00:02:09 +02:00
57b2383ef3 spelling 2018-05-12 23:12:17 +02:00
3a3083cda8 Merge branch 'release-2.0.0' into develop
release-2.0.0
2018-05-12 23:06:09 +02:00
ab4622e37a release-2.0.0 2018-05-12 23:05:54 +02:00
baa3dcf419 merge dev 2018-05-12 22:58:51 +02:00
1134235acd clean 2018-05-12 22:56:13 +02:00
727cf6ed3c Merge branch 'feature-debian-packages' into develop
lintian improvements
2018-05-12 22:41:08 +02:00
d63d13fe80 del dummy func 2018-05-12 22:40:41 +02:00
b0ce2cfa16 lintian improvements 2018-05-12 22:37:35 +02:00
cee0bd03ca Merge branch 'feature-debian-packages' into develop
add feauture build-deb
2018-05-12 20:20:08 +02:00
8885e4881f autogen beautysh 2018-05-12 20:19:38 +02:00
7aadb795ff autogen irreführende namen geändert 2018-05-12 20:19:12 +02:00
80d2ad753d debian init 2018-05-12 19:54:34 +02:00
e5edbb3f8d Merge branch 'fix-standalone_executable' into develop
fix-standalone_executable
2018-05-11 00:04:43 +02:00
2513b645c1 standalone executable 2018-05-11 00:04:02 +02:00
401abf1f4b Merge branch 'hotfix-1.9.3' into develop
hotfix-1.9.3
2018-05-10 22:47:55 +02:00
fcf59dc1d9 spelling 2018-05-10 18:28:49 +02:00
aa57178d15 spelling 2018-05-10 13:41:01 +02:00
01a0709563 add Docu 2018-05-10 12:26:22 +02:00
50ddcac6f6 Update License 2018-05-07 02:44:22 +02:00
c28eaa1a38 Merge pull request #17 from 6543/changes-on-server
2018-04-05
2018-04-27 12:07:02 +02:00
ab55ed8b3d 2018-04-05 2018-04-27 12:04:05 +02:00
365cb8a069 Merge pull request #14 from 6543/clean
del unfinished things
2018-04-26 18:28:03 +02:00
9d907e9028 del unfinished things 2018-04-26 18:26:28 +02:00
5a86bb3237 Merge pull request #13 from 6543/clean
clean repo
2018-04-26 18:25:09 +02:00
3321ce059a done 2018-04-26 18:23:42 +02:00
40 changed files with 484 additions and 170 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/build
/release

1
DEBIAN/conffiles Normal file
View File

@ -0,0 +1 @@
/etc/remaster/config.sample.cfg

12
DEBIAN/control Normal file
View File

@ -0,0 +1,12 @@
Package: remaster
Source: remaster
Version: 2.0.3
Architecture: all
Maintainer: 6543 <6543@obermui.de>
Installed-Size: <SIZE>
Depends: squashfs-tools, xorriso, wget, sed (>= 4.2), sendemail, bash (>= 4.3)
Suggests: nfs-kernel-server, isc-dhcp-server
Section: utils
Priority: optional
Homepage: https://github.com/6543/remaster
Description: The aim of this Project is to create a daemon for a server, witch update live systems.

1
DEBIAN/postinst Executable file
View File

@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/postrm Executable file
View File

@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/preinst Executable file
View File

@ -0,0 +1 @@
#!/bin/sh

1
DEBIAN/prerm Executable file
View File

@ -0,0 +1 @@
#!/bin/sh

View File

@ -12,6 +12,7 @@ The aim of this Project is to create a daemon for a server, witch update live sy
- wget
- sed
- sendemail
- curl
## To Do

View File

@ -1,15 +1,13 @@
#!/bin/bash
# at the moment only generate dir structure in /build
# install | clean | debug | build-deb
#make ...
function clean() {
echo "clear build"
[ -d build ] && rm -v -R build
mkdir build
}
function build() {
echo "build ..."
## skripte copieren ##
function copy() {
echo "copy files ..."
# remaster
mkdir -p build/usr/bin/
cp -v src/remaster.sh build/usr/bin/remaster
@ -26,6 +24,10 @@ function build() {
mkdir -p build/etc/remaster/
cp -v src/config.sample.cfg build/etc/remaster/config.sample.cfg
#changelog
mkdir -p build/usr/share/doc/remaster
cp -v changes/remaster.md build/usr/share/doc/remaster/changelog
gzip --best build/usr/share/doc/remaster/changelog
}
#config ...
@ -45,16 +47,65 @@ function set_libdir() {
#modes
function debug() {
clean
build
#prebuild
copy
set_rootdir "`pwd`/build"
set_libdir "`pwd`/build/usr/lib/remaster"
}
function install() {
#überprüfe auf root
[ "`id -u`" != "0" ] && { echo "Error start as root"; exit 1; }
#lösche alltes build dir
clean
build
#prebuild
copy
set_rootdir ""
set_libdir "/usr/lib/remaster"
#cp -f -r build/* /
#set owner
chown -r root:root build/
#install
cp -f -r build/* /
}
function build-deb() {
#überprüfe auf root
[ "`id -u`" != "0" ] && { echo "Error start as root"; exit 1; }
#lösche alltes build dir
clean
#prebuild
copy
set_rootdir ""
set_libdir "/usr/lib/remaster"
####
## changes for deb file
####
cp -v -r -f DEBIAN build/
#create md5sums
find ./build -type f -exec md5sum {} \; | grep -v './build/DEBIAN' | sed 's/\.\/build\///g' > build/DEBIAN/md5sums
chmod 0644 build/DEBIAN/md5sums
#set size
SIZE="`du --exclude=build/DEBIAN -c build/ | cut -f 1 | tail -n 1`"
sed -i "s/<SIZE>/$SIZE/g" build/DEBIAN/control
#set owner
chown -r root:root build/
##
#build deb
##
dpkg -b build/
version="`cat build/DEBIAN/control | grep Version | cut -d " " -f 2`"
arch="`cat build/DEBIAN/control | grep Arch | cut -d " " -f 2`"
[ -f "release/remaster_"$version"_"$arch".deb" ] && rm "release/remaster_"$version"_"$arch".deb"
mkdir -p release
mv -v "build.deb" "release/remaster_"$version"_"$arch".deb"
}
@ -68,10 +119,13 @@ case "$1" in
debug)
debug || exit 1
;;
build)
build || exit 1
copy)
copy || exit 1
;;
build-deb)
build-deb || exit 1
;;
*)
echo "Usage: install | clean | debug | build"
echo "Usage: install | clean | debug | build-deb"
exit 1
esac

View File

@ -6,3 +6,21 @@
2018-05-10 - 1.9.3
* hotfix-1.9.3
2018-05-12 - 2.0.0
* add feature build debian packages
* add Doc "Server Bedienung"
* split functions
* separate config into /etc/remaster/
2018-05-13 - 2.0.1
* Update-Prüfmechanismus #15
2018-05-13 - 2.0.2
* hotfix-2.0.2 ( create release folder if not exist )
2018-05-20 - 2.0.3
* make email, proxy optional
* change Strukture.md
* add config check
* some help scripts

View File

@ -1,28 +1,113 @@
# Src
# 1. Starte "remaster"
raw scripts ..
## 1.1 Lade Grundfunctionen [-> #functions]
## functions
## 1.2 Überprüfe ...
* auf Updates
* auf Rechte
- creat iso
- burn cd ...
- clean workspace ...
## 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
* (z.B. ubuntu.16.04 -> ubuntu -> debian)
* Prüfe Conf. (Proj Conform)
## distros
## 1.5 Lade $n Mods (optional) [-> #mods]
* Überprüfen
* Spechern in MOD_LST
scripts vor distros
- update
- set network settings
- set OS settings
# 2. Init Chroot
## mods
- for example: install & enable xrdp
- set default passwd
- ...
## 2.1 Dateien Entpacken
* ISO
* Squashfs
## web
placeholder for webfiles ...
## 2.2 Config für Chroot (chroot_initial)
* (lxc-conf / tmpdir)
* Netzwerk
## pxe
placeholder for pxefiles ...
## 2.3 Starte Chroot
* (lxc-start / mount ...)
# 3. Modivikationen
## 3.1 Netzwerk
## 3.2 Proj-Spez.
* (z.B. Desinfect: conky_info)
## 3.3 Packet Mgr
* Updates
* Install
* Delete
## 3.4 Weitere in $MOD_LST
* z.B. xrdp
* z.B. default pw
# 4. Finish
## 4.1 Aufreumen Live-Sys
* tmpfiles
* Packet Mgr
## 4.2 Stop chroot
* Umount
## 4.3. Gen ISO/PXE
## 4.4. Del Chroot
# 5. Send Log
----
## lxc
-> chroot_sh exec lxc-attach
-> chroot_dir = container name
----
## PXE
-> Install
* DHCP Relay
* NFS-Server
* TFTP-Server
* [Samba]
-> Setup
* (use <Lib>/proj/<proj> func)
* SMB/NFS LiveSys export
* TFTP (Boot Menue; Boot Loader; Kernel&Initrd)
-> Deinstall
* RM TFTP-Root
* RM SMB/NFS LiveSys export
* del DHCP Relay conf
----
## Jobs
* Read Confs -> get time interfall I
* Exec remaster <Conf> for I
----
## Web
show/edit #Configs
show (+live) #Logs
start/stop/plan #Jobs
start/stop/edit #PXE menue
* default
* all / single / none
* live view new clients

13
doc/lib-head+tail Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#<function> [param]
function <function>() {
#Code of <function>
}
#this func is standalone executable
[ -n "$1" ] && {
<function> $@
}

View File

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

12
script/add_function.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
#check param
[ -z "$1" ] && { echo "$0 [name]"; exit 1; }
name="$1"
#gen function
cp "doc/lib-head+tail" "src/func/$name"
sed -i "s/<function>/$name/g" "src/func/$name"
#open
editor "src/func/$name"

3
script/get_version.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
grep '@version ' src/remaster.sh | cut -d " " -f 2

View File

@ -8,15 +8,19 @@ date=`date +%Y-%m-%d`
version_sed=`echo $version | sed 's/\./\\./g'`
#nummer
sed -i "s/@version\ .\..\../@version\ $version_sed/g" src/remaster.sh
sed -i "/#@version\ /c\#@version\ $version_sed" src/remaster.sh
#datum
sed -i "s/@date\ ....-..-../@date\ $date/g" src/remaster.sh
sed -i "/#@date\ /c\#@date\ $date" src/remaster.sh
}
[ -e "changes/remaster.md" ] && {
echo >> changes/remaster.md
echo $date - $version >> changes/remaster.md
echo pleace update changes/remaster.md
editor changes/remaster.md
}
[ -f "DEBIAN/control" ] && {
sed -i "/Version:\ /c\Version:\ $version_sed" "DEBIAN/control"
}

76
src/func/check_config Executable file
View File

@ -0,0 +1,76 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#check_config [log_file]
function check_config() {
#LOG
{
log_file=$1
[ -z "$log_file" ] && log_file="/tmp/remaster_`date '+%Y-%m-%d'`"
if [ -f "$log_file" ]; then
echo > "$log_file"
else
#check if folder exist
[ -d "${log_file%/*}" ] || {
# N-> exit 3
echo "Directory for Log didnt exist"
exit 3
}
#create LOG
touch "$log_file"
fi
}
#Project
[ -f "<LIBDIR>/proj/$distro" ] || {
echo "No Project \"$distro\" is not supported" | tee -a "$log_file"
return 3
}
#live-system files
if [ -f "$iso_source" ]; then
if [ -n "$iso_destination" ] && [ -d "${iso_destination%/*}" ]; then
#Lable
[ -z "$iso_lable" ] && iso_lable="$distro"
echo 'iso_source -> iso_destination' | tee -a "$log_file"
echo 'iso_source -> squashfs [optinal]' | tee -a "$log_file"
else
if [ -n "$filesystem_source" ] && [ -d "${filesystem_source%/*}" ]; then
echo 'iso_source -> squashfs' | tee -a "$log_file"
else
# ERROR
echo "No corect AIM in Settings" | tee -a "$log_file"
return 3
fi
fi
else
if [ -f "$filesystem_source" ]; then
if [ -n "$iso_destination" ]; then
# ERROR
echo "only Squashfs source in Settings, cant creat ISO" | tee -a "$log_file"
return 3
else
echo 'squashfs -> squashfs' | tee -a "$log_file"
fi
else
# ERROR
echo "No corect Source in Settings" | tee -a "$log_file"
return 3
fi
fi
}
#this func is standalone executable
[ -n "$1" ] && {
check_config $@
}

View File

@ -14,7 +14,7 @@ function check_dependency() {
return 0
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
check_dependency $@
}

17
src/func/check_update Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#remaster lib
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#check_update
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 'REMASTER: Aktuell'
else
echo 'REMASTER: Warning: neue Version verfügbar'
fi
}
#this func is standalone executable
[ -n "$1" ] && {
check_update
}

View File

@ -11,7 +11,7 @@ function check_user() {
}
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
check_user $@
}

View File

@ -16,7 +16,7 @@ function chroot_clean() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
chroot_clean $@
}

View File

@ -25,7 +25,7 @@ function chroot_initial() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
chroot_initial $@
}

View File

@ -16,7 +16,7 @@ function chroot_is_mounted() {
fi
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
chroot_is_mounted $@
}

View File

@ -23,7 +23,7 @@ function chroot_sh() {
chroot "$chroot_dir" /bin/bash --login -c ". /tmp/env.sh; $command"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
chroot_sh $@
}

View File

@ -25,7 +25,7 @@ function chroot_umount() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
chroot_umount $@
}

View File

@ -53,13 +53,16 @@ function error_code() {
22)
echo "wrong filesystem"
;;
all)
error_code
;;
*)
echo $'No Defined Error Code.\nPerhaps an Error ocure on a Command wich was started by this Skritp.'
;;
esac
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
error_code $@
}

View File

@ -42,7 +42,7 @@ function filesystem_extract() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
filesystem_extract $@
}

View File

@ -9,7 +9,7 @@ function filesystem_get_type() {
echo ${fs_aTemp[9]}
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
filesystem_get_type $@
}

View File

@ -31,7 +31,7 @@ function filesystem_pack() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
filesystem_pack $@
}

View File

@ -25,7 +25,7 @@ function iso_create() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
iso_create $@
}

View File

@ -46,7 +46,7 @@ function iso_extract() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
iso_extract $@
}

View File

@ -4,8 +4,9 @@
#on_exit [error_level]
function on_exit() {
### send mail
[ -n "$log_mail_aim" ] && {
#send log and errorlevel[success/errorr xy]
if [ "$1" != "0" ]; then
log_mail_subject="$log_mail_subject [ERROR]"
else
@ -20,7 +21,9 @@ function on_exit() {
cat "$log_file"
} | sendemail -s "$log_mail_smtp" -f "$log_mail_source" -t "$mail_aim" -u "$log_mail_subject" -o tls=no
done
}
### clean up
[ "$1" != "0" ] && {
chroot_umount$distro "$chroot_path" 2> /dev/null
workspace_erase "$iso_extr_dir/" "$chroot_path/" 2> /dev/null
@ -28,7 +31,7 @@ function on_exit() {
exit $1
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
on_exit $@
}

View File

@ -13,7 +13,7 @@ function workspace_erase() {
echo "done"
}
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
workspace_erase $@
}

View File

@ -10,7 +10,7 @@
#this func is standalone executable
[ -n "$1" ] && {
echo param
$1
xrdp $@
}

View File

@ -35,8 +35,3 @@ function os_update() {
echo "done"
}
[ -n "$1" ] && {
echo param
$1
}

View File

@ -7,8 +7,3 @@
source <LIBDIR>/proj/ubuntu.16.04
TEST2="na"
[ -n "$1" ] && {
echo param
$1
}

0
src/proj/desinfect2017 Normal file
View File

View File

@ -7,8 +7,3 @@
####################################
# . -> debian
source <LIBDIR>/proj/debian
[ -n "$1" ] && {
echo param
$1
}

View File

@ -5,8 +5,3 @@
#ubuntu.16.04
# . -> ubuntu -> debian
source <LIBDIR>/proj/ubuntu
[ -n "$1" ] && {
echo param
$1
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
#@version 1.9.3
#@version 2.0.3
#@autor 6543@obermui.de
#@date 2018-05-10
#@date 2018-05-20
#@licence GNUv3
#####################################################################################
@ -25,6 +25,23 @@ else
exit 1
fi
fi
#check LOG
{
[ -z "$log_file" ] && log_file="/tmp/remaster_`date '+%Y-%m-%d'`"
if [ -f "$log_file" ]; then
echo > "$log_file"
else
#check if folder exist
[ -d "${log_file%/*}" ] || {
# N-> exit 3
echo "Directory for Log didnt exist"
exit 3
}
#create LOG
touch "$log_file"
fi
}
#####################################################################################
################## M o d e s ########################################################
@ -32,8 +49,7 @@ fi
#remaster.sh renew
function main_renew() {
[ -f "$log_file" ] || touch "$log_file"
#Start LOG
tail -f "$log_file" --pid="$$" &
chroot_path="`mktemp -d`"
@ -90,6 +106,11 @@ function main_renew() {
check_dependency
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_config "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_update | tee -a "$log_file"
[ "$distro" != "" ] && distro="_$distro"
# 2. Entpacke ISO
@ -111,9 +132,10 @@ function main_renew() {
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
# 5. Setzen der Netzwerk-Einstellungen:
[ -n "$proxy_host" ] && {
proxy_enable$distro "$chroot_path" "$proxy_host" "$proxy_port" >> "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
}
dns_set "$chroot_path" "$domain" "$nameserver" >> "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
@ -192,8 +214,7 @@ function main_renew() {
#remaster.sh update_pxe
function main_update_pxe() {
[ "$log_file" == "" ] && log_file="`mktemp`"
[ -f "$log_file" ] || touch "$log_file"
#Start LOG
tail -f "$log_file" --pid="$$" &
chroot_path="`mktemp -d`"
@ -237,9 +258,14 @@ function main_update_pxe() {
check_user
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_update | tee -a "$log_file"
check_dependency
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_config "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
[ "$distro" != "" ] && distro="_$distro"
# 1. Entpacken der Dateien des Live-Systems
@ -303,7 +329,7 @@ function main_update_pxe() {
#remaster.sh update_iso #in arbeit
function main_update_iso() {
[ -f "$log_file" ] || touch "$log_file"
#Start LOG
tail -f "$log_file" --pid="$$" &
chroot_path="`mktemp -d`"
@ -357,9 +383,14 @@ function main_update_iso() {
check_user
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_update | tee -a "$log_file"
check_dependency
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
check_config "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
[ "$distro" != "" ] && distro="_$distro"
# 2. Entpacke ISO
@ -391,9 +422,10 @@ function main_update_iso() {
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
# 5. Setzen der Netzwerk-Einstellungen:
[ -n "$proxy_host" ] && {
proxy_enable$distro "$chroot_path" "$proxy_host" "$proxy_port" >> "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
}
dns_set "$chroot_path" "$domain" "$nameserver" >> "$log_file"
error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file"
@ -465,17 +497,15 @@ function main_update_iso() {
on_exit 0
}
#remaster.sh update
function main_update() {
main_update_pxe
}
#####################################################################################
################## F u n c t i o n s ################################################
#####################################################################################
### Error Handlings ###
#check_config [log_file]
source <LIBDIR>/func/check_config
#on_exit [error_level]
source <LIBDIR>/func/on_exit
@ -489,6 +519,8 @@ source <LIBDIR>/func/check_user
# -> 0 | -> 16
source <LIBDIR>/func/check_dependency
#check_update
source <LIBDIR>/func/check_update
### Workspace ###