DTC sbox Chroots

 

 

This incredible piece of unfinished shit is still better than ISPConfig.

Yet. I find it hard to understand, why nothing in DTC can be thorough, well thought out, functionally complete, clean, and foremost, really WORKING?

 

root@mx:~# /usr/share/dtc/admin/update_sbox_bootstrap_copy
cp: accessing `/var/lib/dtc/sbox_copy/etc/apt': Not a directory
chroot: failed to run command `apt-get': No such file or directory
chroot: failed to run command `apt-get': No such file or directory
chroot: failed to run command `apt-get': No such file or directory
sed: can't read /var/lib/dtc/sbox_copy/etc/ssmtp/ssmtp.conf: Not a directory
sed: can't read /var/lib/dtc/sbox_copy/etc/ssmtp/ssmtp.conf: Not a directory
grep: /var/lib/dtc/sbox_copy/etc/passwd: Not a directory
/usr/share/dtc/admin/update_sbox_bootstrap_copy: 118: cannot create /var/lib/dtc/sbox_copy/etc/passwd: Directory nonexistent
grep: /var/lib/dtc/sbox_copy/etc/group: Not a directory
/usr/share/dtc/admin/update_sbox_bootstrap_copy: 118: cannot create /var/lib/dtc/sbox_copy/etc/group: Directory nonexistent

 

Now, /etc in the sbox path actually exists? How odd. Let's have a look:

 
root@mx:~# ls /var/lib/dtc/sbox_copy/etc 
/var/lib/dtc/sbox_copy/etc
root@mx:~# ls -l /var/lib/dtc/sbox_copy/etc 
-rw-r--r-- 1 dtc dtcgrp 323 Jul 31 20:44 /var/lib/dtc/sbox_copy/etc
root@mx:~# cat /var/lib/dtc/sbox_copy/etc
127.0.0.1	localhost.localdomain localhost

Yeah, some genius used empty variables, huh.

 

Even better here:

 
# If we are on a Debian system, let's bootstrap the current stable
if [ -f /etc/debian_version ] ; then
        if [ $SU = "no" ] ; then
                cp /etc/apt/sources.list ${sbox_copy_disk_path}/etc/apt
                cp /etc/hosts ${sbox_copy_disk_path}/etc
                chroot ${sbox_copy_disk_path} apt-get update
                chroot ${sbox_copy_disk_path} apt-get dist-upgrade -y --force-yes       fi

So this brickhead assumes bootstrapping works without making the apt-get binary (etc) available inside the chroot.

 

Honestly, I wish you'd just write proper design specs and leave the coding to the rest of the community.

 

 

So, after all the ranting:

 

This is what you run to set up the chroot base - delete all the crap it created, first.

/usr/share/dtc/admin/create_sbox_bootstrap_copy

 

And then you can run the update script 

# /usr/share/dtc/admin/update_sbox_bootstrap_copy
(will fetch packages etc. into the chroot)

 

Note, by default the chroots don't get any security patches or other updates and there's no provision to monitor or alert on it.

Isn't that a great idea? I'm in awe.

  • No labels