Last modified 2 years ago
#!/usr/bin/perl -cw
#
# You should check the syntax of this file before using it in an auto-install.
# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
# (note the '#!/usr/bin/perl -cw' on the first line).
#
# This is an auto_inst file I use as a base to autodeploy a Mandriva 2010.0 on a old HP NetServer LP1000
$o = {
'libsafe' => 0,
'runlevel' => 3,
'security_user' => 'bruno_at_musique-ancienne.org',
'netc' => {
'NETWORKING' => 'yes',
'DOMAINNAME2' => undef,
'GATEWAY' => '172.16.18.254',
'DOMAINNAME3' => undef,
'dnsServer3' => undef,
'DOMAINNAME' => 'musique-ancienne.org',
'dnsServer' => '192.168.18.155',
'dnsServer2' => '172.16.18.200',
'FORWARD_IPV4' => 'false'
},
'bootloader' => {
'methods' => {
'grub' => 1,
'lilo' => 'lilo-menu',
},
'crushMbr' => 1,
'timeout' => '5',
},
'default_packages' => [
'locales',
'locales-en',
'locales-fr',
'lslk',
'python',
'msec',
'fontconfig',
'vim-enhanced',
'grub',
'wget',
'gnupg',
'curl',
'eject',
'rpmtools',
'urpmi',
'links',
'postfix',
'openssh',
'pciutils',
'snort',
'openssh-clients',
'zip',
'dmidecode',
'hdparm',
'net-snmp-mibs',
'net-snmp-utils',
'bind-utils',
'dosfstools',
'iptables',
'mtools',
'openssh-server',
'nail',
'mutt',
'nmap',
'ntp',
'ntp-client',
'strace',
'traceroute',
'bc',
'dhcp-client',
'dhcp-relay',
'dump',
'hexedit',
'iptraf',
'iproute2-doc',
'lftp',
'ncftp',
'logcheck',
'lm_sensors',
'lshw',
'ncftp',
'numlock',
'shorewall',
'shorewall-doc',
'slocate',
'sudo',
'tcpdump',
'vlock',
'lsof',
'squid',
'squidguard',
'ethtool',
'binutils',
'psacct',
'mondo',
],
'useSupermount' => 0,
'users' => [
{
'icon' => 'default',
'pw' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'uid' => 501,
'name' => 'admin',
'realname' => 'admin',
'groups' => [
'rpm',
'wheel',
'adm',
'ntools'
],
'shell' => '/bin/bash',
'home' => '/home/admin',
'gid' => 501
}
],
'locale' => {
'country' => 'FR',
'IM' => undef,
'lang' => 'fr',
'langs' => {
'en_US' => 1,
'fr' => 1
},
'utf8' => ''
},
'authentication' => {
'shadow' => 1,
'local' => 1,
'md5' => 1
},
'partitions' => [
{
'fs_type' => 'ext4',
'mntpoint' => '/',
# Size in in 512k blocks
'size' => 1012032
},
{
'fs_type' => 'swap',
'mntpoint' => 'swap',
'size' => 1044162
},
{
'fs_type' => 'ext4',
'mntpoint' => '/usr',
'size' => 8136767
},
{
'fs_type' => 'ext4',
'mntpoint' => '/tmp',
'size' => 610407
},
{
'fs_type' => 'ext4',
'mntpoint' => '/var',
'size' => 8177022
},
{
'fs_type' => 'ext4',
'mntpoint' => '/home/squid/var/spool/squid',
'size' => 20466747
},
{
'fs_type' => 'ext4',
'mntpoint' => '/home',
'size' => 31672177
}
],
'netcnx' => {
'NET_DEVICE' => undef,
'type' => 'lan',
'NET_INTERFACE' => undef
},
'superuser' => {
'pw' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'realname' => 'root',
'uid' => '0',
'shell' => '/bin/bash',
'home' => '/root',
'gid' => '0'
},
'mouse' => {
'XMOUSETYPE' => 'ExplorerPS/2',
'name' => 'Any PS/2 & USB mice',
'EMULATEWHEEL' => undef,
'device' => 'input/mice',
'type' => 'Universal',
'nbuttons' => 7,
'MOUSETYPE' => 'ps/2'
},
'autoExitInstall' => '1',
'excludedocs' => '1',
'X' => { 'disabled' => '1' }, #- disable auto-configuration that may install unwanted packages
'keyboard' => {
'GRP_TOGGLE' => '',
'KBCHARSET' => 'utf-8',
'KEYBOARD' => 'us_intl'
},
'manualFstab' => [],
'timezone' => {
'ntp' => undef,
'timezone' => 'Europe/Paris',
'UTC' => 1
},
'services' => [
'crond',
'iptables',
'keytable',
'kheader',
'lm_sensors',
'network',
'partmon',
'postfix',
'shorewall',
'ntpd',
'sshd',
'squid',
'squidguard',
'syslog'
],
'intf' => {
'eth0' => {
'BOOTPROTO' => 'dhcp',
'HWADDR' => undef,
'DEVICE' => 'eth0',
'BROADCAST' => '',
'WIRELESS_ENC_KEY' => undef,
'NETWORK' => '',
'ONBOOT' => 'yes',
'METRIC' => 10
},
},
{
'eth1' => {
'BOOTPROTO' => 'dhcp',
'HWADDR' => undef,
'DEVICE' => 'eth1',
'BROADCAST' => '',
'WIRELESS_ENC_KEY' => undef,
'NETWORK' => '',
'ONBOOT' => 'yes',
'METRIC' => 10
}
},
'miscellaneous' => {
'numlock' => 1
},
'partitioning' => {
'auto_allocate' => 1,
'clearall' => 1,
'eraseBadPartitions' => 1
},
'security' => 5,
'interactiveSteps' => [
],
'postInstall' => '
#
# Run the postinstall script
#
exec > /root/drakx/postinstall.log 2>&1
cd /root/drakx
lftp -e "get /pub/ks/rc.server ; quit" -u ftp,bidon ftp.musique-ancienne.org
bash -x ./rc.server
tar cf /tmp/drak-server.tar /root/drakx
lftp -e "put -O /pub/incoming /tmp/drak-server.tar ; quit" -u ftp,bidon ftp.musique-ancienne.org
'
};
