OXIESEC PANEL
- Current Dir:
/
/
snap
/
core24
/
988
/
usr
/
bin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/04/2025 04:37:38 PM
rwxr-xr-x
📄
[
54.44 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
aa-enabled
18.3 KB
03/19/2025 06:09:43 PM
rwxr-xr-x
📄
aa-exec
18.3 KB
03/19/2025 06:09:43 PM
rwxr-xr-x
📄
aa-features-abi
18.3 KB
03/19/2025 06:09:43 PM
rwxr-xr-x
📄
addpart
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
arch
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
awk
166.77 KB
04/08/2024 04:12:02 PM
rwxr-xr-x
📄
b2sum
54.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
base32
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
base64
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
basename
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
basenc
46.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
bash
1.38 MB
03/31/2024 08:41:03 AM
rwxr-xr-x
📄
bashbug
6.82 KB
03/31/2024 08:41:03 AM
rwxr-xr-x
📄
bunzip2
38.38 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
busctl
94.59 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
bzcat
38.38 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzcmp
2.17 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzdiff
2.17 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzegrep
3.69 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzexe
4.78 KB
11/27/2021 12:25:05 PM
rwxr-xr-x
📄
bzfgrep
3.69 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzgrep
3.69 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzip2
38.38 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzip2recover
18.3 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzless
1.27 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
bzmore
1.27 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
captoinfo
90.41 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
cat
38.46 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
chage
70.49 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
chardet
221 bytes
08/20/2023 12:12:03 PM
rwxr-xr-x
📄
chardetect
221 bytes
08/20/2023 12:12:03 PM
rwxr-xr-x
📄
chattr
14.31 KB
04/28/2024 11:44:46 PM
rwxr-xr-x
📄
chcon
58.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
chfn
71.09 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
chgrp
58.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
chmod
54.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
choom
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
chown
58.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
chrt
30.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
chsh
43.71 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
cksum
102.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
clear
14.31 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
clear_console
14.23 KB
03/31/2024 08:41:03 AM
rwxr-xr-x
📄
cloud-id
972 bytes
04/02/2025 03:09:15 PM
rwxr-xr-x
📄
cloud-init
976 bytes
04/02/2025 03:09:15 PM
rwxr-xr-x
📄
cloud-init-per
2.06 KB
01/15/2025 03:24:11 PM
rwxr-xr-x
📄
cmp
42.39 KB
04/08/2024 03:55:59 PM
rwxr-xr-x
📄
comm
38.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
core-sshd-host-keygen
1.49 KB
05/04/2025 04:30:49 PM
rwxr-xr-x
📄
coredumpctl
82.66 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
cp
138.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
csplit
50.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ctstat
22.66 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
cut
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
cvtsudoers
321.13 KB
04/08/2024 02:50:39 PM
rwxr-xr-x
📄
dash
126.74 KB
03/31/2024 08:47:26 AM
rwxr-xr-x
📄
date
106.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
dbus-cleanup-sockets
14.29 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-daemon
230.64 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-monitor
26.3 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-run-session
14.3 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-send
30.29 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-update-activation-environment
14.29 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dbus-uuidgen
14.29 KB
08/09/2024 02:33:22 AM
rwxr-xr-x
📄
dd
70.54 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
delpart
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
df
87.08 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
diff
134.55 KB
04/08/2024 03:55:59 PM
rwxr-xr-x
📄
diff3
58.52 KB
04/08/2024 03:55:59 PM
rwxr-xr-x
📄
dir
138.98 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
dircolors
46.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
dirname
34.38 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
dmesg
68.64 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
dnsdomainname
22.23 KB
04/08/2024 03:59:01 PM
rwxr-xr-x
📄
domainname
22.23 KB
04/08/2024 03:59:01 PM
rwxr-xr-x
📄
dpkg-deb
142.58 KB
07/17/2024 09:09:50 AM
rwxr-xr-x
📄
dpkg-realpath
4.09 KB
07/17/2024 09:09:50 AM
rwxr-xr-x
📄
du
98.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ec2metadata
8.38 KB
06/03/2022 10:51:54 AM
rwxr-xr-x
📄
echo
34.38 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
editor
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
egrep
41 bytes
04/08/2024 03:58:39 PM
rwxr-xr-x
📄
env
46.95 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ex
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
expand
34.53 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
expiry
26.52 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
expr
42.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
factor
62.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
faillog
22.63 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
fallocate
26.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
false
26.3 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
fgrep
41 bytes
04/08/2024 03:58:39 PM
rwxr-xr-x
📄
finalrd
2.06 KB
02/16/2022 04:56:26 PM
rwxr-xr-x
📄
find
199.48 KB
04/08/2024 03:57:28 PM
rwxr-xr-x
📄
findmnt
67.66 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
flock
22.48 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
fmt
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
fold
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
free
26.38 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
gdbserver
615.98 KB
04/03/2024 10:51:19 AM
rwxr-xr-x
📄
getconf
26.36 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
getent
38.72 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
getopt
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
gpasswd
74.46 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
gpgv
303.14 KB
03/28/2025 03:23:49 PM
rwxr-xr-x
📄
grep
182.45 KB
04/08/2024 03:58:39 PM
rwxr-xr-x
📄
groups
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
growpart
29.19 KB
06/03/2022 10:51:54 AM
rwxr-xr-x
📄
gunzip
2.29 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
gzexe
6.3 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
gzip
91.23 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
hardlink
46.48 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
head
42.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
hostid
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
hostname
22.23 KB
04/08/2024 03:59:01 PM
rwxr-xr-x
📄
hostnamectl
30.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
i386
26.65 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
iconv
66.48 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
id
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
infocmp
66.38 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
infotocap
90.41 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
install
142.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ionice
18.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
ip
754.74 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
ipcmk
22.45 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
ipcrm
18.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
ipcs
38.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
iptables-xml
92.95 KB
04/08/2024 03:59:59 PM
rwxr-xr-x
📄
ischroot
14.48 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
join
50.55 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
journalctl
78.91 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
json-patch-jsondiff
1004 bytes
08/21/2023 01:10:58 PM
rwxr-xr-x
📄
jsondiff
1004 bytes
08/21/2023 01:10:58 PM
rwxr-xr-x
📄
jsonpatch
3.77 KB
08/21/2023 01:10:58 PM
rwxr-xr-x
📄
jsonpointer
1.79 KB
01/24/2020 03:25:15 AM
rwxr-xr-x
📄
jsonschema
213 bytes
08/14/2023 09:45:04 PM
rwxr-xr-x
📄
kernel-install
54.67 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
kill
22.38 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
kmod
170.24 KB
10/02/2024 12:40:49 PM
rwxr-xr-x
📄
kmodsign
18.45 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
last
34.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lastb
34.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lastlog
27.79 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
lcf
7.6 KB
01/27/2023 01:29:51 PM
rwxr-xr-x
📄
ld.so
231.07 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
ldd
5.26 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
less
190.38 KB
04/28/2024 11:44:40 AM
rwxr-xr-x
📄
lessecho
14.31 KB
04/28/2024 11:44:40 AM
rwxr-xr-x
📄
lessfile
8.83 KB
02/12/2023 10:17:35 AM
rwxr-xr-x
📄
lesskey
23.7 KB
04/28/2024 11:44:40 AM
rwxr-xr-x
📄
lesspipe
8.83 KB
02/12/2023 10:17:35 AM
rwxr-xr-x
📄
link
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
linux32
26.65 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
linux64
26.65 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
ln
54.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
lnstat
22.66 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
locale
49.63 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
locale-check
14.15 KB
02/05/2025 04:08:58 PM
rwxr-xr-x
📄
localectl
26.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
localedef
319.09 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
logger
38.97 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
login
51.81 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
loginctl
66.58 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
logname
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ls
138.98 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
lsattr
14.31 KB
04/28/2024 11:44:46 PM
rwxr-xr-x
📄
lsblk
146.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lscpu
110.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lsipc
50.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lslocks
30.77 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lslogins
50.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lsmem
38.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
lsmod
170.24 KB
10/02/2024 12:40:49 PM
rwxr-xr-x
📄
lsns
42.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
man
128 bytes
05/04/2025 04:30:49 PM
rwxr-xr-x
📄
mawk
166.77 KB
04/08/2024 04:12:02 PM
rwxr-xr-x
📄
mcookie
26.45 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
md5sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
md5sum.textutils
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
mesg
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
mkdir
74.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
mkfifo
42.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
mknod
42.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
mksquashfs
286.95 KB
04/08/2024 04:20:03 PM
rwxr-xr-x
📄
mkswapfile
865 bytes
05/04/2025 04:30:49 PM
rwxr-xr-x
📄
mktemp
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
more
46.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
mount
50.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
mountpoint
18.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
mv
134.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
namei
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
nawk
166.77 KB
04/08/2024 04:12:02 PM
rwxr-xr-x
📄
nc
38.63 KB
04/08/2024 04:14:20 PM
rwxr-xr-x
📄
nc.openbsd
38.63 KB
04/08/2024 04:14:20 PM
rwxr-xr-x
📄
netcat
38.63 KB
04/08/2024 04:14:20 PM
rwxr-xr-x
📄
networkctl
122.58 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
newgrp
39.71 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
nice
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
nisdomainname
22.23 KB
04/08/2024 03:59:01 PM
rwxr-xr-x
📄
nl
38.6 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
nohup
34.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
nproc
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
nsenter
30.6 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
nstat
30.38 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
numfmt
58.54 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
od
70.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
openssl
981.8 KB
02/05/2025 01:17:43 PM
rwxr-xr-x
📄
p11-kit
206.7 KB
08/09/2024 02:33:21 AM
rwxr-xr-x
📄
p11tool
218.38 KB
02/12/2025 02:55:11 PM
rwxr-xr-x
📄
pager
190.38 KB
04/28/2024 11:44:40 AM
rwxr-xr-x
📄
partx
62.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
passwd
62.65 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
paste
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
pathchk
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
pdb3
67.83 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pdb3.12
67.83 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pgrep
34.47 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
pidof
26.23 KB
04/08/2024 04:20:36 PM
rwxr-xr-x
📄
pidwait
34.47 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
ping
87.66 KB
04/08/2024 04:00:16 PM
rwxr-xr-x
📄
ping4
87.66 KB
04/08/2024 04:00:16 PM
rwxr-xr-x
📄
ping6
87.66 KB
04/08/2024 04:00:16 PM
rwxr-xr-x
📄
pinky
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
pkaction
18.3 KB
12/02/2024 11:59:52 AM
rwxr-xr-x
📄
pkcheck
22.3 KB
12/02/2024 11:59:52 AM
rwxr-xr-x
📄
pkcs11-tool
184.61 KB
04/01/2024 07:06:24 AM
rwxr-xr-x
📄
pkill
34.47 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
pkttyagent
22.3 KB
12/02/2024 11:59:52 AM
rwxr-xr-x
📄
pldd
22.44 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
plymouth
46.3 KB
02/25/2025 05:47:08 AM
rwxr-xr-x
📄
pmap
34.4 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
pr
70.58 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
printenv
34.38 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
printf
54.44 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
prlimit
26.89 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
ps
142.99 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
ptx
54.54 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
pwd
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
pwdx
14.38 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
py3clean
7.63 KB
08/07/2024 05:44:52 PM
rwxr-xr-x
📄
py3compile
13 KB
08/07/2024 05:44:52 PM
rwxr-xr-x
📄
py3versions
12.52 KB
08/07/2024 05:44:52 PM
rwxr-xr-x
📄
pydoc3
80 bytes
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pydoc3.12
80 bytes
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pygettext3
23.66 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pygettext3.12
23.66 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
pyserial-miniterm
975 bytes
11/24/2023 10:38:53 AM
rwxr-xr-x
📄
pyserial-ports
969 bytes
11/24/2023 10:38:53 AM
rwxr-xr-x
📄
python3
7.65 MB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
python3.12
7.65 MB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
rbash
1.38 MB
03/31/2024 08:41:03 AM
rwxr-xr-x
📄
rdma
102.52 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
readlink
42.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
realpath
42.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
rename.ul
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
renice
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
reset
26.31 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
resizepart
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
resolvectl
158.67 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
rev
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
rgrep
30 bytes
07/21/2023 02:47:24 PM
rwxr-xr-x
📄
rm
58.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
rmdir
46.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
routel
1.62 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
rtstat
22.66 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
run-parts
26.82 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
runcon
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
rview
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
savelog
10.24 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
sbattach
22.54 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
sbkeysync
34.74 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
sbsiglist
14.6 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
sbsign
34.7 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
sbvarsign
22.73 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
sbverify
30.61 KB
04/08/2024 02:49:32 PM
rwxr-xr-x
📄
scp
134.59 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
script
54.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
scriptlive
42.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
scriptreplay
34.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
sdiff
50.39 KB
04/08/2024 03:55:59 PM
rwxr-xr-x
📄
sed
110.57 KB
04/08/2024 04:19:08 PM
rwxr-xr-x
📄
select-editor
2.39 KB
02/04/2024 06:05:15 PM
rwxr-xr-x
📄
sensible-browser
1.55 KB
02/04/2024 06:05:15 PM
rwxr-xr-x
📄
sensible-editor
1.52 KB
02/04/2024 06:05:15 PM
rwxr-xr-x
📄
sensible-pager
921 bytes
02/04/2024 06:05:15 PM
rwxr-xr-x
📄
sensible-terminal
1.15 KB
02/04/2024 06:05:15 PM
rwxr-xr-x
📄
seq
50.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
setarch
26.65 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
setpriv
38.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
setsid
14.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
setterm
34.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
sftp
150.66 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
sg
39.71 KB
05/30/2024 02:52:35 PM
rwxr-xr-x
📄
sh
126.74 KB
03/31/2024 08:47:26 AM
rwxr-xr-x
📄
sha1sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sha224sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sha256sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sha384sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sha512sum
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
shred
54.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
shuf
46.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
skill
26.41 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
slabtop
22.44 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
sleep
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
slogin
827.04 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
snap
0 bytes
01/01/1970 12:00:00 AM
---------
📄
snapctl
0 bytes
01/01/1970 12:00:00 AM
---------
📄
snice
26.41 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
sort
102.8 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
splash-client
404 bytes
05/04/2025 04:30:49 PM
rwxr-xr-x
📄
split
54.94 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sqfscat
147.9 KB
04/08/2024 04:20:03 PM
rwxr-xr-x
📄
sqfstar
286.95 KB
04/08/2024 04:20:03 PM
rwxr-xr-x
📄
ss
129.07 KB
03/31/2024 09:00:13 AM
rwxr-xr-x
📄
ssh
827.04 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
ssh-add
294.42 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
ssh-agent
302.43 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
ssh-argv0
1.42 KB
07/30/2024 04:12:40 PM
rwxr-xr-x
📄
ssh-copy-id
12.77 KB
12/18/2023 02:59:50 PM
rwxr-xr-x
📄
ssh-keygen
442.44 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
ssh-keyscan
330.44 KB
04/22/2025 11:51:46 AM
rwxr-xr-x
📄
stat
86.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
stdbuf
50.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
stty
78.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
su
54.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
sudo
271.42 KB
04/08/2024 02:50:39 PM
rwxr-xr-x
📄
sudoedit
271.42 KB
04/08/2024 02:50:39 PM
rwxr-xr-x
📄
sudoreplay
95.95 KB
04/08/2024 02:50:39 PM
rwxr-xr-x
📄
sum
34.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
sync
34.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
systemctl
1.43 MB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd
98.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-ac-power
14.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-analyze
198.85 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-ask-password
18.58 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-cat
18.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-cgls
22.57 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-cgtop
38.47 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-confext
54.64 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-creds
42.72 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-cryptenroll
70.92 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-cryptsetup
78.95 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-delta
26.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-detect-virt
18.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-escape
22.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-firstboot
58.82 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-hwdb
154.74 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-id128
22.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-inhibit
22.47 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-machine-id-setup
18.63 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-mount
50.78 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-notify
26.66 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-path
18.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-repart
195.23 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-run
66.79 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-socket-activate
30.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-stdio-bridge
22.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-sysext
54.64 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-sysusers
66.63 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-tmpfiles
114.7 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-tty-ask-password-agent
34.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
systemd-umount
50.78 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
tabs
18.3 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
tac
38.41 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tail
62.53 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tar
421.92 KB
04/08/2024 04:20:47 PM
rwxr-xr-x
📄
taskset
30.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
tee
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tempfile
14.3 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
test
46.44 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tic
90.41 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
timedatectl
815 bytes
05/04/2025 04:33:02 PM
rwxr-xr-x
📄
timedatectl.real
46.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
timeout
38.95 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tload
22.39 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
toe
22.3 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
top
131.7 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
touch
94.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tput
26.34 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
tr
46.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
true
26.3 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
truncate
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tset
26.31 KB
04/08/2024 04:14:03 PM
rwxr-xr-x
📄
tsort
46.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tty
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
tzselect
15.02 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
ucf
40.68 KB
01/27/2023 01:29:51 PM
rwxr-xr-x
📄
ucfr
10.85 KB
01/27/2023 01:29:51 PM
rwxr-xr-x
📄
uclampset
30.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
udevadm
1.37 MB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
umount
38.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
uname
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
uncompress
2.29 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
unexpand
38.53 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
uniq
38.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
unlink
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
unshare
42.6 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
unsquashfs
147.9 KB
04/08/2024 04:20:03 PM
rwxr-xr-x
📄
update-alternatives
58.38 KB
07/17/2024 09:09:50 AM
rwxr-xr-x
📄
uptime
14.38 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
users
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
utmpdump
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
varlinkctl
30.45 KB
02/21/2025 09:18:31 PM
rwxr-xr-x
📄
vcs-run
6.75 KB
06/03/2022 10:51:54 AM
rwxr-xr-x
📄
vdir
138.98 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
vi
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
view
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
vim.tiny
1.66 MB
04/01/2025 08:12:31 PM
rwxr-xr-x
📄
vmstat
38.78 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
w
26.38 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
wall
22.38 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
watch
30.84 KB
09/26/2024 08:44:05 AM
rwxr-xr-x
📄
wc
54.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
wdctl
34.4 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
whereis
30.84 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
which
1.05 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
which.debianutils
1.05 KB
03/31/2024 08:47:33 AM
rwxr-xr-x
📄
who
58.52 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
whoami
34.51 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
wpa_passphrase
14.38 KB
02/21/2025 09:03:52 PM
rwxr-xr-x
📄
x86_64
26.65 KB
12/05/2024 02:26:54 AM
rwxr-xr-x
📄
xargs
62.41 KB
04/08/2024 03:57:28 PM
rwxr-xr-x
📄
xdg-email
38 bytes
05/04/2025 04:33:03 PM
rwxr-xr-x
📄
xdg-open
38 bytes
05/04/2025 04:33:03 PM
rwxr-xr-x
📄
xdg-settings
1.68 KB
05/04/2025 04:33:03 PM
rwxr-xr-x
📄
yes
34.38 KB
04/05/2024 02:36:57 PM
rwxr-xr-x
📄
ypdomainname
22.23 KB
04/08/2024 03:59:01 PM
rwxr-xr-x
📄
zcat
1.94 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zcmp
1.64 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zdiff
6.31 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zdump
30.28 KB
01/28/2025 05:07:37 PM
rwxr-xr-x
📄
zegrep
29 bytes
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zfgrep
29 bytes
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zforce
2.03 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zgrep
7.91 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zless
2.15 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
zmore
1.8 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
📄
znew
4.47 KB
04/08/2024 03:58:45 PM
rwxr-xr-x
Editing: ucf
Close
#!/bin/sh # -*- Mode: Sh -*- # updateConfFile.sh --- # Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) # Created On : Fri Feb 1 03:41:47 2002 # Created On Node : glaurung.green-gryphon.com # Last Modified By : Manoj Srivastava # Last Modified On : Tue Jun 6 09:48:22 2006 # Last Machine Used: glaurung.internal.golden-gryphon.com # Update Count : 186 # Status : Unknown, Use with caution! # HISTORY : # Description : # # This script attempts to provide conffile like handling for files not # shipped in a Debian package, but handled by the postinst. Using this # script, one may ship a bunch of default cofiguration files somewhere # in /usr (/usr/share/<pkg> is a good location), and maintain files in # /etc. # # The motivation for this script was to provide conffile like handling # for start files for emacs lisp packages (for example, # /etc/emacs21/site-stard.d/50psgml-init.el) These start files are not # shipped with the package, instead, they are installed during the # post installation configuration phase by the script # /usr/lib/emacsen-common/emacs-package-install $package_name. # # This script is meant to be invoked by the packages install script at # /usr/lib/emacsen-common/packages/install/$package_name for each # flavour of installed emacsen by calling it with the proper values of # new file (/usr/share/emacs/site-lisp/<pkg>/<pkg>-init.el), and dest file # (/etc/emacs21/site-stard.d/50<pkg>-init.el)), and it should do the rest. # # make sure we exit on error set -e # set the version and revision progname="$(basename $0)" pversion='Revision: 3.00 ' unset GREP_OPTIONS ###################################################################### ######## ######### ######## Utility functions ######### ######## ######### ###################################################################### setq() { # Variable Value Doc_string if [ "x$2" = "x" ]; then echo >&2 "$progname: Unable to determine $3" exit 1; else if [ "x$VERBOSE" != "x" ]; then echo >&2 "$progname: $3 is $2"; fi eval "$1=\"\$2\""; fi } # Usage: get_file_metadate file_name get_file_metadata() { if [ -e "$1" ]; then # get file modification date without the nanoseconds and timezone info local moddate="$(date +"%F %T" --date $(stat --format '@%Y' "$1"))" # print file_name user.group permissions above_date stat --format "%n %U.%G 0%a $moddate" "$1" else echo "/dev/null" fi } # Runs the diff command with approrpiate arguments # Usage run_diff diff|sdiff diff_opts old_file new_file run_diff() { local diff_cmd="$1" local diff_opt="$2" local old_file="$3" local new_file="$4" # Note: get_file_metadata not in quotes to ignore "\n" characters local old_file_label="$(get_file_metadata "$old_file")" local new_file_label="$(get_file_metadata "$new_file")" [ -e "$old_file" ] || old_file=/dev/null [ -e "$new_file" ] || new_file=/dev/null if [ "$diff_cmd" = "diff" ] ; then diff "$diff_opt" --label "$old_file_label" "$old_file" \ --label "$new_file_label" "$new_file" || true elif [ "$diff_cmd" = "sdiff" ] ; then # unfortunatelly the sdiff command does not support --label option local out="$(sdiff "$diff_opt" "$old_file" "$new_file")" || true [ -z "$out" ] || printf "Old file: %s\nNew file: %s\n\n%s" \ "$old_file_label" "$new_file_label" "$out" else echo "Unknown diff command: $diff_cmd" >&2 exit 1 fi } # Use debconf to show the differences # Usage: show_diff actual_file_differences file_stat_differences show_diff() { if [ -z "$1" ]; then DIFF="There are no non-white space differences in the files." else if [ 99999 -lt "$(echo $1 | wc -c | awk '{print $1; }')" ]; then DIFF="The differences between the files are too large to display." else DIFF="$1" fi fi if [ "$DEBCONF_OK" = "YES" ] && [ "$DEBIAN_HAS_FRONTEND" ]; then templ=ucf/show_diff db_capb escape db_subst $templ DIFF "$(printf %s "$DIFF" | debconf-escape -e)" db_fset $templ seen false db_input critical $templ || true db_go || true db_get $templ # may contain sensitive information, so clear # immediatly after use so it is never written # to disk db_subst $templ DIFF "" db_reset $templ db_capb else if [ -z "$my_pager" ]; then echo "$DIFF" | sensible-pager else echo "$DIFF" | $my_pager fi fi } withecho () { echo "$@" >&2 "$@" } usageversion () { cat >&2 <<END Debian GNU/Linux $progname $pversion. Copyright (C) 2002-2005 Manoj Srivastava. This is free software; see the GNU General Public Licence for copying conditions. There is NO warranty. Usage: $progname [options] new_file destination Options: -h, --help print this message -s foo, --src-dir foo Set the src dir (historical md5sums live here) --sum-file bar Force the historical md5sums to be read from this file. Overrides any setting of --src-dir. -d[n], --debug=[n] Set the Debug level to N. Please note there must be no spaces before the debug level -n, --no-action Dry run. No action is actually taken. -P foo, --package foo Don't follow dpkg-divert diversions by package foo. -v, --verbose Make the script verbose --three-way Register this file in the cache, and turn on the diff3 option allowing the merging of maintainer changes into a (potentially modified) local configuration file. ) --state-dir bar Set the state directory to bar instead of the default '/var/lib/ucf'. Used mostly for testing. --debconf-ok Indicate that it is ok for ucf to use an already running debconf instance for prompting. --debconf-template bar Specify an alternate, caller-provided debconf template to use for prompting. Usage: $progname -p destination -p, --purge Remove any reference to destination from records By default, the directory the new_file lives in is assumed to be the src-dir, which is where we look for any historical md5sums. END } ###################################################################### ######## ######### ######## file and hash save/restore functions ######### ######## ######### ###################################################################### purge_md5sum () { for i in $(/usr/bin/seq 6 -1 0); do if [ -e "${statedir}/hashfile.${i}" ]; then if [ "X$docmd" = "XYES" ]; then cp -pf "${statedir}/hashfile.${i}" \ "${statedir}/hashfile.$(($i+1))" else echo cp -pf "${statedir}/hashfile.${i}" \ "${statedir}/hashfile.$(($i+1))" fi fi done if [ -e "$statedir/hashfile" ]; then if [ "X$docmd" = "XYES" ]; then cp -pf "$statedir/hashfile" "$statedir/hashfile.0" else echo cp -pf "$statedir/hashfile" "$statedir/hashfile.0" fi if [ "X$docmd" = "XYES" ]; then set +e if [ "X$VERBOSE" != "X" ]; then echo >&2 "grep -Ev [[:space:]]${safe_dest_file}$ $statedir/hashfile" grep -Ev "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" >&2 \ || true; fi #echo "grep -Ev [[:space:]]${safe_dest_file}$ $statedir/hashfile" grep -Ev "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" > \ "$statedir/hashfile.tmp" || true; if [ "X$docmd" = "XYES" ]; then mv -f "$statedir/hashfile.tmp" "$statedir/hashfile" else echo mv -f "$statedir/hashfile.tmp" "$statedir/hashfile" fi set -e fi fi test -n "$VERBOSE" && echo >&2 "The cache file is $cached_file" if [ ! -z "$cached_file" -a -f "$statedir/cache/$cached_file" ]; then $action rm -f "$statedir/cache/$cached_file" fi } replace_md5sum () { for i in $(/usr/bin/seq 6 -1 0); do if [ -e "${statedir}/hashfile.${i}" ]; then if [ "X$docmd" = "XYES" ]; then cp -pf "${statedir}/hashfile.${i}" \ "${statedir}/hashfile.$(($i+1))" else echo cp -pf "${statedir}/hashfile.${i}" \ "${statedir}/hashfile.$(($i+1))" fi fi done if [ -e "$statedir/hashfile" ]; then if [ "X$docmd" = "XYES" ]; then cp -pf "$statedir/hashfile" "$statedir/hashfile.0" else echo cp -pf "$statedir/hashfile" "$statedir/hashfile.0" fi if [ "X$docmd" = "XYES" ]; then set +e if [ "X$VERBOSE" != "X" ]; then echo >&2 "(grep -Ev \"[[:space:]]${safe_dest_file}$\" \"$statedir/hashfile\";" grep -Ev "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" >&2 || true; md5sum "$orig_new_file" | sed "s|$orig_new_file|$dest_file|" >&2; fi grep -Ev "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" > \ "$statedir/hashfile.tmp" || true; md5sum "$orig_new_file" | sed "s|$orig_new_file|$dest_file|" >> \ "$statedir/hashfile.tmp"; mv -f "$statedir/hashfile.tmp" "$statedir/hashfile" set -e else echo "(grep -Ev \"[[:space:]]${safe_dest_file}$\" \"$statedir/hashfile\"" echo " md5sum \"$orig_new_file\" | sed \"s|$orig_new_file|$dest_file|\"; " echo ") | sort > \"$statedir/hashfile\"" fi else if [ "X$docmd" = "XYES" ]; then md5sum "$orig_new_file" | sed "s|$orig_new_file|$dest_file|" > \ "$statedir/hashfile" else echo " md5sum \"$orig_new_file\" | sed \"s|$orig_new_file|$dest_file|\" >" \ "\"$statedir/hashfile\"" fi fi file_size=$(stat -c '%s' "$orig_new_file") if [ "X$THREEWAY" != "X" ] || [ "$file_size" -lt 25600 ]; then $action cp -pf "$orig_new_file" "$statedir/cache/$cached_file" fi # cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" } replace_conf_file () { # do not mangle $dest_file since it's the one registered in the hashfile # or we have been ask to register real_file="$dest_file" if [ -L "$dest_file" ]; then real_file="$(readlink -nf $dest_file || :)" if [ "x$real_file" = "x" ]; then echo >&2 "$dest_file is a broken symlink!" $action rm -f "$dest_file"; real_file="$dest_file" fi fi if [ -e "$real_file" ]; then if [ -z "$RETAIN_OLD" ]; then #echo "Saving ${real_file}.${OLD_SUFFIX}, in case." if [ "x$VERBOSE" != "x" ]; then echo >&2 "Not saving ${real_file}, since it was unmodified" fi else $action cp -pf $selinux "${real_file}" "${real_file}.${OLD_SUFFIX}" fi fi if [ -e "${real_file}" ]; then # Do not change the permissions and attributes of the destination $action cp -f $selinux "$new_file" "${real_file}" else # No destination file exists $action cp -pf $selinux "$new_file" "${real_file}" fi replace_md5sum; } # Escape single quotes in the arguments passed in quote_single() { printf "%s\n" "$1" | sed -e "s,','\\\\'',g" } ###################################################################### ######## ######### ######## Command line args ######### ######## ######### ###################################################################### # # Long term variables# # docmd='YES' action='withecho' action= selinux='' DEBUG=0 VERBOSE='' statedir='/var/lib/ucf'; THREEWAY= DIST_SUFFIX="ucf-dist" NEW_SUFFIX="ucf-new" OLD_SUFFIX="ucf-old" ERR_SUFFIX="merge-error" # save up the cmdline with proper quoting/escaping for arg in "$@"; do saved="${saved:+$saved }'$(quote_single "$arg")'" done # Note that we use `"$@"' to let each command-line parameter expand to a # separate word. The quotes around `$@' are essential! # We need TEMP as the `eval set --' would nuke the return value of getopt. TEMP=$(getopt -a -o hs:d::D::npP:Zv -n "$progname" \ --long help,src-dir:,sum-file:,dest-dir:,debug::,DEBUG::,no-action,package:,purge,verbose,three-way,debconf-ok,debconf-template:,state-dir: \ -- "$@") # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP" while true ; do case "$1" in -h|--help) usageversion; exit 0 ;; -n|--no-action) action='echo'; docmd='NO'; shift ;; -v|--verbose) VERBOSE=1; shift ;; -P|--package) opt_package="$2"; shift 2 ;; -s|--src-dir) opt_source_dir="$2"; shift 2 ;; --sum-file) opt_old_mdsum_file="$2"; shift 2 ;; --state-dir) opt_state_dir="$2"; shift 2 ;; --debconf-template) override_template="$2"; shift 2 ;; -D|-d|--debug|--DEBUG) # d has an optional argument. As we are in quoted mode, # an empty parameter will be generated if its optional # argument is not found. case "$2" in "") setq DEBUG 1 "The Debug value"; shift 2 ;; *) setq DEBUG "$2" "The Debug value"; shift 2 ;; esac ;; -p|--purge) PURGE=YES; shift ;; --three-way) THREEWAY=YES; shift ;; --debconf-ok) DEBCONF_OK=YES; shift ;; -Z) selinux='-Z'; shift ;; --) shift ; break ;; *) echo >&2 "Internal error!" ; exit 1 ;; esac done ###################################################################### ######## ######### ######## Sanity checking ######### ######## ######### ###################################################################### # Need to run as root, or else the if test "$(id -u)" != 0; then if [ "$docmd" = "YES" ]; then echo "$progname: Need to be run as root." >&2 echo "$progname: Setting up no action mode." >&2 action='echo'; docmd='NO'; fi fi if [ "X$PURGE" = "XYES" ]; then if [ $# != 1 ]; then echo >&2 "*** ERROR: Need exactly one argument when purging, got $#"; echo >&2 "" usageversion; exit 2 ; fi temp_dest_file="$1"; if [ -e "$temp_dest_file" ]; then setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file"; else setq dest_file "$temp_dest_file" "The Destination file"; fi else if [ $# != 2 ]; then echo >&2 "*** ERROR: Need exactly two arguments, got $#"; echo >&2 "" usageversion; exit 2 ; fi temp_new_file="$1"; temp_dest_file="$2"; if [ ! -e "${temp_new_file}" ]; then echo >&2 "Error: The new file ${temp_new_file} does not exist!"; exit 1; fi setq new_file "$(readlink -q -m $temp_new_file)" "The new file"; if [ -e "$temp_dest_file" ]; then setq dest_file "$(readlink -q -m $temp_dest_file)" "The Destination file"; else setq dest_file "$temp_dest_file" "The Destination file"; fi fi # Follow dpkg-divert as though we are installed as part of $opt_package divert_line=$(dpkg-divert --listpackage "$dest_file") if [ -n "$divert_line" ]; then # name of the package or 'LOCAL' for a local diversion divert_package="$divert_line" if [ "$divert_package" != "$opt_package" ]; then dest_file=$(dpkg-divert --truename "$dest_file") fi fi safe_dest_file=$(echo "$dest_file" | perl -nle 'print "\Q$_\E\n"') ###################################################################### ######## ######### ######## Set Default Values ######### ######## ######### ###################################################################### # Load site defaults and over rides. if [ -f /etc/ucf.conf ]; then . /etc/ucf.conf fi # Command line, env variable, config file, or default if [ ! "x$opt_source_dir" = "x" ]; then setq source_dir "$opt_source_dir" "The Source directory" elif [ ! "x$UCF_SOURCE_DIR" = "x" ]; then setq source_dir "$UCF_SOURCE_DIR" "The Source directory" elif [ ! "x$conf_source_dir" = "x" ]; then setq source_dir "$conf_source_dir" "The Source directory" else if [ "X$new_file" != "X" ]; then setq source_dir "$(dirname $new_file)" "The Source directory" else setq source_dir "/tmp" "The Source directory" fi fi if [ "X$PAGER" != "X" ] && which "$PAGER" >/dev/null 2>&1 ; then my_pager="$(which $PAGER)"; elif [ -s /usr/bin/pager ] && [ "X$(readlink -e /usr/bin/pager || :)" != "X" ]; then my_pager=/usr/bin/pager elif [ -x /usr/bin/sensible-pager ]; then my_pager=/usr/bin/sensible-pager elif [ -x /bin/more ]; then my_pager=/bin/more else my_pager= fi # Command line, env variable, config file, or default if [ ! "x$opt_state_dir" = "x" ]; then setq statedir "$opt_state_dir" "The State directory" elif [ ! "x$UCF_STATE_DIR" = "x" ]; then setq statedir "$UCF_STATE_DIR" "The State directory" elif [ ! "x$conf_state_dir" = "x" ]; then setq statedir "$conf_state_dir" "The State directory" else setq statedir '/var/lib/ucf' "The State directory" fi # Command line, env variable, config file, or default if [ ! "x$opt_force_conffold" = "x" ]; then setq force_conffold "$opt_force_conffold" "Keep the old file" elif [ ! "x$UCF_FORCE_CONFFOLD" = "x" ]; then setq force_conffold "$UCF_FORCE_CONFFOLD" "Keep the old file" elif [ ! "x$conf_force_conffold" = "x" ]; then setq force_conffold "$conf_force_conffold" "Keep the old file" else force_conffold='' fi # Command line, env variable, config file, or default if [ ! "x$opt_force_conffnew" = "x" ]; then setq force_conffnew "$opt_force_conffnew" "Replace the old file" elif [ ! "x$UCF_FORCE_CONFFNEW" = "x" ]; then setq force_conffnew "$UCF_FORCE_CONFFNEW" "Replace the old file" elif [ ! "x$conf_force_conffnew" = "x" ]; then setq force_conffnew "$conf_force_conffnew" "Replace the old file" else force_conffnew='' fi # Command line, env variable, config file, or default if [ ! "x$opt_force_conffmiss" = "x" ]; then setq force_conffmiss "$opt_force_conffmiss" "Replace any missing files" elif [ ! "x$UCF_FORCE_CONFFMISS" = "x" ]; then setq force_conffmiss "$UCF_FORCE_CONFFMISS" "Replace any missing files" elif [ ! "x$conf_force_conffmiss" = "x" ]; then setq force_conffmiss "$conf_force_conffmiss" "Replace any missing files" else force_conffmiss='' fi if [ -n "$opt_old_mdsum_file" ]; then setq old_mdsum_file "$opt_old_mdsum_file" "The md5sum is found here" elif [ ! "x$UCF_OLD_MDSUM_FILE" = "x" ]; then setq old_mdsum_file "$UCF_OLD_MDSUM_FILE" "The md5sum is found here" elif [ ! "x$conf_old_mdsum_file" = "x" ]; then setq old_mdsum_file "$conf_old_mdsum_file" "Replace the old file" elif [ ! "x${new_file}" = "x" ]; then old_mdsum_file="$source_dir/$(basename ${new_file}).md5sum"; else old_mdsum_file=""; fi ###################################################################### ######## ######### ######## More Sanity checking ######### ######## ######### ###################################################################### if [ "X$force_conffold" != "X" -a "X$force_conffnew" != "X" ]; then echo >&2 "Error: Only one of force_conffold and force_conffnew should"; echo >&2 " be set"; exit 1; fi # VERBOSE of 0 is supposed to be the same as not setting VERBOSE if [ "X$VERBOSE" = "X0" ]; then VERBOSE='' fi # if [ -e "$statedir/hashfile" -a ! -w "$statedir/hashfile" ]; then echo >&2 "ucf: do not have write privilege to the state data" if [ "X$docmd" = "XYES" ]; then exit 1; fi fi if [ ! -d $statedir/cache ]; then $action mkdir -p $statedir/cache ; fi # test and see if this file exists in the database if [ -e "$statedir/hashfile" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 "The hash file exists" echo >&2 "grep -E" "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" grep -E "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" >&2 || true fi lastsum=$(grep -E "[[:space:]]${safe_dest_file}$" "$statedir/hashfile" | \ awk '{print $1;}' ) fi if [ ! "x${new_file}" = "x" ]; then old_mdsum_dir="$source_dir/"$(basename "${new_file}")".md5sum.d"; else old_mdsum_dir=""; fi cached_file="$(echo $dest_file | tr / :)" ###################################################################### ######## ######### ######## Debugging dump ######### ######## ######### ###################################################################### if [ $DEBUG -gt 0 ]; then cat >&2 <<EOF The new start file is \`$new_file\' The destination is \`$dest_file\' (\`$safe_dest_file\') The history is kept under \'$source_dir\' The file may be cached at \'$statedir/cache/$cached_file\' EOF if [ -s "$dest_file" ]; then echo "The destination file exists, and has md5sum:" md5sum "$dest_file" else echo "The destination file does not exist." fi if [ "X$lastsum" != "X" ]; then echo "The old md5sum exists, and is:" echo "$lastsum" else echo "The old md5sum does not exist." if [ -d "$old_mdsum_dir" -o -f "$old_mdsum_file" ]; then echo "However, there are historical md5sums around." fi fi if [ -e "$new_file" ]; then echo "The new file exists, and has md5sum:" md5sum "$new_file" else echo "The new file does not exist." fi if [ -d "$old_mdsum_dir" ]; then echo "The historical md5sum dir $old_mdsum_dir exists" elif [ -f "$old_mdsum_file" ]; then echo "The historical md5sum file $old_mdsum_file exists" else echo "Historical md5sums are not available" fi fi ###################################################################### ######## ######### ######## Short circuit if we are purging ######### ######## ######### ###################################################################### if [ "X$PURGE" = "XYES" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 "Preparing to purge ${dest_file}" fi purge_md5sum; exit 0; fi # now we can restore $@ eval set -- "$saved" ###################################################################### ######## ######### ######## DebConf stuff ######### ######## ######### ###################################################################### # Is debconf already running? Kinda tricky, because it will be after the # confmodule is sourced, so only test before that. if [ -z "$DEBCONF_ALREADY_RUNNING" ]; then if [ "$DEBIAN_HAS_FRONTEND" ]; then DEBCONF_ALREADY_RUNNING='YES' else DEBCONF_ALREADY_RUNNING='NO' fi fi export DEBCONF_ALREADY_RUNNING if [ -z "$DEBCONF_OK" ]; then if [ "$DEBCONF_ALREADY_RUNNING" = 'YES' ]; then DEBCONF_OK='NO' else DEBCONF_OK='YES' fi fi # Time to start nagging the users who call ucf without debconf-ok if [ "$DEBCONF_ALREADY_RUNNING" = 'YES' ] && [ "$DEBCONF_OK" = NO ]; then # Commented out for now, uncomment after a while to begin nagging # maintainers to fix their scripts. cat \ <<END *** WARNING: ucf was run from a maintainer script that uses debconf, but the script did not pass --debconf-ok to ucf. The maintainer script should be fixed to not stop debconf before calling ucf, and pass it this parameter. For now, ucf will revert to using old-style, non-debconf prompting. Ugh! Please inform the package maintainer about this problem. END fi # Start up debconf or at least get the db_* commands available if [ -e /usr/share/debconf/confmodule ]; then if test "$(id -u)" = 0; then . /usr/share/debconf/confmodule # Load our templates, just in case our template has # not been loaded or the Debconf DB lost or corrupted # since then, but only if it is OK to use debconf. if [ "$DEBCONF_OK" = 'YES' ]; then db_x_loadtemplatefile "$(dpkg-query --control-path ucf templates)" ucf fi else echo >&2 "$progname: Not loading confmodule, since we are not running as root." fi # Only set the title if debconf was not already running. # If it was running, then we do not want to clobber the # title used for configuring the whole package with debconf. if [ "$DEBCONF_ALREADY_RUNNING" = 'NO' ]; then if ! db_settitle ucf/title 2>/dev/null; then # Older debconf that does not support that command. if test "$(id -u)" = 0; then db_title "Modified configuration file" else echo >&2 "$progname: Not changing title, since we are not running as root." fi fi fi fi ###################################################################### ######## ######### ######## Start Processing ######### ######## ######### ###################################################################### orig_new_file="$new_file" # Since sometimes we replace the newfile below newsum=$(md5sum "$new_file" | awk '{print $1}') # Determine the action for the current file. The default is to ask, # with non-replacement being the norm. # If the config dir exists # if file in always overwrite, state +=1; # fi # if file in never overwrite, state +=2; # fi # if file in ask; state +=4 # fi # if state == 0; then state = default # if state >= 4; ask # if state == 3; ask # if state == 2; exit # if state == 1; then replace_conffile; exit ###################################################################### ######## ######### ######## Do the replacement ######### ######## ######### ###################################################################### # Step 1: If we have no record of this file, and dest file # does, We need to determine how to initialize the # ${old_mdsum_prefix}.old file.. if [ -e "$dest_file" ]; then destsum=$(md5sum "$dest_file" | awk '{print $1}'); if [ "X$lastsum" = "X" ]; then # a: If we have a directory containing historical md5sums of this # file in question, we should look and see if the currently # installed file matches any of the old md5sums; in which case # it can be silently replaced. if [ -d "$old_mdsum_dir" -o -f "$old_mdsum_file" ]; then if [ -d "$old_mdsum_dir" ]; then for file in ${old_mdsum_dir}/*; do oldsum="$(awk '{print $1}' $file)"; if [ "$oldsum" = "$destsum" ]; then if [ "X$force_conffold" = "X" ]; then # Bingo! replace, set the md5sum, and we are done if [ "X$VERBOSE" != "X" ]; then echo >&2 \ "Replacing config file $dest_file with new version" fi replace_conf_file; exit 0; else replace_md5sum; cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" exit 0; fi fi done elif [ -f "$old_mdsum_file" ]; then oldsum=$(grep -E "^${destsum}" "$old_mdsum_file" || true) if [ "X$oldsum" != "X" ]; then # Bingo if [ "X$force_conffold" = "X" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 \ "Replacing config file $dest_file with new version" fi replace_conf_file; exit 0; else replace_md5sum; cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" exit 0; fi fi fi # Well, nothing matched. We now check to see if the # maintainer has an opinion on how to set the ``md5sum of the # previously installed version'', since we have no way of # determining that automatically. Please note that unless # there are limited number of previously released packages # (like just one), the maintainer is also making a guess at # this point by supplying a historical md5sum default file. if [ "X$VERBOSE" != "X" ]; then echo >&2 "Historical md5sums did not match." fi if [ -d "$old_mdsum_dir" ]; then if [ -e "${old_mdsum_dir}/default" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 "However, a default entry exists, using it." fi lastsum="$(awk '{print $1;}' ${old_mdsum_dir}/default)" do_replace_md5sum=1; fi elif [ -f "$old_mdsum_file" ]; then oldsum=$(grep -E "[[:space:]]default$" "$old_mdsum_file" | \ awk '{print $1;}') if [ "X$oldsum" != "X" ]; then # Bingo lastsum=$oldsum; do_replace_md5sum=1; fi fi fi # At this point, we are almost certain that either the # historical record of md5sums is not complete, or the user has # changed the configuration file. Rather than guessing and # chosing one of the historical md5sums, we fall through to the # solution used if there had been no historical md5sums # directory/file. if [ "X$lastsum" = "X" ]; then # b: We do not have a historical list of md5sums, or none # matched, and we still need to initialize the # ${old_mdsum_prefix}.old file. We can't determine whther or # not they made any changes, so we err on the side of caution # and ask' if [ "X$VERBOSE" != "X" ]; then echo >&2 "No match found, we shall ask." fi lastsum='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; fi # the old md5sum file does not exist, and the historical # record failed fi # the old md5sum file does not exist (bug)) else # "$dest_file" does not exist # Step 2: If destfile does not exist, create it, set the file # "${old_mdsum_prefix}.old" to the md5sum of the new file, and we # are done if [ "X$lastsum" = "X" ]; then # Ok, so there is no indication that the package was ever # installed on this machine. echo >&2 "" echo >&2 "Creating config file $dest_file with new version" replace_conf_file; exit 0; elif [ "$lastsum" = "$newsum" ]; then # OK, new version of the file is the same as the last version # we saw. Since the user apparently has deleted the file, # nothing needs be done, unless we have been told differently if [ "X$force_conffmiss" != "X" ]; then echo >&2 "" echo >&2 "Recreating deleted config file $dest_file with new version, as asked" replace_conf_file; exit 0; else echo >&2 "Not replacing deleted config file $dest_file"; fi else # OK. New upstream version. if [ "X$force_conffmiss" != "X" ]; then # User has said to replace missing files, so we do so, no # questions asked. echo >&2 "" echo >&2 "Recreating deleted config file $dest_file with new version, as asked" replace_conf_file; exit 0; else # Even though the user has deleted this file, they should # be asked now, unless specified otherwise. if [ "X$force_conffold" = "X" ]; then destsum='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; else exit 0; fi fi fi fi # Here, the destfile exists. # step 3: If the old md5sum and the md5sum of the new file # do not match, we need to take action. if [ "$lastsum" = "$newsum" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 "md5sums match, nothing needs be done." fi if [ "X$do_replace_md5sum" != "X" ]; then replace_md5sum; fi exit 0; # Hah. Match. We are done. fi # a: If the md5sum of the dest file is the same as lastsum, replace the # destfile, saying we are replacing old config files if [ "$destsum" = "$lastsum" ]; then if [ "X$force_conffold" = "X" ]; then echo >&2 "Replacing config file $dest_file with new version" replace_conf_file; exit 0; else replace_md5sum; cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" exit 0; fi else # b: If the md5sum of the dest file differs from lastsum, we need to ask # the user what action to take. if [ "X$force_conffnew" != "X" ]; then echo >&2 "Replacing config file $dest_file with new version" echo >&2 "since you asked for it." if [ "$destsum" = "$newsum" ]; then echo >&2 "The new and the old files are identical, AFAICS" else echo >&2 "The new and the old files are different" fi replace_conf_file; exit 0; fi if [ "X$force_conffold" != "X" ]; then replace_md5sum; cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" exit 0; fi # c: If the destination file is the same as the new maintianer provided one, # we need do nothing. if [ "$newsum" = "$destsum" ]; then if [ "X$VERBOSE" != "X" ]; then echo >&2 "md5sums of the file in place matches, nothing needs be done." fi replace_md5sum; exit 0; # Hah. Match. We are done. fi done='NO'; while [ "X$done" = "XNO" ]; do if [ "$DEBCONF_OK" = "YES" ] && [ "$DEBIAN_HAS_FRONTEND" ]; then # Use debconf to prompt. if [ -e "$statedir/cache/$cached_file" ] && [ "X$THREEWAY" != "X" ]; then templ=ucf/changeprompt_threeway else templ=ucf/changeprompt fi if [ "X$override_template" != "X" ]; then choices="$(db_metaget $templ Choices-C)" choices2="$(db_metaget $override_template Choices-C)" if [ "$choices" = "$choices2" ]; then templ=$override_template fi fi db_fset "$templ" seen false db_reset "$templ" db_subst "$templ" FILE "$dest_file" db_subst "$templ" NEW "$new_file" db_subst "$templ" BASENAME "$(basename $dest_file)" db_input critical "$templ" || true if ! db_go; then # The current ucf interface does not provide a way for it # to tell its caller that the user chose to back up. # However, we could get here, if the caller turned on # debconf's backup capb. The best thing to do seems to be # to ignore requests to back up. continue fi db_get "$templ" ANSWER="$RET" else echo >&2 "Need debconf to interact" exit 2 ######################################################################################## # # Prompt without using debconf. # # cat >&2 <<EOPRMT # # Configuration file \`$dest_file' # # ==> File on system created by you or by a script. # # ==> File also in package provided by package maintainer. # # What would you like to do about it ? Your options are: # # Y or I : install the package maintainer's version # # N or O : keep your currently-installed version # # D : show the differences between the versions # # S : show the side-by-side differences between the versions # # EOPRMT # # if [ "X$THREEWAY" != "X" -a -e "$statedir/cache/$cached_file" ]; then # # cat >&2 <<EOTD # # 3 or T : show a three way difference between current, older, # # and new versions of the file # # M : Do a 3 way merge between current, older, # # and new versions of the file [Very Experimental] # # EOTD # # fi # # cat >&2 <<EOPEND # # Z : start a new shell to examine the situation # # The default action is to keep your current version. # # EOPEND # # if [ "X$THREEWAY" != "X" -a -e "$statedir/cache/$cached_file" ]; then # # echo -n >&2 "*** " $(basename "$dest_file") \ # # " (Y/I/N/O/D/3/T/M/Z) [default=N] ?" # # else # # echo -n >&2 "*** " $(basename "$dest_file") \ # # " (Y/I/N/O/D/Z) [default=N] ?" # # fi # # read -e ANSWER </dev/tty # ######################################################################################## fi case "$ANSWER" in install_new|y|Y|I|i) echo >&2 "Replacing config file $dest_file with new version" RETAIN_OLD=YES replace_conf_file; exit 0; ;; diff|D|d) DIFF="$(run_diff diff -uBbwt "$dest_file" "$new_file")" show_diff "$DIFF" ;; sdiff|S|s) DIFF="$(run_diff sdiff -BbW "$dest_file" "$new_file")" show_diff "$DIFF" ;; diff_threeway|3|t|T) if [ -e "$statedir/cache/$cached_file" \ -a "X$THREEWAY" != "X" ]; then if [ -e "$dest_file" ]; then DIFF="$(diff3 -L Current -L Older -L New -A \ "$dest_file" "$statedir/cache/$cached_file" \ "$new_file")" || true else DIFF="$(diff3 -L Current -L Older -L New -A \ /dev/null "$statedir/cache/$cached_file" \ "$new_file")" || true fi show_diff "$DIFF" else DIFF="$(run_diff diff -uBbwt "$dest_file" "$new_file")" show_diff "$DIFF" fi ;; merge_threeway|M|m) echo >&2 "Merging changes into the new version" if [ -e "$statedir/cache/$cached_file" \ -a "X$THREEWAY" != "X" ]; then ret=0 diff3 -L Current -L Older -L New -m \ "$dest_file" "$statedir/cache/$cached_file" \ "$new_file" > "$dest_file.${NEW_SUFFIX}" || ret=$? case "$ret" in 0) new_file="$dest_file.${NEW_SUFFIX}" RETAIN_OLD=YES replace_conf_file rm -f "$dest_file.${NEW_SUFFIX}" # don't need this around no mo' exit 0 ;; *) mv "$dest_file.${NEW_SUFFIX}" "$dest_file.${ERR_SUFFIX}" db_subst ucf/conflicts_found dest_file "$dest_file" db_subst ucf/conflicts_found ERR_SUFFIX "${ERR_SUFFIX}" db_input critical ucf/conflicts_found || true db_go || true ;; esac else replace_conf_file rm -f "$dest_file.${NEW_SUFFIX}" # don't need this around no mo' exit 0 fi ;; shell|Z|z) # We explicitly connect STDIN and STDOUT to the # script's controlling terminal, so even if STDIN is # fed by a pipe, as is the case when run from # /usr/bin/debconf, the shell should be fully # functional. However, the test for a controlling # terminal uses /usr/bin/tty, which consults only # STDIN. As far as I can tell, when run from debconf, # ucf will _never_ use the current terminal. If the # goal is to check for access to a terminal, the test # should be for foreground process group membership, # not a terminal connected to STDIN (tty -s), and not # a terminal it doesn't necessarily own (tty -s # </dev/tty). The easiest way do this from a shell is # probably with /bin/ps. if ps -o stat= --ppid $$ | grep -q '+'; then export UCF_CONFFILE_OLD="$dest_file" export UCF_CONFFILE_NEW="$new_file" bash >/dev/tty </dev/tty || true elif [ -n "$DISPLAY" ]; then x-terminal-emulator || true else # Don't know what to do echo >&2 "No terminal, and no DISPLAY set, can't fork shell." sleep 3; fi ;; keep_current|n|N|o|O|'') replace_md5sum; cp -pf "$orig_new_file" "$dest_file.${DIST_SUFFIX}" exit 0; ;; *) if [ "$DEBCONF_OK" = "YES" ]; then echo "Error: unknown response from debconf:'$RET'" >&2 exit 1 else echo echo "Please answer with one of the single letters listed." >&2 echo fi esac done fi db_stop exit 0;