Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
c9116e1cfd | |||
ab4622e37a | |||
baa3dcf419 | |||
1134235acd | |||
727cf6ed3c | |||
d63d13fe80 | |||
b0ce2cfa16 | |||
cee0bd03ca | |||
8885e4881f | |||
7aadb795ff | |||
80d2ad753d | |||
e5edbb3f8d | |||
2513b645c1 | |||
401abf1f4b | |||
fcf59dc1d9 | |||
aa57178d15 | |||
01a0709563 | |||
50ddcac6f6 | |||
c28eaa1a38 | |||
ab55ed8b3d | |||
365cb8a069 | |||
9d907e9028 | |||
5a86bb3237 | |||
3321ce059a |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/build
|
/build
|
||||||
|
/release
|
||||||
|
1
DEBIAN/conffiles
Normal file
1
DEBIAN/conffiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
/etc/remaster/config.sample.cfg
|
12
DEBIAN/control
Normal file
12
DEBIAN/control
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Package: remaster
|
||||||
|
Source: remaster
|
||||||
|
Version: 2.0.0
|
||||||
|
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
1
DEBIAN/postinst
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
1
DEBIAN/postrm
Executable file
1
DEBIAN/postrm
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
1
DEBIAN/preinst
Executable file
1
DEBIAN/preinst
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
1
DEBIAN/prerm
Executable file
1
DEBIAN/prerm
Executable file
@ -0,0 +1 @@
|
|||||||
|
#!/bin/sh
|
75
autogen.sh
75
autogen.sh
@ -1,15 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# at the moment only generate dir structure in /build
|
# install | clean | debug | build-deb
|
||||||
|
|
||||||
#make ...
|
|
||||||
function clean() {
|
function clean() {
|
||||||
echo "clear build"
|
echo "clear build"
|
||||||
[ -d build ] && rm -v -R build
|
[ -d build ] && rm -v -R build
|
||||||
mkdir build
|
mkdir build
|
||||||
}
|
}
|
||||||
function build() {
|
function copy() {
|
||||||
echo "build ..."
|
echo "copy files ..."
|
||||||
## skripte copieren ##
|
|
||||||
# remaster
|
# remaster
|
||||||
mkdir -p build/usr/bin/
|
mkdir -p build/usr/bin/
|
||||||
cp -v src/remaster.sh build/usr/bin/remaster
|
cp -v src/remaster.sh build/usr/bin/remaster
|
||||||
@ -26,6 +24,10 @@ function build() {
|
|||||||
mkdir -p build/etc/remaster/
|
mkdir -p build/etc/remaster/
|
||||||
cp -v src/config.sample.cfg build/etc/remaster/config.sample.cfg
|
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 ...
|
#config ...
|
||||||
@ -45,16 +47,64 @@ function set_libdir() {
|
|||||||
#modes
|
#modes
|
||||||
function debug() {
|
function debug() {
|
||||||
clean
|
clean
|
||||||
build
|
|
||||||
|
#prebuild
|
||||||
|
copy
|
||||||
set_rootdir "`pwd`/build"
|
set_rootdir "`pwd`/build"
|
||||||
set_libdir "`pwd`/build/usr/lib/remaster"
|
set_libdir "`pwd`/build/usr/lib/remaster"
|
||||||
}
|
}
|
||||||
function install() {
|
function install() {
|
||||||
|
#überprüfe auf root
|
||||||
|
[ "`id -u`" != "0" ] && { echo "Error start as root"; exit 1; }
|
||||||
|
|
||||||
|
#lösche alltes build dir
|
||||||
clean
|
clean
|
||||||
build
|
|
||||||
|
#prebuild
|
||||||
|
copy
|
||||||
set_rootdir ""
|
set_rootdir ""
|
||||||
set_libdir "/usr/lib/remaster"
|
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"
|
||||||
|
mv -v "build.deb" "release/remaster_"$version"_"$arch".deb"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -68,10 +118,13 @@ case "$1" in
|
|||||||
debug)
|
debug)
|
||||||
debug || exit 1
|
debug || exit 1
|
||||||
;;
|
;;
|
||||||
build)
|
copy)
|
||||||
build || exit 1
|
copy || exit 1
|
||||||
|
;;
|
||||||
|
build-deb)
|
||||||
|
build-deb || exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: install | clean | debug | build"
|
echo "Usage: install | clean | debug | build-deb"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
@ -6,3 +6,10 @@
|
|||||||
|
|
||||||
2018-05-10 - 1.9.3
|
2018-05-10 - 1.9.3
|
||||||
* hotfix-1.9.3
|
* hotfix-1.9.3
|
||||||
|
|
||||||
|
2018-05-12 - 2.0.0
|
||||||
|
* add feature build debian packages
|
||||||
|
* add Doc "Server Bedienung"
|
||||||
|
* split functions
|
||||||
|
* seperte config into /etc/remaster/
|
||||||
|
|
||||||
|
@ -18,5 +18,9 @@ date=`date +%Y-%m-%d`
|
|||||||
|
|
||||||
echo >> changes/remaster.md
|
echo >> changes/remaster.md
|
||||||
echo $date - $version >> changes/remaster.md
|
echo $date - $version >> changes/remaster.md
|
||||||
echo pleace update changes/remaster.md
|
editor changes/remaster.md
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f "DEBIAN/control" ] && {
|
||||||
|
sed -i "s/Version:\ .\..\../Version:\ $version_sed/g" "DEBIAN/control"
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ function check_dependency() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
check_dependency $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ function check_user() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
check_user $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ function chroot_clean() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
chroot_clean $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function chroot_initial() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
chroot_initial $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ function chroot_is_mounted() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
chroot_is_mounted $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ function chroot_sh() {
|
|||||||
chroot "$chroot_dir" /bin/bash --login -c ". /tmp/env.sh; $command"
|
chroot "$chroot_dir" /bin/bash --login -c ". /tmp/env.sh; $command"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
chroot_sh $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function chroot_umount() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
chroot_umount $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -53,13 +53,16 @@ function error_code() {
|
|||||||
22)
|
22)
|
||||||
echo "wrong filesystem"
|
echo "wrong filesystem"
|
||||||
;;
|
;;
|
||||||
|
all)
|
||||||
|
error_code
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo $'No Defined Error Code.\nPerhaps an Error ocure on a Command wich was started by this Skritp.'
|
echo $'No Defined Error Code.\nPerhaps an Error ocure on a Command wich was started by this Skritp.'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
error_code $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ function filesystem_extract() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
filesystem_extract $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ function filesystem_get_type() {
|
|||||||
echo ${fs_aTemp[9]}
|
echo ${fs_aTemp[9]}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
filesystem_get_type $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ function filesystem_pack() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
filesystem_pack $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ function iso_create() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
iso_create $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ function iso_extract() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
iso_extract $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ function on_exit() {
|
|||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
on_exit $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ function workspace_erase() {
|
|||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
workspace_erase $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#this func is standalone executable
|
||||||
[ -n "$1" ] && {
|
[ -n "$1" ] && {
|
||||||
echo param
|
xrdp $@
|
||||||
$1
|
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,3 @@ function os_update() {
|
|||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "$1" ] && {
|
|
||||||
echo param
|
|
||||||
$1
|
|
||||||
}
|
|
||||||
|
@ -7,8 +7,3 @@
|
|||||||
source <LIBDIR>/proj/ubuntu.16.04
|
source <LIBDIR>/proj/ubuntu.16.04
|
||||||
|
|
||||||
TEST2="na"
|
TEST2="na"
|
||||||
|
|
||||||
[ -n "$1" ] && {
|
|
||||||
echo param
|
|
||||||
$1
|
|
||||||
}
|
|
||||||
|
@ -7,8 +7,3 @@
|
|||||||
####################################
|
####################################
|
||||||
# . -> debian
|
# . -> debian
|
||||||
source <LIBDIR>/proj/debian
|
source <LIBDIR>/proj/debian
|
||||||
|
|
||||||
[ -n "$1" ] && {
|
|
||||||
echo param
|
|
||||||
$1
|
|
||||||
}
|
|
||||||
|
@ -5,8 +5,3 @@
|
|||||||
#ubuntu.16.04
|
#ubuntu.16.04
|
||||||
# . -> ubuntu -> debian
|
# . -> ubuntu -> debian
|
||||||
source <LIBDIR>/proj/ubuntu
|
source <LIBDIR>/proj/ubuntu
|
||||||
|
|
||||||
[ -n "$1" ] && {
|
|
||||||
echo param
|
|
||||||
$1
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#@version 1.9.3
|
#@version 2.0.0
|
||||||
#@autor 6543@obermui.de
|
#@autor 6543@obermui.de
|
||||||
#@date 2018-05-10
|
#@date 2018-05-12
|
||||||
#@licence GNUv3
|
#@licence GNUv3
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
Reference in New Issue
Block a user