Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
sbin /
[ HOME SHELL ]
Name
Size
Permission
Action
aa-remove-unknown
3
KB
-rwxr-xr-x
aa-status
62.62
KB
-rwxr-xr-x
aa-teardown
137
B
-rwxr-xr-x
accessdb
14.55
KB
-rwxr-xr-x
acpid
55.02
KB
-rwxr-xr-x
addgnupghome
3
KB
-rwxr-xr-x
addgroup
37.35
KB
-rwxr-xr-x
add-shell
1.03
KB
-rwxr-xr-x
adduser
37.35
KB
-rwxr-xr-x
agetty
55.56
KB
-rwxr-xr-x
alsa
5.45
KB
-rwxr-xr-x
alsabat-test
4.04
KB
-rwxr-xr-x
alsactl
119.55
KB
-rwxr-xr-x
alsa-info
28.01
KB
-rwxr-xr-x
anacron
34.17
KB
-rwxr-xr-x
apparmor_parser
1.48
MB
-rwxr-xr-x
apparmor_status
62.62
KB
-rwxr-xr-x
applygnupgdefaults
2.17
KB
-rwxr-xr-x
aptd
1.36
KB
-rwxr-xr-x
arp
61.61
KB
-rwxr-xr-x
arpd
26.33
KB
-rwxr-xr-x
arptables
219.04
KB
-rwxr-xr-x
arptables-nft
219.04
KB
-rwxr-xr-x
arptables-nft-restore
219.04
KB
-rwxr-xr-x
arptables-nft-save
219.04
KB
-rwxr-xr-x
arptables-restore
219.04
KB
-rwxr-xr-x
arptables-save
219.04
KB
-rwxr-xr-x
aspell-autobuildhash
13.4
KB
-rwxr-xr-x
avahi-autoipd
42.23
KB
-rwxr-xr-x
avahi-daemon
150.51
KB
-rwxr-xr-x
badblocks
34.32
KB
-rwxr-xr-x
biosdecode
23.2
KB
-rwxr-xr-x
blkdeactivate
15.97
KB
-rwxr-xr-x
blkdiscard
22.38
KB
-rwxr-xr-x
blkid
50.41
KB
-rwxr-xr-x
blkzone
34.38
KB
-rwxr-xr-x
blockdev
30.38
KB
-rwxr-xr-x
bluetoothd
1.14
MB
-rwxr-xr-x
bpftool
1.58
KB
-rwxr-xr-x
bridge
92.49
KB
-rwxr-xr-x
brltty
1012.04
KB
-rwxr-xr-x
brltty-setup
1.38
KB
-rwxr-xr-x
capsh
30.3
KB
-rwxr-xr-x
cfdisk
94.73
KB
-rwxr-xr-x
cgdisk
150.48
KB
-rwxr-xr-x
chat
34.31
KB
-rwxr-xr-x
chcpu
30.38
KB
-rwxr-xr-x
chgpasswd
58.13
KB
-rwxr-xr-x
chmem
34.38
KB
-rwxr-xr-x
chpasswd
54.16
KB
-rwxr-xr-x
chroot
38.51
KB
-rwxr-xr-x
cpgr
48.29
KB
-rwxr-xr-x
cppw
48.29
KB
-rwxr-xr-x
cracklib-check
14.15
KB
-rwxr-xr-x
cracklib-format
231
B
-rwxr-xr-x
cracklib-packer
14.15
KB
-rwxr-xr-x
cracklib-unpacker
14.15
KB
-rwxr-xr-x
create-cracklib-dict
990
B
-rwxr-xr-x
cron
50.58
KB
-rwxr-xr-x
ctrlaltdel
14.38
KB
-rwxr-xr-x
cupsaccept
14.3
KB
-rwxr-xr-x
cups-browsed
194.7
KB
-rwxr-xr-x
cupsctl
14.38
KB
-rwxr-xr-x
cupsd
470.84
KB
-rwxr-xr-x
cupsdisable
14.3
KB
-rwxr-xr-x
cupsenable
14.3
KB
-rwxr-xr-x
cupsfilter
42.59
KB
-rwxr-xr-x
cupsreject
14.3
KB
-rwxr-xr-x
dcb
80.52
KB
-rwxr-xr-x
ddns-confgen
26.3
KB
-rwxr-xr-x
debugfs
229.8
KB
-rwxr-xr-x
delgroup
16.11
KB
-rwxr-xr-x
deluser
16.11
KB
-rwxr-xr-x
depmod
166.36
KB
-rwxr-xr-x
devlink
142.86
KB
-rwxr-xr-x
dhclient
442.66
KB
-rwxr-xr-x
dhclient-script
15.92
KB
-rwxr-xr-x
dmidecode
122.98
KB
-rwxr-xr-x
dmsetup
171.02
KB
-rwxr-xr-x
dmstats
171.02
KB
-rwxr-xr-x
dnsmasq
480.24
KB
-rwxr-xr-x
dosfsck
82.38
KB
-rwxr-xr-x
dosfslabel
38.38
KB
-rwxr-xr-x
dpkg-preconfigure
3.58
KB
-rwxr-xr-x
dpkg-reconfigure
4.38
KB
-rwxr-xr-x
dumpe2fs
30.31
KB
-rwxr-xr-x
e2freefrag
14.3
KB
-rwxr-xr-x
e2fsck
351.84
KB
-rwxr-xr-x
e2image
42.31
KB
-rwxr-xr-x
e2label
102.55
KB
-rwxr-xr-x
e2mmpstatus
30.31
KB
-rwxr-xr-x
e2scrub
7.13
KB
-rwxr-xr-x
e2scrub_all
5.27
KB
-rwxr-xr-x
e2undo
22.3
KB
-rwxr-xr-x
e4crypt
30.38
KB
-rwxr-xr-x
e4defrag
30.3
KB
-rwxr-xr-x
ebtables
219.04
KB
-rwxr-xr-x
ebtables-nft
219.04
KB
-rwxr-xr-x
ebtables-nft-restore
219.04
KB
-rwxr-xr-x
ebtables-nft-save
219.04
KB
-rwxr-xr-x
ebtables-restore
219.04
KB
-rwxr-xr-x
ebtables-save
219.04
KB
-rwxr-xr-x
faillock
14.15
KB
-rwxr-xr-x
fatlabel
38.38
KB
-rwxr-xr-x
fdisk
110.42
KB
-rwxr-xr-x
filefrag
18.32
KB
-rwxr-xr-x
findfs
14.38
KB
-rwxr-xr-x
fixparts
58.48
KB
-rwxr-xr-x
fsck
42.42
KB
-rwxr-xr-x
fsck.cramfs
30.44
KB
-rwxr-xr-x
fsck.ext2
351.84
KB
-rwxr-xr-x
fsck.ext3
351.84
KB
-rwxr-xr-x
fsck.ext4
351.84
KB
-rwxr-xr-x
fsck.fat
82.38
KB
-rwxr-xr-x
fsck.minix
54.41
KB
-rwxr-xr-x
fsck.msdos
82.38
KB
-rwxr-xr-x
fsck.vfat
82.38
KB
-rwxr-xr-x
fsfreeze
14.38
KB
-rwxr-xr-x
fstab-decode
18.3
KB
-rwxr-xr-x
fstrim
42.38
KB
-rwxr-xr-x
gdisk
174.48
KB
-rwxr-xr-x
gdm3
374.7
KB
-rwxr-xr-x
genl
90.44
KB
-rwxr-xr-x
getcap
14.3
KB
-rwxr-xr-x
getpcaps
14.3
KB
-rwxr-xr-x
getty
55.56
KB
-rwxr-xr-x
getweb
13.66
KB
-rwxr-xr-x
gnome-menus-blacklist
2.23
KB
-rwxr-xr-x
groupadd
66.91
KB
-rwxr-xr-x
groupdel
62.73
KB
-rwxr-xr-x
groupmems
54.19
KB
-rwxr-xr-x
groupmod
66.82
KB
-rwxr-xr-x
grpck
58.13
KB
-rwxr-xr-x
grpconv
50.01
KB
-rwxr-xr-x
grpunconv
50.01
KB
-rwxr-xr-x
grub-bios-setup
941.42
KB
-rwxr-xr-x
grub-install
1.15
MB
-rwxr-xr-x
grub-macbless
929.11
KB
-rwxr-xr-x
grub-mkconfig
8.6
KB
-rwxr-xr-x
grub-mkdevicemap
215.7
KB
-rwxr-xr-x
grub-probe
941.36
KB
-rwxr-xr-x
grub-reboot
4.73
KB
-rwxr-xr-x
grub-set-default
3.47
KB
-rwxr-xr-x
halt
1.06
MB
-rwxr-xr-x
hdparm
139.43
KB
-rwxr-xr-x
hwclock
50.5
KB
-rwxr-xr-x
iconvconfig
30.4
KB
-rwxr-xr-x
ifconfig
77.17
KB
-rwxr-xr-x
init
1.76
MB
-rwxr-xr-x
insmod
166.36
KB
-rwxr-xr-x
installkernel
2.6
KB
-rwxr-xr-x
install-sgmlcatalog
4.44
KB
-rwxr-xr-x
invoke-rc.d
16.12
KB
-rwxr-xr-x
ip
702.05
KB
-rwxr-xr-x
ip6tables
219.04
KB
-rwxr-xr-x
ip6tables-apply
6.89
KB
-rwxr-xr-x
ip6tables-legacy
96.95
KB
-rwxr-xr-x
ip6tables-legacy-restore
96.95
KB
-rwxr-xr-x
ip6tables-legacy-save
96.95
KB
-rwxr-xr-x
ip6tables-nft
219.04
KB
-rwxr-xr-x
ip6tables-nft-restore
219.04
KB
-rwxr-xr-x
ip6tables-nft-save
219.04
KB
-rwxr-xr-x
ip6tables-restore
219.04
KB
-rwxr-xr-x
ip6tables-restore-translate
219.04
KB
-rwxr-xr-x
ip6tables-save
219.04
KB
-rwxr-xr-x
ip6tables-translate
219.04
KB
-rwxr-xr-x
ipmaddr
18.3
KB
-rwxr-xr-x
ippeveprinter
178.38
KB
-rwxr-xr-x
ipp-usb
5.18
MB
-rwxr-xr-x
iptables
219.04
KB
-rwxr-xr-x
iptables-apply
6.89
KB
-rwxr-xr-x
iptables-legacy
96.95
KB
-rwxr-xr-x
iptables-legacy-restore
96.95
KB
-rwxr-xr-x
iptables-legacy-save
96.95
KB
-rwxr-xr-x
iptables-nft
219.04
KB
-rwxr-xr-x
iptables-nft-restore
219.04
KB
-rwxr-xr-x
iptables-nft-save
219.04
KB
-rwxr-xr-x
iptables-restore
219.04
KB
-rwxr-xr-x
iptables-restore-translate
219.04
KB
-rwxr-xr-x
iptables-save
219.04
KB
-rwxr-xr-x
iptables-translate
219.04
KB
-rwxr-xr-x
iptunnel
18.3
KB
-rwxr-xr-x
irqbalance
66.86
KB
-rwxr-xr-x
irqbalance-ui
34.38
KB
-rwxr-xr-x
isosize
14.38
KB
-rwxr-xr-x
ispell-autobuildhash
15.56
KB
-rwxr-xr-x
iucode-tool
58.34
KB
-rwxr-xr-x
iucode_tool
58.34
KB
-rwxr-xr-x
iwconfig
34.23
KB
-rwxr-xr-x
iwevent
22.23
KB
-rwxr-xr-x
iwgetid
14.23
KB
-rwxr-xr-x
iwlist
38.38
KB
-rwxr-xr-x
iwpriv
18.23
KB
-rwxr-xr-x
iwspy
14.15
KB
-rwxr-xr-x
kbdrate
18.16
KB
-rwxr-xr-x
kerneloops
30.15
KB
-rwxr-xr-x
killall5
30.38
KB
-rwxr-xr-x
ldattach
26.38
KB
-rwxr-xr-x
ldconfig
387
B
-rwxr-xr-x
ldconfig.real
1.16
MB
-rwxr-xr-x
locale-gen
4.29
KB
-rwxr-xr-x
logrotate
102.24
KB
-rwxr-xr-x
logsave
14.16
KB
-rwxr-xr-x
losetup
70.52
KB
-rwxr-xr-x
lpadmin
34.3
KB
-rwxr-xr-x
lpc
14.35
KB
-rwxr-xr-x
lpinfo
14.3
KB
-rwxr-xr-x
lpmove
14.3
KB
-rwxr-xr-x
lsmod
166.36
KB
-rwxr-xr-x
lspcmcia
22.37
KB
-rwxr-xr-x
make-ssl-cert
6.65
KB
-rwxr-xr-x
mii-tool
26.73
KB
-rwxr-xr-x
mkdosfs
50.83
KB
-rwxr-xr-x
mke2fs
130.62
KB
-rwxr-xr-x
mkfs
14.38
KB
-rwxr-xr-x
mkfs.bfs
22.38
KB
-rwxr-xr-x
mkfs.cramfs
34.32
KB
-rwxr-xr-x
mkfs.ext2
130.62
KB
-rwxr-xr-x
mkfs.ext3
130.62
KB
-rwxr-xr-x
mkfs.ext4
130.62
KB
-rwxr-xr-x
mkfs.fat
50.83
KB
-rwxr-xr-x
mkfs.minix
42.39
KB
-rwxr-xr-x
mkfs.msdos
50.83
KB
-rwxr-xr-x
mkfs.ntfs
70.38
KB
-rwxr-xr-x
mkfs.vfat
50.83
KB
-rwxr-xr-x
mkhomedir_helper
22.17
KB
-rwxr-xr-x
mkinitramfs
12.16
KB
-rwxr-xr-x
mklost+found
14.3
KB
-rwxr-xr-x
mkntfs
70.38
KB
-rwxr-xr-x
mkswap
46.38
KB
-rwxr-xr-x
ModemManager
2.09
MB
-rwxr-xr-x
modinfo
166.36
KB
-rwxr-xr-x
modprobe
166.36
KB
-rwxr-xr-x
mount.fuse
18.3
KB
-rwxr-xr-x
mount.fuse3
18.3
KB
-rwxr-xr-x
mount.lowntfs-3g
114.98
KB
-rwxr-xr-x
mount.ntfs
159.01
KB
-rwxr-xr-x
mount.ntfs-3g
159.01
KB
-rwxr-xr-x
named
570.14
KB
-rwxr-xr-x
nameif
14.48
KB
-rwxr-xr-x
netplan
798
B
-rwxr-xr-x
NetworkManager
3.1
MB
-rwxr-xr-x
newusers
74.73
KB
-rwxr-xr-x
nfnl_osf
18.3
KB
-rwxr-xr-x
nft
26.23
KB
-rwxr-xr-x
nologin
14.3
KB
-rwxr-xr-x
ntfsclone
50.38
KB
-rwxr-xr-x
ntfscp
34.38
KB
-rwxr-xr-x
ntfslabel
22.38
KB
-rwxr-xr-x
ntfsresize
62.39
KB
-rwxr-xr-x
ntfsundelete
50.38
KB
-rwxr-xr-x
on_ac_power
3.7
KB
-rwxr-xr-x
openvpn
818.44
KB
-rwxr-xr-x
ownership
14.45
KB
-rwxr-xr-x
pam-auth-update
20.5
KB
-rwxr-xr-x
pam_extrausers_chkpwd
22.15
KB
-rwxr-sr-x
pam_extrausers_update
30.15
KB
-rwxr-xr-x
pam_getenv
2.82
KB
-rwxr-xr-x
pam_timestamp_check
14.15
KB
-rwxr-xr-x
paperconfig
4.07
KB
-rwxr-xr-x
parted
86.4
KB
-rwxr-xr-x
partprobe
14.38
KB
-rwxr-xr-x
pccardctl
22.37
KB
-rwxr-xr-x
pivot_root
14.38
KB
-rwxr-xr-x
plipconfig
14.3
KB
-rwxr-xr-x
plymouthd
150.55
KB
-rwxr-xr-x
poweroff
1.06
MB
-rwxr-xr-x
pppd
414.56
KB
-rwsr-xr--
pppdump
18.39
KB
-rwxr-xr-x
pppoe-discovery
22.3
KB
-rwxr-xr-x
pppstats
18.3
KB
-rwxr-xr-x
pptp
63.05
KB
-rwxr-xr-x
pptpsetup
6.46
KB
-rwxr-xr-x
pwck
50.13
KB
-rwxr-xr-x
pwconv
46.01
KB
-rwxr-xr-x
pwunconv
42.01
KB
-rwxr-xr-x
rarp
32.33
KB
-rwxr-xr-x
readprofile
22.41
KB
-rwxr-xr-x
reboot
1.06
MB
-rwxr-xr-x
remove-default-ispell
2.86
KB
-rwxr-xr-x
remove-default-wordlist
2.86
KB
-rwxr-xr-x
remove-shell
1.07
KB
-rwxr-xr-x
resize2fs
66.3
KB
-rwxr-xr-x
rfkill
30.23
KB
-rwxr-xr-x
rmmod
166.36
KB
-rwxr-xr-x
rmt
58.57
KB
-rwxr-xr-x
rmt-tar
58.57
KB
-rwxr-xr-x
rndc
42.3
KB
-rwxr-xr-x
rndc-confgen
22.3
KB
-rwxr-xr-x
route
64.27
KB
-rwxr-xr-x
rsyslogd
767.19
KB
-rwxr-xr-x
rtacct
28.31
KB
-rwxr-xr-x
rtcwake
34.38
KB
-rwxr-xr-x
rtkitctl
14.38
KB
-rwxr-xr-x
rtmon
90.39
KB
-rwxr-xr-x
runlevel
1.06
MB
-rwxr-xr-x
runuser
54.38
KB
-rwxr-xr-x
saned
70.7
KB
-rwxr-xr-x
select-default-ispell
3.23
KB
-rwxr-xr-x
select-default-wordlist
3.21
KB
-rwxr-xr-x
service
8.88
KB
-rwxr-xr-x
setcap
14.3
KB
-rwxr-xr-x
setvesablank
14.23
KB
-rwxr-xr-x
setvtrgb
14.29
KB
-rwxr-xr-x
sfdisk
102.38
KB
-rwxr-xr-x
sgdisk
162.48
KB
-rwxr-xr-x
shadowconfig
885
B
-rwxr-xr-x
shutdown
1.06
MB
-rwxr-xr-x
slattach
36.08
KB
-rwxr-xr-x
spice-vdagentd
62.82
KB
-rwxr-xr-x
sshd
899.7
KB
-rwxr-xr-x
start-stop-daemon
47.35
KB
-rwxr-xr-x
sudo_logsrvd
200.1
KB
-rwxr-xr-x
sudo_sendlog
107.34
KB
-rwxr-xr-x
sulogin
42.38
KB
-rwxr-xr-x
swaplabel
18.38
KB
-rwxr-xr-x
swapoff
22.38
KB
-rwxr-xr-x
swapon
42.38
KB
-rwxr-xr-x
switch_root
22.38
KB
-rwxr-xr-x
sysctl
30.23
KB
-rwxr-xr-x
tarcat
936
B
-rwxr-xr-x
tc
614.08
KB
-rwxr-xr-x
telinit
1.06
MB
-rwxr-xr-x
thermald
554.6
KB
-rwxr-xr-x
tipc
90.44
KB
-rwxr-xr-x
tsig-keygen
26.3
KB
-rwxr-xr-x
tune2fs
102.55
KB
-rwxr-xr-x
tzconfig
106
B
-rwxr-xr-x
u-d-c-print-pci-ids
517
B
-rwxr-xr-x
ufw
4.82
KB
-rwxr-xr-x
umount.udisks2
14.3
KB
-rwxr-xr-x
unix_chkpwd
26.15
KB
-rwxr-sr-x
unix_update
30.15
KB
-rwxr-xr-x
update-ca-certificates
5.29
KB
-rwxr-xr-x
update-catalog
9.15
KB
-rwxr-xr-x
update-cracklib
1.15
KB
-rwxr-xr-x
update-default-aspell
1
KB
-rwxr-xr-x
update-default-ispell
9.68
KB
-rwxr-xr-x
update-default-wordlist
7.5
KB
-rwxr-xr-x
update-dictcommon-aspell
1
KB
-rwxr-xr-x
update-dictcommon-hunspell
782
B
-rwxr-xr-x
update-fonts-alias
5.71
KB
-rwxr-xr-x
update-fonts-dir
3.98
KB
-rwxr-xr-x
update-fonts-scale
6.1
KB
-rwxr-xr-x
update-grub
64
B
-rwxr-xr-x
update-grub2
64
B
-rwxr-xr-x
update-grub-gfxpayload
301
B
-rwxr-xr-x
update-gsfontmap
470
B
-rwxr-xr-x
update-icon-caches
596
B
-rwxr-xr-x
update-inetd
5.83
KB
-rwxr-xr-x
update-info-dir
1.66
KB
-rwxr-xr-x
update-initramfs
6.74
KB
-rwxr-xr-x
update-locale
2.99
KB
-rwxr-xr-x
update-mime
9.39
KB
-rwxr-xr-x
update-passwd
34.56
KB
-rwxr-xr-x
update-pciids
1.71
KB
-rwxr-xr-x
update-rc.d
16.92
KB
-rwxr-xr-x
update-secureboot-policy
7.43
KB
-rwxr-xr-x
update-shells
3.72
KB
-rwxr-xr-x
update-xmlcatalog
16.88
KB
-rwxr-xr-x
upgrade-from-grub-legacy
1.56
KB
-rwxr-xr-x
usb_modeswitch
59.66
KB
-rwxr-xr-x
usb_modeswitch_dispatcher
26.78
KB
-rwxr-xr-x
usbmuxd
86.6
KB
-rwxr-xr-x
useradd
127.66
KB
-rwxr-xr-x
userdel
86.85
KB
-rwxr-xr-x
usermod
123.46
KB
-rwxr-xr-x
uuidd
30.85
KB
-rwxr-xr-x
validlocale
1.73
KB
-rwxr-xr-x
vcstime
14.15
KB
-rwxr-xr-x
vdpa
30.56
KB
-rwxr-xr-x
vigr
56.53
KB
-rwxr-xr-x
vipw
56.53
KB
-rwxr-xr-x
visudo
219.79
KB
-rwxr-xr-x
vpddecode
14.58
KB
-rwxr-xr-x
wipefs
38.38
KB
-rwxr-xr-x
wpa_action
1.69
KB
-rwxr-xr-x
wpa_cli
140.31
KB
-rwxr-xr-x
wpa_supplicant
3.24
MB
-rwxr-xr-x
xtables-legacy-multi
96.95
KB
-rwxr-xr-x
xtables-monitor
219.04
KB
-rwxr-xr-x
xtables-nft-multi
219.04
KB
-rwxr-xr-x
zic
62.32
KB
-rwxr-xr-x
zramctl
54.52
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : update-xmlcatalog
#!/usr/bin/perl ## ---------------------------------------------------------------------- ## Debian update-xmlcatalog ## ---------------------------------------------------------------------- ## Copyright (c) 2003-2004 Ardo van Rangelrooij ## ## This is free software; see the GNU General Public Licence version 2 ## or later for copying conditions. There is NO warranty. ## ---------------------------------------------------------------------- =head1 NAME update-xmlcatalog - maintain XML catalog files =head1 SYNOPSIS B<update-xmlcatalog> B<--add> B<--root> S<B<--package> I<package>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> B<--root> S<B<--package> I<package>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--add> S<B<--package> I<package>> S<B<--local> I<local>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> S<B<--package> I<package>> S<B<--local> I<local>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--add> S<B<--local> I<local>> S<B<--file> I<file>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--del> S<B<--local> I<local>> S<B<--file> I<file>> S<B<--type> I<type>> S<B<--id> I<id>> B<update-xmlcatalog> B<--help> =head1 DESCRIPTION B<update-xmlcatalog> add entries to and removes entries from the root XML catalog file, a package XML catalog file or a local XML catalog file. =head1 OPTIONS =over 4 =item B<--add> Adds the entry to the root XML catalog file, a package XML catalog file or a local XML catalog file. If the XML catalog file does not exist yet, it is automatically created. =item B<--del> Deletes the entry from the root XML catalog file, the package XML catalog file or the local XML catalog file. A resulting empty XML catalog is not automatically deleted from the filesystem. =item B<--file> I<file> Indicates a local filename. =item B<--id> I<id> Indicates the XML catalog file entry identifier. =item B<--local> I<local> Indicates a local XML catalog file. =item B<--package> I<package> Indicates a package XML catalog file. =item B<--root> Indicates the root XML catalog file. =item B<--type> I<type> Indicates the XML catalog file entry type (public, system, uri). =item B<--help> Displays the usage information. =item B<--verbose> Optional switch to make a verbose output. =item B<--sort> Optional switch to sort the manipulated catalog content. Tip: To sort a catalog without adding or removing an item, just add an already existing item to the catalog. =back =head1 NOTES B<update-xmlcatalog> is the de-facto standard tool to be used to maintain XML catalog files on a Debian system, similar to that L<update-catalog(8)> is the standard tool to be used to main SGML catalog files on a Debian system. A Debian XML Policy document to this effect is currently under development. B<update-xmlcatalog> and L<xmlcatalog(1)> are incompatible. The former has an internal database of all the entries in all the XML catalog files it maintains and regenerates the indicated XML catalog file completely from scratch upon an update. The latter updates the indicated XML catalog file directly. This means that any change made to an XML catalog file using L<xmlcatalog(1)> is overwritten the next time that XML catalog file is updated using B<update-xmlcatalog>. =head1 SEE ALSO F</usr/share/doc/xml-core/README.Debian> =head1 AUTHOR B<Ardo van Rangelrooij> E<lt>ardo@debian.orgE<gt> =cut ## ---------------------------------------------------------------------- use strict; ## ---------------------------------------------------------------------- use File::Spec; use Getopt::Long; ## ---------------------------------------------------------------------- $0 =~ m|[^/]+$|; ## ---------------------------------------------------------------------- my $name = $&; ## ---------------------------------------------------------------------- use vars qw( $catalog_data $catalog_data_dir ); use vars qw( $catalog $catalog_dir ); use vars qw( %catalog $key $entry ); ## ---------------------------------------------------------------------- $catalog_data_dir = '/var/lib/xml-core'; $catalog_dir = '/etc/xml'; ## ---------------------------------------------------------------------- use vars qw( $add ); use vars qw( $del ); use vars qw( $file ); use vars qw( $help ); use vars qw( $local ); use vars qw( $package ); use vars qw( $root ); use vars qw( $type $id ); use vars qw( $verbose ); use vars qw( $sort ); ## ---------------------------------------------------------------------- if ( ! GetOptions( 'add' => \$add, 'del' => \$del, 'file=s' => \$file, 'help' => \$help, 'id=s' => \$id, 'local=s' => \$local, 'package=s' => \$package, 'root' => \$root, 'type=s' => \$type, 'verbose' => \$verbose, 'sort' => \$sort, ) ) { &help; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $help ) ) { &help; exit -1; } ## ---------------------------------------------------------------------- if ( ! ( defined( $add ) || defined( $del ) ) ) { print STDERR "$name: error: either 'add' or 'del' must be given\n"; exit 1; } elsif ( ( defined( $add ) && defined( $del ) ) ) { print STDERR "$name: error: only one of 'add' and 'del' can be given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { if ( defined( $root ) ) { if ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } } else { print STDERR "$name: error: package catalog not given\n"; exit 1; } if ( defined( $local) || defined( $file ) ) { print STDERR "$name: error: local catalog and file not for adding to root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { if ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } } else { print STDERR "$name: error: local catalog not given\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for adding to package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( defined( $file ) ) { if ( ! -f $file ) { print STDERR "$name: error: file $file not found\n"; exit 1; } } else { print STDERR "$name: error: file not given\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } elsif ( defined( $del ) ) { if ( defined( $root ) ) { my $catalog = File::Spec->catfile( $catalog_dir, 'catalog' ); if ( ! -f $catalog ) { print STDERR "$name: error: root catalog $catalog not found\n"; exit 1; } if ( defined( $package) || defined( $local ) || defined( $file ) ) { print STDERR "$name: error: package catalog, local catalog or file not for deleting from root catalog file\n"; exit 1; } } elsif ( defined( $package ) ) { my $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); if ( ! -f $catalog ) { print STDERR "$name: error: package catalog $catalog not found\n"; exit 1; } if ( defined( $local ) || defined( $file ) ) { print STDERR "$name: error: local catalog or file not for deleting from package catalog file\n"; exit 1; } } elsif ( defined( $local ) ) { if ( ! -f $local ) { print STDERR "$name: error: local catalog $local not found\n"; exit 1; } if ( defined( $file ) ) { print STDERR "$name: error: file not for deleting from local catalog file\n"; exit 1; } } else { print STDERR "$name: error: catalog not given\n"; exit 1; } } ## ---------------------------------------------------------------------- if ( defined( $type ) ) { if ( $type !~ /^(public|system|uri)$/ ) { print STDERR "$name: error: wrong type\n"; exit 1; } } else { print STDERR "$name: error: type not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( ! defined( $id ) ) { print STDERR "$name: error: id not given\n"; exit 1; } ## ---------------------------------------------------------------------- if ( defined( $root ) ) { $catalog = 'catalog'; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog ); $catalog = File::Spec->catfile( $catalog_dir, $catalog ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $package = "catalog=\"file:///etc/xml/$package.xml\""; $key = "$type $id"; $entry = "$package"; } elsif ( defined( $package ) ) { $catalog_data = File::Spec->catfile( $catalog_data_dir, $package ); $catalog = File::Spec->catfile( $catalog_dir, "$package.xml" ); my $start = $type; $start .= 'Id' unless $type eq 'uri'; $start .= 'StartString'; $id = "$start=\"$id\""; $type = ( $type eq 'uri' ) ? "\U$type" : "\u$type"; $type = "delegate$type"; $local = "catalog=\"file://$local\""; $key = "$type $id"; $entry = "$local"; } elsif ( defined( $local ) ) { $catalog = $local; $catalog_data = $local; $catalog_data =~ tr|/|_|; $catalog_data = File::Spec->catfile( $catalog_data_dir, $catalog_data ); my $start = ( $type eq 'uri' ) ? 'name' : $type; $start .= 'Id' unless $type eq 'uri'; $id = "$start=\"$id\""; $file = "uri=\"$file\""; $key = "$type $id"; $entry = "$file"; } ## ---------------------------------------------------------------------- if ( defined( $add ) ) { &read_catalog_data if -f $catalog_data; if ( &add_entry ) { &create_backup if -f $catalog; &write_catalog_data; &write_catalog; } else { exit 1; } } elsif ( defined( $del ) ) { &read_catalog_data; if ( &del_entry ) { &create_backup; &write_catalog_data; &write_catalog; } else { exit 1; } } ## ---------------------------------------------------------------------- exit 0; ## ---------------------------------------------------------------------- sub add_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { if ( $catalog{ $key } ne $entry ) { print STDERR "$name: error: entity already registered with a different value\n"; print STDERR " Entity : [$key]\n"; print STDERR " Old value: [$catalog{$key}]\n"; print STDERR " New value: [$entry]\n"; return; } else { print STDERR "$name: notice: entity already registered\n" if $verbose; return 1; } } else { print "$name: adding entity to catalog data $catalog_data with the same value\n" if $verbose; $catalog{ $key } = $entry; return 1; } } ## add_entry ## ---------------------------------------------------------------------- sub del_entry { ## ------------------------------------------------------------------ if ( exists( $catalog{ $key } ) ) { print "$name: removing entity from catalog data $catalog_data\n" if $verbose; delete( $catalog{ $key } ); return 1; } else { print STDERR "$name: error: entity not registered\n"; return; } } ## del_entry ## ---------------------------------------------------------------------- sub read_catalog_data { ## ------------------------------------------------------------------ print "$name: reading catalog data $catalog_data\n" if $verbose; open( CATALOG_DATA, '<', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for reading: $!"; while ( <CATALOG_DATA> ) { chop; my ( $key, $entry ) = split( />/ ); $key =~ s/^<//; $entry =~ s/^<//; $catalog{ $key } = $entry; } close( CATALOG_DATA ) or die "$name: cannot close catalog data $catalog_data: $!"; } ## read_catalog_data ## ---------------------------------------------------------------------- sub write_catalog_data { ## ------------------------------------------------------------------ print "$name: writing catalog data $catalog_data\n" if $verbose; open( CATALOG_DATA, '>', $catalog_data ) or die "$name: cannot open catalog data $catalog_data for writing: $!"; my $counter = 0; # Adding the optional sort of the catalog. See #626036. my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog ); for my $key ( @catalog_keys ) { print( CATALOG_DATA "<$key><$catalog{ $key }>\n" ); $counter++; } close( CATALOG_DATA ) or die "$name: cannot close catalog data $catalog_data: $!"; ## ------------------------------------------------------------------ if ( $counter == 0 ) { print "$name: removing catalog data $catalog_data\n" if $verbose; unlink( $catalog_data ); } } ## write_catalog_data ## ---------------------------------------------------------------------- sub create_backup { ## ------------------------------------------------------------------ my $backup = $catalog . '.old'; ## ------------------------------------------------------------------ if ( -f $backup ) { print "$name: removing backup $backup\n" if $verbose; unlink( $backup ) or die "$name: cannot remove backup $backup: $!"; } ## ------------------------------------------------------------------ print "$name: moving catalog $catalog to backup $backup\n" if $verbose; rename( $catalog, $backup ) or die "$name: cannot move catalog $catalog to backup $backup: $!"; } ## create_backup ## ---------------------------------------------------------------------- sub write_catalog { ## ------------------------------------------------------------------ my @catalog = (); ## ------------------------------------------------------------------ my $header = '/usr/share/xml-core/catalog.header'; open( HEADER, '<', $header ) or die "$name: cannot open catalog header $header for reading: $!"; while ( <HEADER> ) { chop; push( @catalog, $_ ); } close( HEADER ) or die "$name: cannot close catalog header $header: $!"; ## ------------------------------------------------------------------ my $counter = 0; # Adding the optional sort of the catalog. See #626036. my @catalog_keys = ( $sort ? sort keys %catalog : keys %catalog ); for my $key ( @catalog_keys ) { push( @catalog, "<$key $catalog{ $key }/>" ); $counter++; } ## ------------------------------------------------------------------ my $footer = '/usr/share/xml-core/catalog.footer'; open( FOOTER, '<', $footer ) or die "$name: cannot open catalog footer $footer for reading: $!"; while ( <FOOTER> ) { chop; push( @catalog, $_ ); } close( FOOTER ) or die "$name: cannot close catalog footer $footer: $!"; ## ------------------------------------------------------------------ print "$name: writing catalog $catalog\n" if $verbose; open( CATALOG, '>', $catalog ) or die "$name: cannot open catalog $catalog for writing: $!"; for ( @catalog ) { print( CATALOG $_, "\n" ); } close( CATALOG ) or die "$name: cannot close catalog $catalog: $!"; ## ------------------------------------------------------------------ if ( $counter == 0 ) { print "$name: removing catalog $catalog\n" if $verbose; unlink( $catalog ); } } ## write_catalog ## ---------------------------------------------------------------------- sub help { ## ------------------------------------------------------------------ print <<END; Usage: $name <options> --add --root --type <type> \\ --id <id> --package <package> $name <options> --del --root --type <type> \\ --id <id> $name <options> --add --package <package> --type <type> \\ --id <id> --local <local> $name <options> --del --package <package> --type <type> \\ --id <id> $name <options> --add --local <local> --type <type> \\ --id <id> --file <file> $name <options> --del --local <local> --type <type> \\ --id <id> $name --help With: --file <file> = a local filename --id <id> = catalog entry idenitifier --local <local> = a local XML catalog --package <package> = a package XML catalog --root = the root XML catalog (= /etc/xml/catalog) --type <type> = catalog entry type (= public, system, uri) Options: --verbose = be verbose --sort = sorts the manipulated catalog content END } ## help ## ---------------------------------------------------------------------- __END__ ## ----------------------------------------------------------------------
Close