home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
sysconfig
/
network
/
scripts
/
drop-hotplug-symlink.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
2006-11-29
|
405b
|
21 lines
#!/bin/bash
# Drop the compatibility symbolic link in /etc/sysconfig/network,
# usually as ifcfg-eth-pcmcia -> ifcfg-eth-pcmcia-0,
path=${root}/etc/sysconfig/network
types="eth-pcmcia eth-usb tr-pcmcia tr-usb"
# path=/tmp/n
cd "$path"
for t in $types; do
f="ifcfg-$t"
test -L "$f" || continue
s="$(readlink "$f")"
test -f "$s" || continue
echo "$f -> $s"
rm -f "$f"
mv -f "$s" "$f"
done