example in debian template

This commit is contained in:
6543 2018-05-21 16:25:43 +02:00
parent 7601e2b93f
commit 15f5ad5fab

View File

@ -13,7 +13,7 @@ project_relation="debian"




#tools_add [chroot_dir] [tools_list] #tools_add [chroot_dir] [tools_list]
function tools_add() { function tools_add-debian() {
echo "add tools ... " echo "add tools ... "
#$1 = chroot directory #$1 = chroot directory
chroot_dir="$1" chroot_dir="$1"
@ -24,9 +24,10 @@ function tools_add() {
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:" 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" echo "done"
} }
alias tools_add="tools_add-debian"


#os_update [chroot_dir] #os_update [chroot_dir]
function os_update() { function os_update-debian() {
echo "updating os ... " echo "updating os ... "
#$1 = chroot directory #$1 = chroot directory


@ -39,9 +40,10 @@ function os_update() {


echo "done" echo "done"
} }
alias os_update="os_update-debian"


#proxy_enable [chroot_dir] [proxy_host] [proxy_port] #proxy_enable [chroot_dir] [proxy_host] [proxy_port]
function proxy_enable() { function proxy_enable-debian() {
echo -n "enable proxy ... " echo -n "enable proxy ... "


chroot_dir="$1" chroot_dir="$1"
@ -77,9 +79,10 @@ function proxy_enable() {
fi fi
fi fi
} }
alias proxy_enable="proxy_enable-debian"


#dns_set [chroot_dir] [domain] [nameserver] #dns_set [chroot_dir] [domain] [nameserver]
function dns_set() { function dns_set-debian() {
echo -n "set dns config ... " echo -n "set dns config ... "


rm "$chroot_dir/etc/resolv.conf" rm "$chroot_dir/etc/resolv.conf"
@ -92,3 +95,4 @@ function dns_set() {


echo "done" echo "done"
} }
alias dns_set="dns_set-debian"