Guest Ozblade Posted November 5, 2004 Share Posted November 5, 2004 I'm trying to automate the post install of Mandrake 9.2 for a support lab at my office. I'm not a scripting wizard, but here's what I'm trying to execute (some censorship is required...): # install kernel source mkdir /mnt/test mount -t nfs -o nolock xxx.xxx.24.1:/linuxset/test /mnt/test cd /mnt/test cp kernel-source*.rpm . rpm -Uvh kernel-source*.rpm cd .. umount /mnt/test # find IP and host name IP=`/mnt/sbin/ifconfig eth0 | grep inet | cut -b 21-34` export IP MYHOST=`/mnt/usr/bin/nslookup -sil $IP | grep name | cut -b 34-` export MYHOST # Set static IP NETWORK=`/bin/echo $IP | cut -d. -f 1,2,3` export NETWORK /bin/cat - > /mnt/etc/sysconfig/network-scripts/ifcfg-eth0 << EOF DEVICE=eth0 BOOTPROTO=static IPADDR=$IP NETMASK=255.255.255.0 NETWORK=${NETWORK}.0 BROADCAST=${NETWORK}.255 GATEWAY=${NETWORK}.250 ONBOOT=yes EOF /bin/cat - > /mnt/etc/sysconfig/network << EOF NETWORKING=yes GATEWAYDEV=eth0 NISDOMAIN=dialogic.com HOSTNAME=$MYHOST EOF # Install DIL software mkdir /mnt/temploc mount -t nfs -o nolock xxx.xxx.24.1:/linuxset /mnt/temploc mv /mnt/etc/rc.local /mnt/tmp cd /mnt/temploc/test cp install_dil_sw.pl /mnt/tmp cp rc.localman /mnt/etc/rc.local cd / umount /mnt/temploc Now I've tried this a hundred ways, both directly in the 'postinstall' field, calling it as seperate script, like "bash <script>", etc. And the documentation isn't all that inspiring when it comes to post installalation examples. a modified version of this script is used for all my redhat builds. Any ideas? [moved from Installing Mandrake by spinynorman - welcome aboard :)] Link to comment Share on other sites More sharing options...
Guest Ozblade Posted November 8, 2004 Share Posted November 8, 2004 A more pressing issue is that I cannot run ANY post install. Even a simple echo to a log doesn't function. I noticed the ddebug.log has no mention of the postInstall steps. Is this normal? here's my auto_inst.cfg: #!/usr/bin/perl -cw # # Special file generated by ``drakautoinst''. # # 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). $o = { 'useSupermount' => '1', 'mkbootdisk' => 0, 'security_user' => '', 'netc' => { 'ZEROCONF_HOSTNAME' => undef, 'DHCP' => 'yes', 'NET_DEVICE' => 'eth0', 'NETWORKING' => 'yes' }, 'security' => 2, 'locale' => { 'country' => 'US', 'utf8' => '1', 'lang' => 'en_US', 'langs' => { 'en_US' => 1 } }, 'users' => [ { 'home' => '/home/hldavis', 'name' => 'hldavis', 'gid' => 501, 'uid' => 501, 'realname' => 'Harry Davis', 'icon' => 'default', 'pw' => '$1$A7f0q3W0$SubVEbzKwQeCg.sTjAPRB/', 'groups' => [], 'shell' => '/bin/bash' } ], 'partitioning' => { 'clearall' => 1, 'auto_allocate' => 1, 'eraseBadPartitions' => 0 }, 'partitions' => [ { 'size' => 96327, 'type' => 1155, 'mntpoint' => '/boot', }, { 'size' => 524097, 'type' => 130, 'mntpoint' => 'swap', }, { 'size' => 4192776, 'type' => 1155, 'ratio' => 100, 'mntpoint' => '/', }, ], 'authentication' => { 'shadow' => 1, 'md5' => 1, 'local' => undef }, 'autoExitInstall' => 1, 'superuser' => { 'home' => '/root', 'gid' => '0', 'uid' => '0', 'realname' => 'root', 'pw' => '$1$apXf85V8$cvBUlv0oXtayvBaInWxoK.', 'shell' => '/bin/bash' }, 'printer' => { 'DEFAULT' => undef, 'BROWSEPOLLPORT' => undef, 'SPOOLER' => undef, 'MANUALCUPSCONFIG' => undef, 'BROWSEPOLLADDR' => undef, 'configured' => {} }, 'default_packages' => [ 'locales', 'locales-en', 'msec', 'perl', 'devfsd', 'kernel-enterprise-2.4.22.10mdk', 'vim-enhanced', 'urw-fonts', 'bootsplash', 'mandrake_desk', 'XFree86', 'eject', 'gnupg', 'wget', 'urpmi', 'hotplug', 'ghostscript-module-X', 'mandrake-mime', 'gurpmi', 'userdrake', 'aspell', 'python', 'binutils', 'lynx', 'libstdc++5-devel', 'aspell-en', 'efax', 'gcc', 'procmail', 'psutils', 'libtool', 'gnucash', 'mtools', 'perl-libwww-perl', 'ImageMagick', 'gimp', 'groff', 'mailx', 'openssh-clients', 'XFree86-server', 'lsb', 'm4', 'menudrake', 'qiv', 'rsync', 'rxvt', 'sharutils', 'libncurses5-devel', 'at', 'autoconf', 'automake', 'coreutils-doc', 'cvs', 'drakconf', 'drakfirsttime', 'dump', 'flphoto', 'fonts-ttf-vera', 'ftp-client-krb5', 'gnucash-hbci', 'gnucash-ofx', 'grub', 'gtk-engines2', 'gtkam', 'harddrake', 'hdparm', 'hexedit', 'icewm-light', 'info', 'ldetect', 'ltrace', 'man', 'metamail', 'mkxauth', 'myspell-en_AU', 'myspell-en_CA', 'myspell-en_GB', 'myspell-en_US', 'myspell-hyph-en', 'nfs-utils-clients', 'open', 'openssh-server', 'rfbdrake', 'rpmdrake', 'samba-client', 'samba-server', 'slocate', 'strace', 'sudo', 'telnet-client-krb5', 'tmdns', 'tmpwatch', 'traceroute', 'words', 'zcip', 'zip', 'OpenOffice.org', 'OpenOffice.org-l10n-en', 'gdb', 'tkinter', 'bind-utils', 'gnome-applets', 'gphoto2', 'nautilus', 'gcc-c++', 'gnome-control-center', 'gnome-panel', 'gnome-terminal', 'metacity', 'XFree86-75dpi-fonts', 'enscript', 'galeon', 'gettext-devel', 'giftrans', 'ispell-en', 'patch', 'recode', 'LinNeighborhood', 'bison', 'dia', 'emacs-X11', 'evolution', 'file-roller', 'flex', 'fonts-ttf-decoratives', 'fonts-ttf-west_european', 'gaim', 'galaxy-gnome', 'gconf-editor', 'gdm', 'gedit', 'gftp', 'gnome-audio', 'gnome-media', 'gnome-pim', 'gnome-utils', 'gnome-vfs-extras', 'gnomemeeting', 'gnuplot', 'grub-doc', 'gtk-engines', 'gucharmap', 'lftp', 'lilo-doc', 'man-pages', 'mirrordir', 'mrproject', 'nfs-utils', 'pan', 'perl-GTK-Glade', 'perl-GTK-Gnome', 'perl-Term-Readline-Gnu', 'perl-devel', 'rcs', 'rdist', 'rgrep', 'rpm-build', 'screem', 'screen', 'symlinks', 'texinfo', 'totem', 'webmin', 'xchat', 'xlockmore', 'OpenOffice.org-help-en', 'gtk-themes', 'mandrake_doc-en' ], 'netcnx' => { 'lan' => {}, 'type' => 'lan' }, 'X' => { 'resolution_wanted' => '1024x768', 'default_depth' => 16 }, 'manualFstab' => [], 'libsafe' => 0, 'timezone' => { 'ntp' => undef, 'timezone' => 'America/New_York', 'UTC' => 1 }, 'mouse' => { 'XMOUSETYPE' => 'PS/2', 'EMULATEWHEEL' => undef, 'name' => 'Standard', 'nbuttons' => 2, 'type' => 'PS/2', 'MOUSETYPE' => 'ps/2', 'device' => 'psaux' }, 'keyboard' => { 'GRP_TOGGLE' => '', 'KBCHARSET' => 'C', 'KEYBOARD' => 'us', 'unsafe' => 1 }, 'intf' => { 'eth0' => { 'DEVICE' => 'eth0', 'NETMASK' => '255.255.255.0', 'BROADCAST' => '', 'BOOTPROTO' => 'dhcp', 'NETWORK' => '', 'ONBOOT' => 'yes' }, }, 'postInstall' => " cd /mnt/tmp wget ftp://146.152.70.155/pub/Mandrake9.2/misc/rc.localman cp /mnt/tmp/rc.localman /mnt/etc/rc.local " }; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now