automated installations (7)

Welcome to a brand new week.

The plan this week (at least till wednesday when I will be handling shit of week) is to program my own netcfg package. Before I can do that, I have to know what exactly this package is being used for.

This is a list of files (probably) generated by netcfg (I found them in netcfg.h):

#define INTERFACES_FILE "/etc/network/interfaces"
#define HOSTS_FILE "/etc/hosts"
#define HOSTNAME_FILE "/etc/hostname"
#define NETWORKS_FILE "/etc/networks"
#define RESOLV_FILE "/etc/resolv.conf"
#define DHCLIENT_CONF "/etc/dhclient.conf"
#define DHCLIENT3_CONF "/etc/dhcp3/dhclient.conf"
#define DOMAIN_FILE "/tmp/domain_name"

#define DEVNAMES "/etc/network/devnames"
#define DEVHOTPLUG "/etc/network/devhotplug"
#define STAB "/var/run/stab"


Next to that, this is what is in the netcfg package (besides the control section)

/
/usr/
/usr/lib/
/usr/lib/base-installer.d/
/usr/lib/base-installer.d/40netcfg
/etc/
/etc/network/
/etc/dhcp/
/etc/dhcp3/
/etc/dhcp3/dhclient-script
/etc/dhclient-script
/bin/
/bin/netcfg
/bin/killall.sh
/bin/ptom
/var/
/var/dhcp/


The files here have the following purpose:

/usr/lib/base-installer.d/40netcfg

Copy the generated files to /target

/etc/dhcp3/dhclient-script

/etc/dhclient-script

These scripts are the same. It's a miniature dhclient that uses netcfg (the binary)

/bin/netcfg

The binary

/bin/killall.sh

A script to kill all running DHCP clients

/bin/ptom

A symlink to the netcfg binary



Instead of replacing the code in the netcfg package, I decided I would make a new kulnet-netcfg package with all the new code. I would then remove the "installer-menu-item: 18" from netcfg and glue it behind the kulnet-netcfg package.
After doing all that, to my surprise, debian installer still loaded the first netcfg and skipped the kulnet-netcfg.

So, I've cleaned out netcfg and started making my own script.
The current problem is that there is nothing decent inside the initrd to test a connection.
I'm using netcat with a program that kills all netcats after 3 seconds in the background.