[opensuse-packaging] [EMAIL PROTECTED]: Re: [Research] No more /sbin/getcfg]

2007-07-30 Thread Christian Zoz
Hi all,

1) /sbin/getcfg* has gone! (Alpha 7)
2) /sbin/hwup has changed, no more sysconfig/hardware/hwcfg-*



1) /sbin/getcfg* has gone! (Alpha 7)


I scanned all packages and here the files that still contains a
reference to getcfg* (mostly getcfg-interface):

/etc/init.d/dhcrelay
/etc/init.d/dhcpd
/etc/init.d/ntop
/etc/preload.d/later
/etc/xen/scripts/xen-network-common.sh
/lib/mkinitrd/scripts/setup-network.sh
/sbin/SuSEfirewall2
/usr/lib/openwbem/c++providers/libomc_ip_interface_profile.so.1.0.0
/usr/share/doc/packages/ifplugd/ifplugd.init
/usr/share/doc/packages/powersave/contrib/acpi_hotkeys_Samsung_P35
/usr/share/doc/packages/yast2/network/autodocs/NetworkDevices.html

These are mostly occurences of getcfg-interface, which was used to
translate hardware descriptions into interface names. You may just
drop that:
  H=get_interface_hardware_descriptor
  I=getcfg-interface H
  use I
has to replaced by
  I=get_interface_hardware_descriptor
  use I

All configuration files that contain hardware descriptions have to be
converted. For this purpose there is
/etc/sysconfig/network/scripts/hwdesc2iface

For a sysconfig style config file you may call
  hwdesc2iface  
It converts all variables that start with variable_start. If a
variable contains multiple values all will be converted.

Example11: ifcfg-bond0
  ...
  BONDING_SLAVE_1=eth-id-...
  BONDING_SLAVE_2=pci-bus-...
  ...
Just call
  hwdesc2iface ifcfg-bond0 BONDING_SLAVE
This will convert both variables to
  BONDING_SLAVE_1=ethX
  BONDING_SLAVE_2=ethY

Example2: ifcfg-br0
  ...
  BRIDGE_PORTS="eth-id-... bus-pci-..."
  ...
Just call:
  hwdesc2iface ifcfg-br0 BRIDGE_PORTS
Result
  BRIDGE_PORTS="ethX ethY"

For other syntax of configuration files you may call hwdesc2iface to
convert the values:
[EMAIL PROTECTED]:~> hwdesc2iface id 11:de:ad:be:ef:99
eth99
[EMAIL PROTECTED]:~> hwdesc2iface bus pci :02:02.0
ath0
[EMAIL PROTECTED]:~>



2) /sbin/hwup has changed, no more sysconfig/hardware/hwcfg-*
^

There is still a small /sbin/hwup, but it does not longer
- (un)load modules
- read config files
- execute s390 specials

But it still does
- initialize devices the same way as at boot time. Give the sysfs
  devpath as argument
  hwup /sys/devices/pci\:00/...
- take down a device (hwdown) also with interface names as argument
  try 'hwdown eth0': it unbinds the device from the driver and so the
  interface will be unregistered.
- hwup accepts interface names as argument, if the device was taken
  down with hwup before. In the example above 'hwup eth0' brings your
  interface back.
- accepts the old hwup hardware descriptions.

It is a trivial script that uses /sys/bus/*/drivers/*/{un,}bind,
/sys/bus/*/devices/*/uevent and /sys/bus/*/drivers_probe. Have a look
at it if you want to learn what sysfs can do for you. Forget 'rmmod'
and 'modprobe -r', just unbind the device.

-- 

ciao, christian

睡眠不足はいい仕事の敵だ。

- End forwarded message -

-- 

ciao, christian

睡眠不足はいい仕事の敵だ。
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [opensuse-packaging] [EMAIL PROTECTED]: Re: [Research] No more /sbin/getcfg]

2007-07-31 Thread Andreas Jaeger
Christian Zoz <[EMAIL PROTECTED]> writes:

> Hi all,
>
> 1) /sbin/getcfg* has gone! (Alpha 7)

It came too late for Alpha7, your change was not checked in yet,

Andreas
-- 
 Andreas Jaeger, Director Platform / openSUSE, [EMAIL PROTECTED]
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


pgp2WTcPxjVNM.pgp
Description: PGP signature