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 ...)\n\n20\tmount error\n21\tunmoun error\n22\twrong filesystem'
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"
@ -640,6 +647,9 @@ function error_code() {
15)
echo "wrong file (iso has no squashfs-file ...)"
;;
16)
echo "required Packet not found"
;;
20)
echo "tmount error"
;;
@ -655,6 +665,26 @@ function error_code() {
esac
}
#check_user
function check_user() {
#check root
[ "`whoami`" == "root" ] || {
echo "### ERROR ### Remaster need ROOT permision!"
exit 10
}
}
#check_dependency
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"
exit 16
}
done
}
### Workspace ###
#workspace_erase [workspace_path]
@ -1727,14 +1757,5 @@ function tools_add_desinfect2017() {
if [ -z "$1" ]; then
main_$modus_default
else
main_$1
main_$1 $2 $3 $4 $5 $6 $7 $8 $9
fi
#packet=plumadfd
#[ "`dpkg -l $packet 2>&1`" == "dpkg-query: Kein Paket gefunden, das auf $packet passt" ] && {