Bug 64622 - RFE: un-deprecate, and add command line variant
Summary: RFE: un-deprecate, and add command line variant
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: ksconfig
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brent Fox
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-08 19:24 UTC by R P Herrold
Modified: 2007-04-18 16:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-11-28 04:47:02 UTC
Embargoed:


Attachments (Terms of Use)

Description R P Herrold 2002-05-08 19:24:49 UTC
Per Kickstart mailing list today:

From: Brent Fox <bfox>
Reply-To: kickstart-list
To: kickstart-list
Subject: [ks] Re: mkkickstart deprecated

> And please, Red Hat, bring back a command line tool to create a ks.cfg
> template!

Hi guys...I wrote ksconfig.  I wasn't aware that mkkickstart was being
removed, so I didn't replicate the command line functionality.  But I'd
be more than happy to add it since it seems like you guys have a need
for it.  Can you open a bug against ksconfig as an RFE?  I'll try to get
it done by the next release.

Cheers,
  Brent

Comment 1 Need Real Name 2002-05-09 18:13:30 UTC
Maintaining a command-line utility to create kickstart files is important to
our work here.  We find the command-line utility to be easier to use and control
than a GUI tool.

Comment 2 Brent Fox 2002-05-09 18:17:28 UTC
So what kind of features are you looking for in a command-line tool?

Do you want it to just auto-probe the machine and write a kickstart file based
on what it finds, or are you wanting more interactivity?

Comment 3 Bill McCarty 2002-06-23 06:06:48 UTC
I just discovered the lack of a CLI tool for making configurations. I simply 
want to add my voice to that of others. 

We don't run X on servers. So, we can't run ksconfig on servers. But, being 
able to automatically generate a kickstart file is important. Please consider 
this RFE for the next release. Thanks!

Comment 4 R P Herrold 2002-06-23 07:37:01 UTC
I had not gotten back to this -- I am sorry for the delay.

By way of implementation sequence, I would ask:

1.  That it be able to dump the running config of package list, possibly with
comments breaking by Group, and wrapped in the surrounding headers like
mkkickstart (and ksconfig) did/do.

   rpm -qa --qf '%{Group}\t#%{Name}\n'| sort  
type content, and then post-processessing to split on '*' and put col 1 into a
comment header -- maybe adding this:
  rpm -qa --qf '%{Group}\t#%{Name}\t#%{Size}\n'| sort
as the default sort order -- but a -z (size) option would also allow thoughtful
pruning

===========================

2  as phase 2, there are great ready made modules in:

bash-2.05a$ rpm -ql ksconfig | grep y$
/usr/share/ksconfig/auth.py
/usr/share/ksconfig/basic.py
/usr/share/ksconfig/bootloader.py
/usr/share/ksconfig/checklist.py
/usr/share/ksconfig/firewall.py
/usr/share/ksconfig/install.py
/usr/share/ksconfig/ksconfig.py
/usr/share/ksconfig/ksconfig_gui.py
/usr/share/ksconfig/network.py
/usr/share/ksconfig/packages.py
/usr/share/ksconfig/partWindow.py
/usr/share/ksconfig/partition.py
/usr/share/ksconfig/raidWindow.py
/usr/share/ksconfig/savedialog.py
/usr/share/ksconfig/savefile.py
/usr/share/ksconfig/scripts.py
/usr/share/ksconfig/xconfig.py
bash-2.05a$

which contain a nice itemization of the options -- it may be expeditious to just
add a -nox option and see what breaks -- and with that in hand, keep a common
codebase.  Obciously there is a wide array of radio and check boxes, and
re-writing them all is much easier if one can call the .py with  a --nox  and be
done with it.

3.  Going forward, next I am thinking of a .rc file, similar to rpmrc, to
isolate default options, and make preparation of the man page easier (the -nox
effort pays off here, too).

and so:

4.  is the doco -- man pages at first, extension of the general .fs dogo for all
those options, such as the ability to use the DISPLAY variable, come to mind.

and howto's and sample configs, and a clear API for each .py module, so they can
be extended in ways that neither you or I can vision -=- a true small competent
*nix tool, on the stature of RPM.

What do YOU think?

-- Russ Herrold


Comment 5 R P Herrold 2002-07-06 22:16:34 UTC
 just an update -- with the release of Limbo - the post RH 7.3 beta for the next version ... there is a move the 
an XML'ized comps -- This may regularize the console tool generation of the anaconda description file.  Still 
wanted ...

Comment 6 Patrick C. F. Ernzer 2002-07-12 14:51:36 UTC
I'd like to add a feature to the CLI wish list:

it would be really nice if the CLI version could extract existing partitioning
info and generate the required lines for the ks.cfg.

Comment 7 Brent Fox 2002-08-11 01:53:31 UTC
Ran out of time for this release, so I'm going to defer.  I'm sorry that I
didn't get it done in time, but we'll get it next time.

Comment 8 Brent Fox 2002-11-27 21:12:10 UTC
Ok, I'm working on this now.

Comment 9 Brent Fox 2002-11-28 02:41:08 UTC
I've got the basics of it working now, but I'm not too sure about trying to
replicate the partition information.  When you start considering machines that
have RAID and/or LVM and/or a mixture of IDE and SCSI drives, recreating the
parition table starts getting really complicated.  

If I recall correctly, mkkickstart never did that, so I don't consider this
necessary to reproduce the functionality of mkkickstart.  I agree that this
would be a useful feature, but I don't have the time required to put on it.

Comment 10 R P Herrold 2002-11-28 04:46:55 UTC
Here is a safe and timely quickie.  How about just dump: 

fdisk -l
and cat /etc/fstab and /etc/raidtab

with a leading "#" prepended, and leave it at that.

---------------------------

This works for /etc/fstab ...

for i in `cat /etc/fstab | grep -v ^# | awk -F"#" {'print $1'} | tr ' ' '#'` ;
do echo -n "#" ; echo " $i" | tr '#' ' ' ; done

produces:

# /dev/hda2               /                       ext3    defaults        1 1
# /dev/hda1               /boot                   ext3    defaults        1 2
# none                    /dev/pts                devpts  gid=5,mode=620  0 0
# none                    /proc                   proc    defaults        0 0
# none                    /dev/shm                tmpfs   defaults        0 0
# /dev/hda3               swap                    swap    defaults        0 0
# /dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
# /dev/hdb3    /mnt/73/                       ext3    noauto,defaults     1 1
# /dev/hdb1    /mnt/73/boot                   ext3    noauto,defaults     1 2

----------------------------

The gnarly awk and tr is to get rid of trailing same line comments, and to
preserve whitespace




Comment 11 Brent Fox 2002-12-11 03:54:58 UTC
I'm not going to get to the partitioning stuff this time around.  I'm going to
close this report since I've gotten most of what was requested implemented. 
redhat-config-kickstart-2.3.5-1 should appear in Rawhide in the next day or so.


Note You need to log in before you can comment on or make changes to this bug.