OXIESEC PANEL
- Current Dir:
/
/
snap
/
core
/
17210
/
usr
/
bin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
10/02/2024 07:52:54 PM
rwxr-xr-x
π
2to3-3.5
96 bytes
09/30/2024 02:20:29 PM
rwxr-xr-x
π
[
50.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
aa-enabled
22.16 KB
06/29/2023 11:30:47 AM
rwxr-xr-x
π
abootimg
18.27 KB
07/28/2011 06:29:01 AM
rwxr-xr-x
π
abootimg-pack-initrd
362 bytes
07/28/2011 06:29:00 AM
rwxr-xr-x
π
abootimg-unpack-initrd
272 bytes
07/28/2011 06:29:00 AM
rwxr-xr-x
π
addpart
18.45 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
arch
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
awk
642.72 KB
09/11/2023 06:21:20 PM
rwxr-xr-x
π
base32
38.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
base64
38.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
basename
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
bashbug
6.79 KB
04/19/2022 01:41:38 PM
rwxr-xr-x
π
bootctl
74.44 KB
03/03/2023 04:27:52 AM
rwxr-xr-x
π
busctl
363.21 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
c_rehash
6.05 KB
03/12/2024 01:38:19 PM
rwxr-xr-x
π
captoinfo
70.71 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
catchsegv
3.26 KB
05/08/2024 03:46:54 PM
rwxr-xr-x
π
cautious-launcher
853 bytes
10/30/2015 03:39:30 PM
rwxr-xr-x
π
cgm
17.99 KB
01/18/2016 06:55:49 PM
rwxr-xr-x
π
chacl
13.99 KB
04/21/2017 08:44:54 PM
rwxr-xr-x
π
chage
60.88 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
chardet3
309 bytes
02/10/2016 05:12:09 PM
rwxr-xr-x
π
chardetect3
309 bytes
02/10/2016 05:12:09 PM
rwxr-xr-x
π
chattr
10.34 KB
06/03/2022 08:47:31 PM
rwxr-xr-x
π
chcon
62.92 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
chfn
70.14 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
chrt
26.67 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
chsh
39.48 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
ckbcomp
144.19 KB
04/10/2019 09:25:58 PM
rwxr-xr-x
π
cksum
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
clear
6.08 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
clear_console
10.27 KB
04/19/2022 01:41:45 PM
rwxr-xr-x
π
cloud-id
310 bytes
04/25/2023 09:28:48 PM
rwxr-xr-x
π
cloud-init
314 bytes
04/25/2023 09:28:48 PM
rwxr-xr-x
π
cloud-init-per
2.06 KB
03/19/2021 02:37:22 PM
rwxr-xr-x
π
cmp
42.67 KB
12/26/2015 11:11:28 PM
rwxr-xr-x
π
codepage
10.29 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
comm
34.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
compose
17.55 KB
10/30/2015 03:39:30 PM
rwxr-xr-x
π
console-conf
2.86 KB
01/25/2017 10:18:22 PM
rwxr-xr-x
π
crontab
35.23 KB
05/10/2022 10:15:25 PM
rwxr-xr-x
π
csplit
46.86 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
ctstat
18.68 KB
04/16/2019 12:37:11 PM
rwxr-xr-x
π
cut
38.8 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
dbus-cleanup-sockets
9.98 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-daemon
218.95 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-monitor
21.99 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-run-session
9.98 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-send
21.98 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-update-activation-environment
13.98 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
dbus-uuidgen
9.98 KB
09/14/2023 10:58:48 AM
rwxr-xr-x
π
deallocvt
10.3 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
deb-systemd-helper
17.99 KB
02/29/2016 12:24:38 PM
rwxr-xr-x
π
deb-systemd-invoke
4.37 KB
02/29/2016 12:24:38 PM
rwxr-xr-x
π
debconf
2.79 KB
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-apt-progress
11.27 KB
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-communicate
608 bytes
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-copydb
1.68 KB
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-escape
647 bytes
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-set-selections
2.87 KB
05/08/2019 06:33:33 PM
rwxr-xr-x
π
debconf-show
1.78 KB
05/08/2019 06:33:33 PM
rwxr-xr-x
π
delpart
18.45 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
dh_bash-completion
2.49 KB
08/18/2015 07:47:29 PM
rwxr-xr-x
π
dh_pypy
11.71 KB
08/16/2019 12:59:18 AM
rwxr-xr-x
π
dh_python3
11.91 KB
08/16/2019 12:59:18 AM
rwxr-xr-x
π
diff
123.08 KB
12/26/2015 11:11:28 PM
rwxr-xr-x
π
diff3
54.86 KB
12/26/2015 11:11:28 PM
rwxr-xr-x
π
dircolors
38.71 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
dirname
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
dotlockfile
14.51 KB
12/07/2013 03:08:22 AM
rwxr-xr-x
π
dpkg-deb
131.43 KB
05/27/2022 10:37:03 AM
rwxr-xr-x
π
du
119.17 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
dumpimage
139.06 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
dumpkeys
166.52 KB
01/22/2018 01:49:48 PM
rwxr-xr-x
π
ec2metadata
7.12 KB
09/29/2020 06:17:10 PM
rwxr-xr-x
π
edit
17.55 KB
10/30/2015 03:39:30 PM
rwxr-xr-x
π
editor
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
env
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
envsubst
34.51 KB
11/07/2018 06:33:51 PM
rwxr-xr-x
π
ex
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
expand
30.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
expiry
22.23 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
expr
38.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
factor
70.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
faillog
18.25 KB
02/07/2024 10:59:50 AM
rwxr-xr-x
π
fallocate
22.56 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
finalrd
2.1 KB
09/17/2020 05:03:45 PM
rwxr-xr-x
π
find
216.57 KB
02/07/2016 11:18:24 PM
rwxr-xr-x
π
flock
26.71 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
fmt
38.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
fold
34.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
free
18.37 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
fw_printenv
36.29 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
fw_setenv
36.29 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
fwupdate
13.99 KB
01/18/2018 08:25:49 AM
rwxr-xr-x
π
gawk
642.72 KB
09/11/2023 06:21:20 PM
rwxr-xr-x
π
gdbserver
408.53 KB
06/18/2024 06:21:58 AM
rwxr-xr-x
π
getconf
22.41 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
getent
27.3 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
getfacl
22.62 KB
04/21/2017 08:44:54 PM
rwxr-xr-x
π
getkeycodes
10.3 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
getopt
14.43 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
gettext
34.48 KB
11/07/2018 06:33:51 PM
rwxr-xr-x
π
gettext.sh
4.52 KB
11/07/2018 06:33:51 PM
rwxr-xr-x
π
gpasswd
73.54 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
gpg
984.87 KB
07/12/2022 12:13:08 AM
rwxr-xr-x
π
gpg-zip
3.23 KB
07/12/2022 12:13:07 AM
rwxr-xr-x
π
gpgsplit
58.76 KB
07/12/2022 12:13:08 AM
rwxr-xr-x
π
gpgv
363.63 KB
07/12/2022 12:13:08 AM
rwxr-xr-x
π
groups
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
growpart
20.99 KB
09/29/2020 06:17:10 PM
rwxr-xr-x
π
grub-editenv
228.78 KB
04/30/2021 04:02:29 PM
rwxr-xr-x
π
head
38.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
helpztags
2.46 KB
04/08/2016 11:39:52 AM
rwxr-xr-x
π
hostid
26.64 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
hostnamectl
287.2 KB
03/03/2023 04:27:52 AM
rwxr-xr-x
π
i386
14.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
iconv
59 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
id
38.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
igawk
3.11 KB
09/11/2023 06:21:18 PM
rwxr-xr-x
π
infocmp
54.57 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
infotocap
70.71 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
install
135.59 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
ionice
22.59 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
ipcmk
22.69 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
ipcrm
26.54 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
ipcs
46.71 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
iptables-xml
92.74 KB
05/09/2023 06:42:18 PM
rwxr-xr-x
π
ischroot
10.34 KB
01/26/2016 06:17:55 PM
rwxr-xr-x
π
join
46.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
jsondiff
976 bytes
11/27/2015 02:19:18 PM
rwxr-xr-x
π
jsonpatch
3.58 KB
11/27/2015 02:19:18 PM
rwxr-xr-x
π
jsonpointer
1.31 KB
10/24/2015 05:34:42 AM
rwxr-xr-x
π
jwt3
288 bytes
08/29/2017 06:41:38 PM
rwxr-xr-x
π
kbdinfo
10.31 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
kwboot
14.33 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
last
38.84 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lastb
38.84 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lastlog
14.03 KB
02/07/2024 10:59:50 AM
rwxr-xr-x
π
lcf
7.6 KB
03/16/2016 08:58:51 PM
rwxr-xr-x
π
ldd
5.3 KB
05/08/2024 03:46:59 PM
rwxr-xr-x
π
less
166.76 KB
12/01/2017 04:11:09 AM
rwxr-xr-x
π
lessecho
10.02 KB
12/01/2017 04:11:09 AM
rwxr-xr-x
π
lessfile
8.36 KB
12/01/2017 04:11:09 AM
rwxr-xr-x
π
lesskey
19.39 KB
12/01/2017 04:11:09 AM
rwxr-xr-x
π
lesspipe
8.36 KB
12/01/2017 04:11:09 AM
rwxr-xr-x
π
line
10.32 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
link
26.64 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
linux-check-removal
3.99 KB
03/18/2020 11:32:20 AM
rwxr-xr-x
π
linux-update-symlinks
6.17 KB
03/18/2020 11:32:20 AM
rwxr-xr-x
π
linux-version
2.63 KB
03/18/2020 11:32:20 AM
rwxr-xr-x
π
linux32
14.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
linux64
14.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lnstat
18.68 KB
04/16/2019 12:37:11 PM
rwxr-xr-x
π
loadkeys
206.57 KB
01/22/2018 01:49:48 PM
rwxr-xr-x
π
loadunimap
26.66 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
locale
37.91 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
localectl
295.22 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
localedef
315.71 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
lockfile-check
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
lockfile-create
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
lockfile-remove
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
lockfile-touch
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
logger
35.35 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
logname
26.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
lsattr
10.33 KB
06/03/2022 08:47:31 PM
rwxr-xr-x
π
lscpu
55.12 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lsinitramfs
2.43 KB
10/07/2019 10:53:35 AM
rwxr-xr-x
π
lsipc
59 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lslocks
31.09 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lslogins
51.15 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
lspgpot
1.06 KB
06/25/2014 04:17:29 PM
rwxr-xr-x
π
lzcat
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
lzcmp
5.39 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzdiff
5.39 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzegrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzfgrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzgrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzless
1.78 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
lzma
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
lzmainfo
10.31 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
lzmore
2.12 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
mail-lock
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
mail-touchlock
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
mail-unlock
14.25 KB
12/03/2012 11:37:50 PM
rwxr-xr-x
π
mapscrn
18.66 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
mawk
115.01 KB
03/24/2014 09:53:33 AM
rwxr-xr-x
π
mcookie
26.71 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
md5sum
42.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
md5sum.textutils
42.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
mesg
10.37 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
mk_modmap
15.78 KB
09/22/2016 05:33:20 PM
rwxr-xr-x
π
mkenvimage
14.2 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
mkfifo
58.95 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
mkimage
143.06 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
mkknlimg
5.87 KB
06/12/2019 09:45:47 AM
rwxr-xr-x
π
mksquashfs
174.12 KB
09/15/2021 01:04:44 PM
rwxr-xr-x
π
mksunxiboot
6.12 KB
06/12/2019 09:45:58 AM
rwxr-xr-x
π
mkswapfile
865 bytes
10/02/2024 07:41:37 PM
rwxr-xr-x
π
namei
26.58 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
nawk
642.72 KB
09/11/2023 06:21:20 PM
rwxr-xr-x
π
newgrp
38.97 KB
02/07/2024 10:59:50 AM
rwxr-xr-x
π
ngettext
34.5 KB
11/07/2018 06:33:51 PM
rwxr-xr-x
π
nice
34.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
nl
38.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
nohup
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
nproc
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
nsenter
26.88 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
nstat
22.47 KB
04/16/2019 12:37:11 PM
rwxr-xr-x
π
numfmt
58.86 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
od
66.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
openssl
545.97 KB
03/12/2024 01:38:30 PM
rwxr-xr-x
π
pager
166.73 KB
04/28/2024 12:17:46 PM
rwxr-xr-x
π
partx
75.63 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
passwd
52.98 KB
02/07/2024 10:59:49 AM
rwxr-xr-x
π
paste
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
pathchk
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
pdb3
59.56 KB
09/30/2024 02:20:36 PM
rwxr-xr-x
π
pdb3.5
59.56 KB
09/30/2024 02:20:36 PM
rwxr-xr-x
π
perl
1.82 MB
05/23/2023 05:16:56 PM
rwxr-xr-x
π
perl5.22.1
1.82 MB
05/23/2023 05:16:56 PM
rwxr-xr-x
π
pg
38.91 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
pgrep
26.63 KB
11/01/2023 07:23:47 AM
rwxr-xr-x
π
pinky
34.86 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
pkill
26.63 KB
11/01/2023 07:23:47 AM
rwxr-xr-x
π
pldd
14.59 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
π
plog
146 bytes
01/27/2016 04:19:52 PM
rwxr-xr-x
π
pmap
30.61 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
poff
2.77 KB
01/27/2016 04:19:52 PM
rwxr-xr-x
π
pon
1.33 KB
01/27/2016 04:19:52 PM
rwxr-xr-x
π
pr
74.95 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
print
17.55 KB
10/30/2015 03:39:30 PM
rwxr-xr-x
π
printenv
30.64 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
printf
46.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
prlimit
31.3 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
probert
2.09 KB
02/17/2017 02:26:29 AM
rwxr-xr-x
π
psfaddtable
18.42 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
psfgettable
18.42 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
psfstriptable
18.42 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
psfxtable
18.42 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
ptx
66.95 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
pwdx
10.36 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
py3clean
7.62 KB
03/23/2016 11:00:30 AM
rwxr-xr-x
π
py3compile
11.83 KB
03/23/2016 11:00:30 AM
rwxr-xr-x
π
py3versions
11.44 KB
03/23/2016 11:00:39 AM
rwxr-xr-x
π
pybuild
21.33 KB
08/16/2019 12:59:18 AM
rwxr-xr-x
π
pydoc3
79 bytes
09/30/2024 02:20:29 PM
rwxr-xr-x
π
pydoc3.5
79 bytes
09/30/2024 02:20:29 PM
rwxr-xr-x
π
pygettext3
21.73 KB
09/30/2024 02:20:29 PM
rwxr-xr-x
π
pygettext3.5
21.73 KB
09/30/2024 02:20:29 PM
rwxr-xr-x
π
python3
4.25 MB
09/30/2024 02:23:24 PM
rwxr-xr-x
π
python3-jsondiff
976 bytes
11/27/2015 02:19:18 PM
rwxr-xr-x
π
python3-jsonpatch
3.58 KB
11/27/2015 02:19:18 PM
rwxr-xr-x
π
python3-jsonpointer
1.31 KB
10/24/2015 05:34:42 AM
rwxr-xr-x
π
python3.5
4.25 MB
09/30/2024 02:23:24 PM
rwxr-xr-x
π
python3.5m
4.25 MB
09/30/2024 02:23:24 PM
rwxr-xr-x
π
python3m
4.25 MB
09/30/2024 02:23:24 PM
rwxr-xr-x
π
rcp
86.14 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
realpath
58.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
rename.ul
14.41 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
renice
10.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
reset
18.42 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
resizecons
18.6 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
resizepart
34.86 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
rev
10.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
rgrep
30 bytes
03/04/2016 05:02:24 PM
rwxr-xr-x
π
rlogin
690.67 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
routef
173 bytes
11/04/2015 12:34:46 AM
rwxr-xr-x
π
routel
1.23 KB
11/04/2015 12:34:46 AM
rwxr-xr-x
π
rsh
690.67 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
rtstat
18.68 KB
04/16/2019 12:37:11 PM
rwxr-xr-x
π
run-mailcap
17.55 KB
10/30/2015 03:39:30 PM
rwxr-xr-x
π
runcon
34.8 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
rview
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
savelog
10.22 KB
01/26/2016 06:17:55 PM
rwxr-xr-x
π
sc-logresolve
816 bytes
11/19/2015 03:43:04 PM
rwxr-xr-x
π
scmp_sys_resolver
10.26 KB
04/29/2022 02:07:05 PM
rwxr-xr-x
π
scp
86.14 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
screendump
10.33 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
script
22.66 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
scriptreplay
14.4 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
sdiff
46.78 KB
12/26/2015 11:11:28 PM
rwxr-xr-x
π
see
17.55 KB
10/30/2015 03:39:30 PM
rwxr-xr-x
π
select-editor
1.19 KB
02/21/2018 07:37:33 PM
rwxr-xr-x
π
sensible-browser
1.11 KB
02/21/2018 07:37:33 PM
rwxr-xr-x
π
sensible-editor
1.08 KB
02/21/2018 07:37:33 PM
rwxr-xr-x
π
sensible-pager
288 bytes
02/21/2018 07:37:33 PM
rwxr-xr-x
π
seq
46.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
setarch
14.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
setfacl
34.68 KB
04/21/2017 08:44:54 PM
rwxr-xr-x
π
setkeycodes
10.29 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
setleds
10.32 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
setlogcons
10.27 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
setmetamode
10.37 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
setsid
10.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
setterm
34.61 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
sftp
134.36 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
sg
38.97 KB
02/07/2024 10:59:50 AM
rwxr-xr-x
π
sha1sum
42.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
sha224sum
50.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
sha256sum
50.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
sha384sum
54.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
sha512sum
54.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
showconsolefont
18.4 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
showkey
14.34 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
shred
54.92 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
shuf
54.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
skill
22.61 KB
11/01/2023 07:23:47 AM
rwxr-xr-x
π
slabtop
18.47 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
slogin
690.67 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
snap
15.85 MB
06/06/2024 02:32:02 PM
rwxr-xr-x
π
snapctl
6.13 MB
06/06/2024 02:32:03 PM
rwxr-xr-x
π
snapfuse
38.61 KB
06/06/2024 02:32:02 PM
rwxr-xr-x
π
snice
22.61 KB
11/01/2023 07:23:47 AM
rwxr-xr-x
π
sort
107.46 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
split
67.41 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
splitfont
10.27 KB
09/22/2016 05:33:23 PM
rwxr-xr-x
π
ssh
690.67 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
ssh-add
330.21 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
ssh-agent
350.22 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
ssh-argv0
1.42 KB
05/13/2020 02:12:28 PM
rwxr-xr-x
π
ssh-copy-id
10.12 KB
03/09/2016 06:04:48 PM
rwxr-xr-x
π
ssh-keygen
390.23 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
ssh-keyscan
406.23 KB
09/04/2024 01:11:37 PM
rwxr-xr-x
π
stat
79.05 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
stdbuf
62.83 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
sudo
133.6 KB
05/24/2023 01:48:57 PM
rwxr-xr-x
π
sudoedit
133.6 KB
05/24/2023 01:48:57 PM
rwxr-xr-x
π
sudoreplay
46.56 KB
05/24/2023 01:48:57 PM
rwxr-xr-x
π
sum
38.74 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
systemd-analyze
1.43 MB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-cat
34.43 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-cgls
291.22 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-cgtop
303.3 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-delta
62.59 KB
03/03/2023 04:27:52 AM
rwxr-xr-x
π
systemd-detect-virt
34.42 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-path
42.42 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-resolve
327.21 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-run
367.52 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
systemd-stdio-bridge
343.2 KB
03/03/2023 04:27:52 AM
rwxr-xr-x
π
tabs
14.23 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
tac
34.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tail
62.92 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
taskset
30.68 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
tee
34.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
test
46.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tic
70.71 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
timedatectl
813 bytes
10/02/2024 07:51:17 PM
rwxr-xr-x
π
timedatectl.real
295.22 KB
03/03/2023 04:27:51 AM
rwxr-xr-x
π
timeout
55.38 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tload
14.44 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
toe
14.34 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
top
106.51 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
touch
86.21 KB
01/18/2018 09:43:49 AM
rwxr-xr-x
π
tput
14.3 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
tr
46.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
truncate
50.8 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tset
18.42 KB
03/06/2024 05:01:28 PM
rwxr-xr-x
π
tsort
34.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tty
26.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
tzselect
14.86 KB
05/08/2024 03:46:48 PM
rwxr-xr-x
π
ubuntu-core-launcher
124.53 KB
06/06/2024 02:32:03 PM
rwxr-xr-x
π
ucf
39.68 KB
03/16/2016 08:58:51 PM
rwxr-xr-x
π
ucfq
18.91 KB
03/16/2016 08:58:51 PM
rwxr-xr-x
π
ucfr
10.47 KB
03/16/2016 08:58:51 PM
rwxr-xr-x
π
unexpand
30.73 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
unicode_stop
530 bytes
09/22/2016 05:33:20 PM
rwxr-xr-x
π
uniq
42.77 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
unlink
26.64 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
unlzma
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
unshare
18.72 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
unsquashfs
92.65 KB
09/15/2021 01:04:44 PM
rwxr-xr-x
π
unxz
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
update-alternatives
46.61 KB
05/27/2022 10:37:03 AM
rwxr-xr-x
π
uptime
10.33 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
users
30.7 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
utmpdump
14.52 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
vcs-run
6.75 KB
09/29/2020 06:17:10 PM
rwxr-xr-x
π
vi
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
view
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
vim.tiny
1.02 MB
09/25/2024 07:47:37 AM
rwxr-xr-x
π
vmstat
30.48 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
w
18.48 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
w.procps
18.48 KB
11/01/2023 07:23:48 AM
rwxr-xr-x
π
wall
26.73 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
watch
23.14 KB
11/01/2023 07:23:47 AM
rwxr-xr-x
π
wc
42.8 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
whereis
23.09 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
which
946 bytes
12/30/2017 06:15:02 PM
rwxr-xr-x
π
who
46.86 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
whoami
26.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
wpa_passphrase
58 KB
08/05/2024 12:27:52 PM
rwxr-xr-x
π
x86_64
14.38 KB
06/14/2022 09:28:54 PM
rwxr-xr-x
π
xargs
66.21 KB
02/07/2016 11:18:24 PM
rwxr-xr-x
π
xdelta3
150.84 KB
02/17/2016 02:02:30 PM
rwxr-xr-x
π
xdg-open
38 bytes
10/02/2024 07:51:41 PM
rwxr-xr-x
π
xdg-settings
886 bytes
10/02/2024 07:51:41 PM
rwxr-xr-x
π
xxd
18.12 KB
09/25/2024 07:53:22 AM
rwxr-xr-x
π
xz
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
xzcat
67.11 KB
04/11/2022 07:08:39 PM
rwxr-xr-x
π
xzcmp
5.39 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzdiff
5.39 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzegrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzfgrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzgrep
5.56 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzless
1.78 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
xzmore
2.12 KB
04/11/2022 07:08:35 PM
rwxr-xr-x
π
yes
30.67 KB
03/02/2017 06:07:22 PM
rwxr-xr-x
π
zdump
14.42 KB
05/08/2024 03:49:57 PM
rwxr-xr-x
Editing: deb-systemd-helper
Close
#!/usr/bin/env perl # vim:ts=4:sw=4:expandtab # Β© 2013-2014 Michael Stapelberg <stapelberg@debian.org> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of Michael Stapelberg nor the # names of contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # . # THIS SOFTWARE IS PROVIDED BY Michael Stapelberg ''AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL Michael Stapelberg BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =head1 NAME deb-systemd-helper - subset of systemctl for machines not running systemd =head1 SYNOPSIS B<deb-systemd-helper> enable | disable | purge | mask | unmask | is-enabled | was-enabled | debian-installed | update-state | reenable S<I<unit file> ...> =head1 DESCRIPTION B<deb-systemd-helper> is a Debian-specific helper script which re-implements the enable, disable, is-enabled and reenable commands from systemctl. The "enable" action will only be performed once (when first installing the package). On the first "enable", an state file is created which will be deleted upon "purge". The "mask" action will keep state on whether the service was enabled/disabled before and will properly return to that state on "unmask". The "was-enabled" action is not present in systemctl, but is required in Debian so that we can figure out whether a service was enabled before we installed an updated service file. See http://bugs.debian.org/717603 for details. The "debian-installed" action is also not present in systemctl. It returns 0 if the state file of at least one of the given units is present. The "update-state" action is also not present in systemctl. It updates B<deb-systemd-helper>'s state file, removing obsolete entries (e.g. service files that are no longer shipped by the package) and adding new entries (e.g. new service files shipped by the package) without enabling them. B<deb-systemd-helper> is intended to be used from maintscripts to enable systemd unit files. It is specifically NOT intended to be used interactively by users. Instead, users should run systemd and use systemctl, or not bother about the systemd enabled state in case they are not running systemd. =head1 ENVIRONMENT =over 4 =item B<_DEB_SYSTEMD_HELPER_DEBUG> If you export _DEB_SYSTEMD_HELPER_DEBUG=1, deb-systemd-helper will print debug messages to stderr (thus visible in dpkg runs). Please include these when filing a bugreport. =back =cut use strict; use warnings; use File::Path qw(make_path); # in core since Perl 5.001 use File::Basename; # in core since Perl 5 use File::Temp qw(tempfile); # in core since Perl 5.6.1 use Text::ParseWords qw(shellwords); # in core since Perl 5 use Getopt::Long; # in core since Perl 5 # Make Data::Dumper::Dumper available if present (not present on systems that # only have perl-base, not perl). eval { require Data::Dumper; } or *Data::Dumper::Dumper = sub { "no Data::Dumper" }; my $quiet = 0; my $enabled_state_dir = '/var/lib/systemd/deb-systemd-helper-enabled'; my $masked_state_dir = '/var/lib/systemd/deb-systemd-helper-masked'; # Globals are bad, but in this specific case, it really makes things much # easier to write and understand. my $changed_sth; sub error { print STDERR "$0: error: @_\n"; exit (1); } sub debug { my ($msg) = @_; return if !defined($ENV{_DEB_SYSTEMD_HELPER_DEBUG}) || $ENV{_DEB_SYSTEMD_HELPER_DEBUG} != 1; print STDERR "(deb-systemd-helper DEBUG) $msg\n"; } sub is_purge { return (defined($ENV{_DEB_SYSTEMD_HELPER_PURGE}) && $ENV{_DEB_SYSTEMD_HELPER_PURGE} == 1) } sub find_unit { my ($scriptname) = @_; my $service_path = $scriptname; if (-f "/etc/systemd/system/$scriptname") { $service_path = "/etc/systemd/system/$scriptname"; } elsif (-f "/lib/systemd/system/$scriptname") { $service_path = "/lib/systemd/system/$scriptname"; } return $service_path; } sub dsh_state_path { my ($scriptname) = @_; return $enabled_state_dir . '/' . basename($scriptname) . '.dsh-also'; } sub state_file_entries { my ($dsh_state) = @_; debug "Reading state file $dsh_state"; my @entries; if (open(my $fh, '<', $dsh_state)) { @entries = map { chomp; $_ } <$fh>; close($fh); } return @entries; } # Writes $service_link into $dsh_state unless itβs already in there. sub record_in_statefile { my ($dsh_state, $service_link) = @_; # Appending a newline makes the following code simpler; we can skip # chomp()ing and appending newlines in every print. $service_link .= "\n"; make_path(dirname($dsh_state)); my $line_exists; my ($outfh, $tmpname) = tempfile('.stateXXXXX', DIR => dirname($dsh_state), SUFFIX => '.tmp', UNLINK => 0); chmod(0644, $tmpname); if (-e $dsh_state) { open(my $infh, '<', $dsh_state) or error("unable to read from $dsh_state"); while (<$infh>) { $line_exists = 1 if $_ eq $service_link; print $outfh $_; } close($infh); } print $outfh $service_link unless $line_exists; close($outfh); debug "Renaming temp file $tmpname to state file $dsh_state"; rename($tmpname, $dsh_state) or error("Unable to move $tmpname to $dsh_state"); } # Gets the transitive closure of links, i.e. all links that need to be created # when enabling this service file. Not straight-forward because service files # can refer to other service files using Also=. sub get_link_closure { my ($scriptname, $service_path) = @_; my @links; my $unit_name = basename($service_path); open my $fh, '<', $service_path or error("unable to read $service_path"); while (my $line = <$fh>) { chomp($line); my $service_link; if ($line =~ /^\s*(WantedBy|RequiredBy)=(.+)$/i) { for my $value (shellwords($2)) { my $wants_dir = "/etc/systemd/system/$value"; $wants_dir .= '.wants' if $1 eq 'WantedBy'; $wants_dir .= '.requires' if $1 eq 'RequiredBy'; push @links, { dest => $service_path, src => "$wants_dir/$scriptname" }; } } if ($line =~ /^\s*Also=(.+)$/i) { for my $value (shellwords($1)) { if ($value ne $unit_name) { push @links, get_link_closure($value, find_unit($value)); } } } if ($line =~ /^\s*Alias=(.+)$/i) { for my $value (shellwords($1)) { if ($value ne $unit_name) { push @links, { dest => $service_path, src => "/etc/systemd/system/$1" }; } } } } close($fh); return @links; } sub make_systemd_links { my ($scriptname, $service_path) = @_; my $dsh_state = dsh_state_path($scriptname); my @links = get_link_closure($scriptname, $service_path); for my $link (@links) { my $service_path = $link->{dest}; my $service_link = $link->{src}; record_in_statefile($dsh_state, $service_link); my $statefile = $service_link; $statefile =~ s,^/etc/systemd/system/,$enabled_state_dir/,; next if -e $statefile; if (! -l $service_link) { make_path(dirname($service_link)); symlink($service_path, $service_link) or error("unable to link $service_link to $service_path: $!"); $changed_sth = 1; } # Store the fact that we ran enable for this service_path, # so that we can skip enable the next time. # This allows us to call deb-systemd-helper unconditionally # and still only enable unit files on the initial installation # of a package. make_path(dirname($statefile)); open(my $fh, '>>', $statefile); close($fh); } } # In contrary to make_systemd_links(), which only modifies the state file in an # append-only fashion, update_state() can also remove entries from the state # file. # # The distinction is important because update_state() should only be called # when the unit file(s) are guaranteed to be on-disk, e.g. on package updates, # but not on package removals. sub update_state { my ($scriptname, $service_path) = @_; my $dsh_state = dsh_state_path($scriptname); my @links = get_link_closure($scriptname, $service_path); debug "Old state file contents: " . Data::Dumper::Dumper([ state_file_entries($dsh_state) ]); make_path(dirname($dsh_state)); my ($outfh, $tmpname) = tempfile('.stateXXXXX', DIR => dirname($dsh_state), SUFFIX => '.tmp', UNLINK => 0); chmod(0644, $tmpname); for my $link (@links) { print $outfh $link->{src} . "\n"; } close($outfh); debug "Renaming temp file $tmpname to state file $dsh_state"; rename($tmpname, $dsh_state) or error("Unable to move $tmpname to $dsh_state"); debug "New state file contents: " . Data::Dumper::Dumper([ state_file_entries($dsh_state) ]); } sub was_enabled { my ($scriptname) = @_; my @entries = state_file_entries(dsh_state_path($scriptname)); debug "Contents: " . Data::Dumper::Dumper(\@entries); for my $link (@entries) { if (! -l $link) { debug "Link $link is missing, considering $scriptname was-disabled."; return 0; } } debug "All links present, considering $scriptname was-enabled."; return 1; } sub debian_installed { my ($scriptname) = @_; return -f dsh_state_path($scriptname); } sub remove_links { my ($service_path) = @_; my $dsh_state = dsh_state_path($service_path); my @entries = state_file_entries($dsh_state); debug "Contents: " . Data::Dumper::Dumper(\@entries); if (is_purge()) { unlink($dsh_state) if -e $dsh_state; } # Also disable all the units which were enabled when this one was enabled. for my $link (@entries) { # Delete the corresponding state file: # β’ Always when purging # β’ If the user did not disable (= link still exists) the service. # If we donβt do this, the link will be deleted a few lines down, # but not re-created when re-installing the package. if (is_purge() || -l $link) { my $link_state = $link; $link_state =~ s,^/etc/systemd/system/,$enabled_state_dir/,; unlink($link_state); } next unless -l $link; unlink($link) or print STDERR "$0: unable to remove '$link': $!\n"; $changed_sth = 1; } # Read $service_path, recurse for all Also= units. # This might not work when $service_path was already deleted, # i.e. after apt-get remove. In this case we just return # silently in order to not confuse the user about whether # disabling actually worked or not β the case is handled by # dh_installsystemd generating an appropriate disable # command by parsing the service file at debhelper-time. open(my $fh, '<', $service_path) or return; while (my $line = <$fh>) { chomp($line); my $service_link; if ($line =~ /^\s*Also=(.+)$/i) { remove_links(find_unit($1)); } } close($fh); } # Recursively deletes a directory structure, if all (!) components are empty, # e.g. to clean up after purging. sub rmdir_if_empty { my ($dir) = @_; debug "rmdir_if_empty $dir"; rmdir_if_empty($_) for (grep { -d } <$dir/*>); if (!rmdir($dir)) { debug "rmdir($dir) failed ($!)"; } } sub mask_service { my ($scriptname, $service_path) = @_; my $mask_link = '/etc/systemd/system/' . basename($service_path); if (-e $mask_link) { # If the link already exists, donβt do anything. return if -l $mask_link && readlink($mask_link) eq '/dev/null'; # If the file already exists, the user most likely copied the .service # file to /etc/ to change it in some way. In this case we donβt need to # mask the .service in the first place, since it will not be removed by # dpkg. debug "$mask_link already exists, not masking."; return; } make_path(dirname($mask_link)); # clean up after possible leftovers from Alias= to self (LP#1439793) unlink($mask_link); symlink('/dev/null', $mask_link) or error("unable to link $mask_link to /dev/null: $!"); $changed_sth = 1; my $statefile = $mask_link; $statefile =~ s,^/etc/systemd/system/,$masked_state_dir/,; # Store the fact that we masked this service, so that we can unmask it on # installation time. We cannot unconditionally unmask because that would # interfere with the userβs decision to mask a service. make_path(dirname($statefile)); open(my $fh, '>>', $statefile); close($fh); } sub unmask_service { my ($scriptname, $service_path) = @_; my $mask_link = '/etc/systemd/system/' . basename($service_path); # Not masked? Nothing to do. return unless -e $mask_link; if (! -l $mask_link || readlink($mask_link) ne '/dev/null') { debug "Not unmasking $mask_link because it is not a link to /dev/null"; return; } my $statefile = $mask_link; $statefile =~ s,^/etc/systemd/system/,$masked_state_dir/,; if (! -e $statefile) { debug "Not unmasking $mask_link because the state file $statefile does not exist"; return; } unlink($mask_link) or error("unable to remove $mask_link: $!"); $changed_sth = 1; unlink($statefile); } my $result = GetOptions( "quiet" => \$quiet, ); my $action = shift; if (!defined($action)) { # Called without arguments. Explain that this script should not be run interactively. print "$0 is a program which should be called by dpkg maintscripts only.\n"; print "Please do not run it interactively, ever. Also see the manpage deb-systemd-helper(1).\n"; exit 0; } if (!$ENV{DPKG_MAINTSCRIPT_PACKAGE}) { print STDERR "$0 was not called from dpkg. Exiting.\n"; exit 1; } if ($action eq 'purge') { $ENV{_DEB_SYSTEMD_HELPER_PURGE} = 1; $action = 'disable'; } debug "is purge = " . (is_purge() ? "yes" : "no"); my $rc = 0; if ($action eq 'is-enabled' || $action eq 'was-enabled' || $action eq 'debian-installed') { $rc = 1; } for my $scriptname (@ARGV) { my $service_path = find_unit($scriptname); debug "action = $action, scriptname = $scriptname, service_path = $service_path"; if ($action eq 'is-enabled') { my @links = get_link_closure($scriptname, $service_path); my @missing_links = grep { ! -l $_->{src} } @links; my $enabled = (@missing_links == 0); print STDERR ($enabled ? "enabled\n" : "disabled\n") unless $quiet; $rc = 0 if $enabled; } # was-enabled is the same as is-enabled, but only considers links recorded # in the state file. This is useful after package upgrades, to determine # whether the unit file was enabled before upgrading, even if the unit file # has changed and is not entirely enabled currently (due to a new Alias= # line for example). # # If all machines were running systemd, this issue would not be present # because is-enabled would query systemd, which would not have picked up # the new unit file yet. if ($action eq 'was-enabled') { my $enabled = was_enabled($scriptname); print STDERR ($enabled ? "enabled\n" : "disabled\n") unless $quiet; $rc = 0 if $enabled; } if ($action eq 'update-state') { update_state($scriptname, $service_path); } if ($action eq 'debian-installed') { $rc = 0 if debian_installed($scriptname); } if ($action eq 'reenable') { remove_links($service_path); make_systemd_links($scriptname, $service_path); } if ($action eq 'disable') { remove_links($service_path); # Clean up the state dir if itβs empty, or at least clean up all empty # subdirectories. Necessary to cleanly pass a piuparts run. rmdir_if_empty('/var/lib/systemd/deb-systemd-helper-enabled'); # Same with directories below /etc/systemd, where we create symlinks. # If systemd is not installed (and no other package shipping service # files), this would make piuparts fail, too. rmdir_if_empty($_) for (grep { -d } </etc/systemd/system/*>); } if ($action eq 'enable') { make_systemd_links($scriptname, $service_path); } if ($action eq 'mask') { mask_service($scriptname, $service_path); } if ($action eq 'unmask') { unmask_service($scriptname, $service_path); # Clean up the state dir if itβs empty, or at least clean up all empty # subdirectories. Necessary to cleanly pass a piuparts run. rmdir_if_empty('/var/lib/systemd/deb-systemd-helper-masked'); } } # If we changed anything and this machine is running systemd, tell # systemd to reload so that it will immediately pick up our # changes. if ($changed_sth && -d "/run/systemd/system") { system("systemctl", "daemon-reload"); } exit $rc; =head1 AUTHOR Michael Stapelberg <stapelberg@debian.org> =cut