mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 13:02:58 +02:00
Compare commits
293 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7d0967f9e | ||
|
|
4382757dff | ||
|
|
d38d3d5d6e | ||
|
|
2ab05a1533 | ||
|
|
ecae6bb08c | ||
|
|
704a226f1f | ||
|
|
916a8aa5ed | ||
|
|
58b4babde2 | ||
|
|
101831d1b7 | ||
|
|
0b4a8acd52 | ||
|
|
04033ad1a5 | ||
|
|
c16b669813 | ||
|
|
587de19dca | ||
|
|
61deed354b | ||
|
|
3055fec1b6 | ||
|
|
fd6cd41a95 | ||
|
|
27092cf180 | ||
|
|
537587ae64 | ||
|
|
e44245f5fb | ||
|
|
3a815d1814 | ||
|
|
13dfd638bf | ||
|
|
575b5b2535 | ||
|
|
a931d86850 | ||
|
|
aba6bc1e84 | ||
|
|
993dbbbd75 | ||
|
|
a8d93e014d | ||
|
|
a8dc9235f1 | ||
|
|
0e302b1efc | ||
|
|
578eb58ea0 | ||
|
|
a81b1f8f2b | ||
|
|
ca64eb8761 | ||
|
|
8d0051d8f6 | ||
|
|
06359e6db4 | ||
|
|
4045f9fbc2 | ||
|
|
1475ef5093 | ||
|
|
351e665042 | ||
|
|
c7e72c51bf | ||
|
|
ec74268fa7 | ||
|
|
f09bba1d6c | ||
|
|
8462438396 | ||
|
|
557fc6ec81 | ||
|
|
4885bc8554 | ||
|
|
a3f7758510 | ||
|
|
67d1b8a4e9 | ||
|
|
d1d79d74e5 | ||
|
|
a989b976cb | ||
|
|
5ea3369a44 | ||
|
|
97e543817a | ||
|
|
7b0cc24bbf | ||
|
|
d270ada82c | ||
|
|
4e61b8bef9 | ||
|
|
03efd275ec | ||
|
|
2580c06cb7 | ||
|
|
aff726b928 | ||
|
|
6ed934dbfc | ||
|
|
638483ff08 | ||
|
|
3710ff2af7 | ||
|
|
3eb0ec8b1b | ||
|
|
2d55d3c672 | ||
|
|
0f4e6612df | ||
|
|
90a4a51a0e | ||
|
|
3745fdcb6a | ||
|
|
e9c5334eeb | ||
|
|
3a8cd99ef1 | ||
|
|
c74e903b32 | ||
|
|
d854559daf | ||
|
|
dd9a60e720 | ||
|
|
d30518a04a | ||
|
|
4e665f6a3c | ||
|
|
279f1e8e86 | ||
|
|
b78ee945cd | ||
|
|
d81f2b838e | ||
|
|
e51ee79752 | ||
|
|
3132f7bc78 | ||
|
|
2e3ea0ae64 | ||
|
|
9d50babeb9 | ||
|
|
bdee533f04 | ||
|
|
465f1e2328 | ||
|
|
3b672339ef | ||
|
|
33f4a2b1b1 | ||
|
|
0879d828a7 | ||
|
|
1726f3bd3b | ||
|
|
18ec4f2b87 | ||
|
|
93a5a7af7b | ||
|
|
25421aed06 | ||
|
|
c25bc27049 | ||
|
|
58e92cbb36 | ||
|
|
8af09f38e0 | ||
|
|
e2856c1c7e | ||
|
|
83cf08dfa0 | ||
|
|
0e2047f080 | ||
|
|
1cbd76f718 | ||
|
|
fe2ad5da66 | ||
|
|
f3881747be | ||
|
|
2daee785d4 | ||
|
|
064136634c | ||
|
|
b040fb1c8a | ||
|
|
4e9bff5b57 | ||
|
|
017a03c86b | ||
|
|
bad31e01b9 | ||
|
|
17d49c9d64 | ||
|
|
0ba17ebe5d | ||
|
|
1bfeb4b322 | ||
|
|
09c182c75a | ||
|
|
db7b863fa4 | ||
|
|
92324f8cbd | ||
|
|
eac34c4210 | ||
|
|
5de3f44cc7 | ||
|
|
20c65fa4ec | ||
|
|
30d6e75af1 | ||
|
|
d94f83d1bf | ||
|
|
0a726a99ac | ||
|
|
a600787c67 | ||
|
|
b935dd5b1d | ||
|
|
25da9eb467 | ||
|
|
eadd074122 | ||
|
|
8b29912521 | ||
|
|
3e17c7b30b | ||
|
|
40c097ff8a | ||
|
|
1eceb143ed | ||
|
|
f689a70b7e | ||
|
|
88e5d0aba7 | ||
|
|
8d6014683f | ||
|
|
9c28bd419d | ||
|
|
1bf1cdc190 | ||
|
|
86a9264a25 | ||
|
|
f204528cf4 | ||
|
|
b21febe3e1 | ||
|
|
a118df6060 | ||
|
|
5db52b1717 | ||
|
|
e6ac495dfb | ||
|
|
34f9da85dd | ||
|
|
d334d39e3f | ||
|
|
07c6172576 | ||
|
|
4d6f8d68a3 | ||
|
|
4c2fd11de2 | ||
|
|
8b3cdb2ebe | ||
|
|
2c233eac63 | ||
|
|
2f4174b560 | ||
|
|
ccf49b1105 | ||
|
|
a165595116 | ||
|
|
cdbaa41364 | ||
|
|
cc8ccb35bf | ||
|
|
92cd7ca970 | ||
|
|
13530fa1ef | ||
|
|
f9c8259050 | ||
|
|
d30a7b2318 | ||
|
|
652ab98e1a | ||
|
|
17d5413bc2 | ||
|
|
c1281a47ea | ||
|
|
32c15c3fe3 | ||
|
|
1b9810cfd9 | ||
|
|
781187a6d3 | ||
|
|
2cf44838bf | ||
|
|
6f60c4696f | ||
|
|
f89feeb197 | ||
|
|
e5ee2e8127 | ||
|
|
89baa34b8d | ||
|
|
ecad4000f2 | ||
|
|
1f42b720d0 | ||
|
|
bb773a05d5 | ||
|
|
7586e5e517 | ||
|
|
e5464739c9 | ||
|
|
0e29b73703 | ||
|
|
6723112498 | ||
|
|
cacf5f209d | ||
|
|
dc97ffb40e | ||
|
|
133baf8fc0 | ||
|
|
7212a66761 | ||
|
|
c690c0c447 | ||
|
|
74cf8a3943 | ||
|
|
49d330f2a8 | ||
|
|
3e3b5c0e89 | ||
|
|
6047d1079b | ||
|
|
c834aa67d4 | ||
|
|
24d3822f82 | ||
|
|
3579fd95a1 | ||
|
|
a6f4f1dc2e | ||
|
|
85540f1359 | ||
|
|
17f5f3d6cf | ||
|
|
be30db19f3 | ||
|
|
5f9125b044 | ||
|
|
84eba5982a | ||
|
|
cc0eebaa2f | ||
|
|
acc96d0726 | ||
|
|
6d3717d9c7 | ||
|
|
56a1588f96 | ||
|
|
aa7d243558 | ||
|
|
dcb6b5e117 | ||
|
|
067bbaf136 | ||
|
|
02724e7427 | ||
|
|
9f7cd8358f | ||
|
|
a06eab4ae1 | ||
|
|
0f54cfef92 | ||
|
|
fa69bf1da3 | ||
|
|
e7e1e67fc7 | ||
|
|
fae6f15fbe | ||
|
|
ebdd4d59b4 | ||
|
|
6f8ab2d9ec | ||
|
|
4363971e05 | ||
|
|
2cddcb14f6 | ||
|
|
ed89f965bf | ||
|
|
07750a74ba | ||
|
|
5955087887 | ||
|
|
61d054216d | ||
|
|
780f556e9c | ||
|
|
3f1e411f95 | ||
|
|
7e5fd9e655 | ||
|
|
8f4062f4da | ||
|
|
2624a47e88 | ||
|
|
56461e0173 | ||
|
|
4bbf33e119 | ||
|
|
e928445c91 | ||
|
|
94f9604493 | ||
|
|
a221be1818 | ||
|
|
b9b523d293 | ||
|
|
0003dd9c8c | ||
|
|
63c3e67c07 | ||
|
|
6df412401c | ||
|
|
284b13c137 | ||
|
|
c946e2d263 | ||
|
|
8608700ba9 | ||
|
|
6994edf40b | ||
|
|
f60a419e84 | ||
|
|
280869f883 | ||
|
|
9c58dcd145 | ||
|
|
a9c944483b | ||
|
|
61caf1c5eb | ||
|
|
0c2b510130 | ||
|
|
01b41130e5 | ||
|
|
fb763397b4 | ||
|
|
a7ed289c04 | ||
|
|
927b3dfe54 | ||
|
|
0000eed295 | ||
|
|
49df562431 | ||
|
|
d544247a53 | ||
|
|
04cb6cc6ff | ||
|
|
4d35e1845b | ||
|
|
c463d1d203 | ||
|
|
1aac7c1a4c | ||
|
|
8031d30ad2 | ||
|
|
ad771dfe3b | ||
|
|
00cd284e54 | ||
|
|
a925c32ecb | ||
|
|
be1fc5ce77 | ||
|
|
6accd9056f | ||
|
|
1cd908092b | ||
|
|
9d9f3b7afb | ||
|
|
8ca6049b32 | ||
|
|
fcdc42ea40 | ||
|
|
56c5212374 | ||
|
|
13bb8928c9 | ||
|
|
0bece3c17a | ||
|
|
9924b85773 | ||
|
|
8b50f8d07c | ||
|
|
9a53289a23 | ||
|
|
6e71870648 | ||
|
|
d7544e6192 | ||
|
|
d9a8ed29e8 | ||
|
|
9f86b661cb | ||
|
|
33cc594e39 | ||
|
|
35f1987b14 | ||
|
|
ff7a427189 | ||
|
|
7b90358c1e | ||
|
|
ef347b3a28 | ||
|
|
0c908cf913 | ||
|
|
1688d250dc | ||
|
|
8f4b665fb3 | ||
|
|
addfe66863 | ||
|
|
9353496864 | ||
|
|
936c1a4fa0 | ||
|
|
8e4e24a9b9 | ||
|
|
31f89d1813 | ||
|
|
dbb9b7014f | ||
|
|
e48a29a3f1 | ||
|
|
1f16691715 | ||
|
|
baf1d4a604 | ||
|
|
968fd0ca40 | ||
|
|
852567122e | ||
|
|
eefbd2ef87 | ||
|
|
11d2901fc7 | ||
|
|
0864b3a5ba | ||
|
|
05ac4be397 | ||
|
|
f8ca312cfa | ||
|
|
292ed31c4d | ||
|
|
5de4e5e9e9 | ||
|
|
fc0c2fe6da | ||
|
|
45f0a5d543 | ||
|
|
e97d70d152 | ||
|
|
d0bd3cc033 | ||
|
|
803c6baaea | ||
|
|
2f621b80d5 | ||
|
|
7773f82726 |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -1,12 +1,11 @@
|
||||
/.DS_Store
|
||||
/.config
|
||||
/build
|
||||
/build_*
|
||||
/cache
|
||||
/ccache
|
||||
/images_*
|
||||
/doc/ChangeLog
|
||||
/doc/packages-list.txt
|
||||
/log
|
||||
/log_*
|
||||
/packages
|
||||
/tmp
|
||||
/*.diff
|
||||
@@ -17,7 +16,3 @@
|
||||
*.tar.bz2
|
||||
/*.md5
|
||||
/*.b2
|
||||
|
||||
# These files have been removed but could still be around in older environments
|
||||
/doc/ChangeLog
|
||||
/doc/packages-list.txt
|
||||
|
||||
123
README.md
123
README.md
@@ -1,48 +1,109 @@
|
||||
# LoongFire - The Open Source Firewall on Loongson CPU (龙芯开源防火墙)
|
||||
# BPFire - eBPF Network Firewall OS (eBPF 网络防火墙)
|
||||
|
||||
# What is LoongFire?
|
||||
# What is BPFire?
|
||||
|
||||
LoongFire is port of BPFire for Loongson CPU which is designed and made in China.
|
||||
BPFire is fork of [IPFire 2.x](https://github.com/ipfire/ipfire-2.x), a hardened, versatile, state-of-the-art Open Source firewall based on Linux. BPFire is to enable revolutionary [eBPF](https://ebpf.io/) technology for non-tech savvy users, make eBPF technology consumable to home users or any size of organizations to secure their network environment. Current supported eBPF network application features:
|
||||
|
||||
LoongFire is a hardened, versatile, state-of-the-art Open Source firewall based on
|
||||
Linux. Its ease of use, high performance in any scenario and extensibility make
|
||||
it usable for everyone. For a full list of features have a look [here](https://www.ipfire.org/about).
|
||||
BPFire 基于IPFire 2.x, 一个基于Linux的安全坚固、多功能、先进的开源防火墙. BPFire 为普罗大众带来革命创新性的eBPF技术,为家庭用户或任何大小组织企业的网络安全保驾护航. 当前支持的eBPF应用包括:
|
||||
|
||||
LoongFire also enable revolutionary kernel eBPF XDP/TC features for dynamic, high
|
||||
speed network processing.
|
||||
1. XDP DDoS protection, See XDP SYNPROXY stops 10G DDoS SYN flood [here](https://www.youtube.com/watch?v=81Hgoy-x1A4)
|
||||
2. XDP UDP DDoS online game protection
|
||||
3. XDP DNS domain blocklist, ratelimit protection
|
||||
4. XDP SSL/TLS server name indicator (SNI) blocklist
|
||||
5. XDP GeoIP/Country blocklist
|
||||
6. XDP multi attachment and capture mode for Intrusion Detection System Suricata in IPS mode
|
||||
7. eBPF based LoxiLB load balancer, Firewall, Proxy, see full features [LoxiLB](https://loxilb-io.github.io/loxilbdocs/#overall-features-of-loxilb)
|
||||
|
||||
LoongFire 是BPFire移植到龙芯的, 一个基于Linux的安全坚固、多功能、先进的开源防火墙. LoongFire 为普罗大众带来革命创新性的eBPF技术,为家庭用户或任何大小组织企业的网络安全保驾护航. 当前支持的eBPF应用包括:
|
||||
# Where can I get support?
|
||||
|
||||
1. XDP DDoS protection [Pkgten DDoS attack](https://youtu.be/QVh7kihvYaM?si=tAdGCiDib4tp2BSj)
|
||||
2. XDP DNS monitor, blocking
|
||||
3. XDP SSL/TLS server name indicator (SNI) monitor, blocking
|
||||
4. Intrusion prevention system (IPS) in XDP mode [suricata XDP](https://youtu.be/zcWsaZbs5aA?si=v_h6iHu3k4WZsBOn)
|
||||
5. DNS Load balancing in eBPF XSK AF_XDP mode [dnsdist AF_XDP](https://youtu.be/O5BK1CGHDkU?si=r5VDnUc7_PU0Xt-R0)
|
||||
6. eBPF based LoxiLB load balancer, Firewall, Proxy, see full features [LoxiLB](https://loxilb-io.github.io/loxilbdocs/#overall-features-of-loxilb)
|
||||
Open github issue or [discord](https://discord.gg/EakRJaU8NG)
|
||||
|
||||
Loongson mini PC Home Internet Firewall Demo [here](https://youtu.be/rVHkBf1HB7Y?si=cxZphLIn4RhRp3-F)
|
||||
# Where can I get BPFire installation ISO or LoongFire flash image?
|
||||
|
||||
This repository contains the source code of LoongFire which is used to build
|
||||
the whole distribution from scratch, since LoongFire is not based on any other
|
||||
distribution.
|
||||
中国大陆用户下载地址:
|
||||
|
||||
# Where can I get LoongFire?
|
||||
[bpfire](https://www.vcn.bc.ca/~vli/bpfire/)
|
||||
|
||||
中国大陆用户下载地址: https://www.vcn.bc.ca/~vli/loongfire/
|
||||
[loongfire](https://www.vcn.bc.ca/~vli/loongfire/)
|
||||
|
||||
https://bpfire.net/download/loongfire
|
||||
Other download site:
|
||||
|
||||
# What computer hardwares LoongFire requires?
|
||||
[bpfire.net](https://bpfire.net/download/)
|
||||
|
||||
LoongFire support Loongson 3A6000 mini PC (NUC), Loongson server should be supported, but not tested due to lack of hardware for testing.
|
||||
# What computer hardwares BPFire support?
|
||||
|
||||
for example [mini PC](https://www.aliexpress.us/item/3256807861547435.html?spm=a2g0o.order_list.order_list_main.5.6c6c1802f4v4tf&gatewayAdapt=glo2usa) I use at home.
|
||||
BPFire support commodity computer hardware, small or large, old or new, cheap or expensive.
|
||||
|
||||
# How to build LoongFire?
|
||||
for example:
|
||||
|
||||
On LoongArch machine (I used Loongson 3A6000 mini PC running Fedora):
|
||||
[X86 mini PC](https://www.aliexpress.com/w/wholesale-home-firewall-router.html?spm=a2g0o.best.search.0)
|
||||
|
||||
1. git clone https://github.com/vincentmli/BPFire.git
|
||||
2. cd BPFire; git checkout loongfire
|
||||
3. wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --cut-dirs=2 -nH --reject "index.html*" --reject "*.gif" https://www.bpfire.net/download/loongfire/cache/
|
||||
4. ./make.sh build
|
||||
[LoongArch mini PC](https://www.aliexpress.us/item/3256807861547435.html?spm=a2g0o.order_list.order_list_main.5.6c6c1802f4v4tf&gatewayAdapt=glo2usa)
|
||||
|
||||
# How do I install BPFire?
|
||||
|
||||
flash the ISO to USB on Linux machine, /dev/sdc is your USB thrumb drive.
|
||||
|
||||
`dd if=bpfire-2.29-core184-x86_64.iso of=/dev/sdc status=progress`
|
||||
|
||||
BPFire installation on mini industrial PC:
|
||||
|
||||
[](https://www.youtube.com/watch?v=p9iHCe0hXPs "BPFire installation on mini industrial PC")
|
||||
|
||||
# BPFire SYNPROXY throughput with and without XDP acceleration under 10Gbit DDoS SYN flood:
|
||||
|
||||
[](https://www.youtube.com/watch?v=81Hgoy-x1A4 "Throughput performance")
|
||||
|
||||
|
||||
# BPFire WebUI screenshot:
|
||||
|
||||
English:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Chinese:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# Does BPFire run in hypervisor virtual environment?
|
||||
|
||||
Yes, We have tested in Linux KVM hypervisor, Proxmox, Microsoft Hyper-v, should support Virtualbox, VMware as well.
|
||||
|
||||
Microsoft Hyper-v screen shot:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# How to build BPFire?
|
||||
|
||||
Build Environment Setup https://www.ipfire.org/docs/devel/ipfire-2-x/build-initial
|
||||
|
||||
(It takes a few hours to build image for first build depending on build machine power)
|
||||
|
||||
for example on Ubuntu 22.04 LTS:
|
||||
|
||||
```
|
||||
apt install git-core g++ manpages-pl patch byacc make autoconf automake libltdl-dev
|
||||
|
||||
git clone https://github.com/vincentmli/bpfire.git
|
||||
|
||||
cd bpfire
|
||||
|
||||
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --cut-dirs=2 -nH --reject "index.html*" --reject "*.gif" https://www.bpfire.net/download/bpfire/cache/
|
||||
|
||||
./make.sh build
|
||||
|
||||
```
|
||||
|
||||
# How do I support BPFire development?
|
||||
|
||||
Join or [Donate to BPFire paypal](https://www.paypal.com/donate/?business=BL97G8687E5B6&no_recurring=0&item_name=Make+revolutionary+eBPF+technology+available+for+non-tech+savvy+users+for+safe+online+surfing¤cy_code=USD)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script if placed in /etc/apcupsd
|
||||
# will be called by /etc/apcupsd/apccontrol when apcupsd
|
||||
# detects that the battery should be replaced.
|
||||
# We send an email message to root to notify him.
|
||||
#
|
||||
|
||||
FROM="enter from email address"
|
||||
TO="enter to email address"
|
||||
|
||||
HOSTNAME=`hostname`
|
||||
MSG="$HOSTNAME Battery needs changing now on UPS $1"
|
||||
#
|
||||
(
|
||||
echo From: $FROM
|
||||
echo To: $TO
|
||||
echo Subject: $MSG
|
||||
echo " "
|
||||
echo "$MSG"
|
||||
echo " "
|
||||
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
|
||||
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
|
||||
exit 0
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script if placed in /etc/apcupsd
|
||||
# will be called by /etc/apcupsd/apccontrol when apcupsd
|
||||
# loses contact with the UPS (i.e. the serial connection is not responding).
|
||||
# We send an email message to root to notify him.
|
||||
#
|
||||
|
||||
FROM="enter from email address"
|
||||
TO="enter to email address"
|
||||
|
||||
HOSTNAME=`hostname`
|
||||
MSG="$HOSTNAME Communications with UPS $1 lost"
|
||||
(
|
||||
echo From: $FROM
|
||||
echo To: $TO
|
||||
echo Subject: $MSG
|
||||
echo " "
|
||||
echo "$MSG"
|
||||
echo " "
|
||||
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
|
||||
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
|
||||
exit 0
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script if placed in /etc/apcupsd
|
||||
# will be called by /etc/apcupsd/apccontrol when apcupsd
|
||||
# restores contact with the UPS (i.e. the serial connection is restored).
|
||||
# We send an email message to root to notify him.
|
||||
#
|
||||
|
||||
FROM="enter from email address"
|
||||
TO="enter to email address"
|
||||
|
||||
HOSTNAME=`hostname`
|
||||
MSG="$HOSTNAME Communications with UPS $1 restored"
|
||||
#
|
||||
(
|
||||
echo From: $FROM
|
||||
echo To: $TO
|
||||
echo Subject: $MSG
|
||||
echo " "
|
||||
echo "$MSG"
|
||||
echo " "
|
||||
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
|
||||
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
|
||||
exit 0
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script if placed in /etc/apcupsd
|
||||
# will be called by /etc/apcupsd/apccontrol when the
|
||||
# UPS goes back on to the mains after a power failure.
|
||||
# We send an email message to root to notify him.
|
||||
#
|
||||
|
||||
FROM="enter from email address"
|
||||
TO="enter to email address"
|
||||
|
||||
HOSTNAME=`hostname`
|
||||
MSG="$HOSTNAME Power has returned on UPS $1"
|
||||
#
|
||||
(
|
||||
echo From: $FROM
|
||||
echo To: $TO
|
||||
echo Subject: $MSG
|
||||
echo " "
|
||||
echo "$MSG"
|
||||
echo " "
|
||||
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
|
||||
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
|
||||
exit 0
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This shell script if placed in /etc/apcupsd
|
||||
# will be called by /etc/apcupsd/apccontrol when the UPS
|
||||
# goes on batteries.
|
||||
# We send an email message to root to notify him.
|
||||
#
|
||||
|
||||
FROM="enter from email address"
|
||||
TO="enter to email address"
|
||||
|
||||
HOSTNAME=`hostname`
|
||||
MSG="$HOSTNAME Power Failure on UPS $1"
|
||||
#
|
||||
(
|
||||
echo From: $FROM
|
||||
echo To: $TO
|
||||
echo Subject: $MSG
|
||||
echo " "
|
||||
echo "$MSG"
|
||||
echo " "
|
||||
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
|
||||
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
|
||||
exit 0
|
||||
@@ -2,7 +2,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
NOW="$(date "+%Y-%m-%d-%H%M")"
|
||||
NOW="$(date "+%Y-%m-%d-%H:%M")"
|
||||
|
||||
list_addons() {
|
||||
local file
|
||||
@@ -75,15 +75,10 @@ make_backup() {
|
||||
restore_backup() {
|
||||
local filename="${1}"
|
||||
|
||||
# remove all openvpn certs to prevent old unusable
|
||||
# certificates being left in directory after a restore
|
||||
rm -f /var/ipfire/ovpn/certs/*
|
||||
|
||||
# Extract backup
|
||||
if ! tar xvzpf "${filename}" -C / \
|
||||
--exclude-from="/var/ipfire/backup/exclude" \
|
||||
--exclude-from="/var/ipfire/backup/exclude.user" \
|
||||
--force-local; then
|
||||
--exclude-from="/var/ipfire/backup/exclude.user"; then
|
||||
echo "Could not extract backup" >&2
|
||||
return 1
|
||||
fi
|
||||
@@ -194,7 +189,7 @@ restore_backup() {
|
||||
|
||||
# Update OpenVPN CRL
|
||||
/etc/fcron.daily/openvpn-crl-updater
|
||||
|
||||
|
||||
# Update OpenVPN N2N Client Configs
|
||||
## Add providers legacy default line to n2n client config files
|
||||
# Check if ovpnconfig exists and is not empty
|
||||
@@ -247,17 +242,6 @@ restore_backup() {
|
||||
-signkey /etc/httpd/server.key \
|
||||
-out /etc/httpd/server.crt &>/dev/null
|
||||
fi
|
||||
|
||||
# Remove any entry for ALIENVAULT or SPAMHAUS_EDROP from the ipblocklist modified file
|
||||
# and the associated ipblocklist files from the /var/lib/ipblocklist directory
|
||||
sed -i '/ALIENVAULT=/d' /var/ipfire/ipblocklist/modified
|
||||
sed -i '/SPAMHAUS_EDROP=/d' /var/ipfire/ipblocklist/modified
|
||||
if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then
|
||||
rm /var/lib/ipblocklist/ALIENVAULT.conf
|
||||
fi
|
||||
if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then
|
||||
rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
etc/conntrackd/conntrackd.conf
|
||||
etc/group
|
||||
etc/hosts*
|
||||
etc/httpd/server.crt
|
||||
etc/httpd/server.csr
|
||||
etc/httpd/server-ecdsa.crt
|
||||
etc/httpd/server-ecdsa.csr
|
||||
etc/httpd/server-ecdsa.key
|
||||
etc/httpd/server.key
|
||||
etc/ipsec.user.*
|
||||
etc/ipsec.user-post.conf
|
||||
etc/logrotate.d
|
||||
etc/passwd
|
||||
etc/shadow
|
||||
etc/ssh/sshd_config
|
||||
etc/ssh/sshd_config.d
|
||||
etc/ssh/ssh_host*
|
||||
etc/squid/squid.conf.local
|
||||
etc/squid/squid.conf.pre.local
|
||||
|
||||
1
config/backup/includes/icinga
Normal file
1
config/backup/includes/icinga
Normal file
@@ -0,0 +1 @@
|
||||
/etc/icinga
|
||||
@@ -1,4 +0,0 @@
|
||||
/etc/asound.state
|
||||
/var/ipfire/mpd/db/
|
||||
/var/ipfire/mpd/mpd.conf
|
||||
/var/ipfire/mpd/mpd_state
|
||||
6
config/backup/includes/mpfire
Normal file
6
config/backup/includes/mpfire
Normal file
@@ -0,0 +1,6 @@
|
||||
/etc/asound.state
|
||||
/var/ipfire/mpfire/db/
|
||||
/var/ipfire/mpfire/mpd.conf
|
||||
/var/ipfire/mpfire/mpd_state
|
||||
/var/ipfire/mpfire/settings
|
||||
/var/ipfire/mpfire/webradio
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,22 +33,6 @@ submenu 'Other Installation Options -->' {
|
||||
}
|
||||
}
|
||||
|
||||
submenu 'Serial Console -->' {
|
||||
menuentry 'Install NAME VERSION ARCH (serial console)' --class ipfire --class gnu-linux --class gnu --class os {
|
||||
linux /boot/isolinux/vmlinuz console=ttyS0,115200n8 novga
|
||||
initrd /boot/isolinux/instroot
|
||||
}
|
||||
|
||||
menuentry 'Unattended installation (serial console)' --class ipfire --class gnu-linux --class gnu --class os {
|
||||
linux /boot/isolinux/vmlinuz installer.unattended console=ttyS0,115200n8 novga
|
||||
initrd /boot/isolinux/instroot
|
||||
}
|
||||
|
||||
menuentry 'memtest86+ (serial console)' {
|
||||
linux /boot/isolinux/memtest console=ttyS0,115200n8
|
||||
}
|
||||
}
|
||||
|
||||
submenu 'Tools -->' {
|
||||
menuentry 'memtest86+' {
|
||||
linux /boot/isolinux/memtest
|
||||
|
||||
@@ -1 +1,9 @@
|
||||
ENABLE_DDOS=on
|
||||
22=off
|
||||
ENABLE_DDOS=off
|
||||
25=off
|
||||
80=off
|
||||
53=off
|
||||
8080=off
|
||||
8090=off
|
||||
443=off
|
||||
5555=off
|
||||
|
||||
1
config/cfgroot/dns-ddos-settings
Normal file
1
config/cfgroot/dns-ddos-settings
Normal file
@@ -0,0 +1 @@
|
||||
ENABLE_DNS_DDOS=off
|
||||
@@ -19,6 +19,7 @@ use Socket;
|
||||
use IO::Socket;
|
||||
use Net::SSLeay;
|
||||
use Net::IPv4Addr qw(:all);
|
||||
$|=1; # line buffering
|
||||
|
||||
$General::version = 'VERSION';
|
||||
$General::swroot = 'CONFIG_ROOT';
|
||||
@@ -98,82 +99,6 @@ sub system($) {
|
||||
return $rc;
|
||||
}
|
||||
|
||||
sub read_pids($) {
|
||||
my $pidfile = shift;
|
||||
|
||||
# Open the PID file
|
||||
open(PIDFILE, "<${pidfile}");
|
||||
|
||||
# Store all PIDs here
|
||||
my @pids = ();
|
||||
|
||||
# Read all PIDs
|
||||
while (<PIDFILE>) {
|
||||
chomp $_;
|
||||
|
||||
if (-d "/proc/$_") {
|
||||
push(@pids, $_);
|
||||
}
|
||||
}
|
||||
|
||||
# Close the PID file
|
||||
close(PIDFILE);
|
||||
|
||||
return @pids;
|
||||
}
|
||||
|
||||
sub find_pids($) {
|
||||
my $process = shift;
|
||||
|
||||
# Store all PIDs here
|
||||
my @pids = ();
|
||||
|
||||
foreach my $status (</proc/*/status>) {
|
||||
# Open the status file
|
||||
open(STATUS, "<${status}");
|
||||
|
||||
# Read the status file
|
||||
while (<STATUS>) {
|
||||
# If the name does not match, we break the loop immediately
|
||||
if ($_ =~ m/^Name:\s+(.*)$/) {
|
||||
last if ($process ne $1);
|
||||
|
||||
# Push the PID onto the list
|
||||
} elsif ($_ =~ m/^Pid:\s+(\d+)$/) {
|
||||
push(@pids, $1);
|
||||
|
||||
# Once we got here, we are done
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Close the status file
|
||||
close(STATUS);
|
||||
}
|
||||
|
||||
return @pids;
|
||||
}
|
||||
|
||||
sub get_memory_consumption() {
|
||||
my $memory = 0;
|
||||
|
||||
foreach my $pid (@_) {
|
||||
# Open the status file or skip on error
|
||||
open(STATUS, "/proc/${pid}/status") or next;
|
||||
|
||||
while (<STATUS>) {
|
||||
if ($_ =~ m/^VmRSS:\s+(\d+) kB/) {
|
||||
$memory += $1 * 1024;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
close(STATUS);
|
||||
}
|
||||
|
||||
return $memory;
|
||||
}
|
||||
|
||||
# Function to remove duplicates from an array
|
||||
sub uniq { my %seen; grep !$seen{$_}++, @_ }
|
||||
|
||||
@@ -192,13 +117,15 @@ sub log
|
||||
}
|
||||
sub setup_default_networks
|
||||
{
|
||||
my %netsettings = %Network::ethernet;
|
||||
my %netsettings=();
|
||||
my $defaultNetworks = shift;
|
||||
|
||||
|
||||
&readhash("/var/ipfire/ethernet/settings", \%netsettings);
|
||||
|
||||
# Get current defined networks (Red, Green, Blue, Orange)
|
||||
$defaultNetworks->{$Lang::tr{'fwhost any'}}{'IPT'} = "0.0.0.0/0.0.0.0";
|
||||
$defaultNetworks->{$Lang::tr{'fwhost any'}}{'NAME'} = "ALL";
|
||||
|
||||
|
||||
$defaultNetworks->{$Lang::tr{'green'}}{'IPT'} = "$netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}";
|
||||
$defaultNetworks->{$Lang::tr{'green'}}{'NET'} = "$netsettings{'GREEN_ADDRESS'}";
|
||||
$defaultNetworks->{$Lang::tr{'green'}}{'NAME'} = "GREEN";
|
||||
@@ -219,7 +146,7 @@ sub setup_default_networks
|
||||
$defaultNetworks->{$Lang::tr{'blue'}}{'NET'} = "$netsettings{'BLUE_ADDRESS'}";
|
||||
$defaultNetworks->{$Lang::tr{'blue'}}{'NAME'} = "BLUE";
|
||||
}
|
||||
|
||||
|
||||
#IPFire himself
|
||||
$defaultNetworks->{'IPFire'}{'NAME'} = "IPFire";
|
||||
|
||||
@@ -246,12 +173,12 @@ sub setup_default_networks
|
||||
&readhash("${General::swroot}/vpn/settings", \%ipsecsettings);
|
||||
if($ipsecsettings{'RW_NET'} ne '')
|
||||
{
|
||||
my $netaddress = &Network::get_netaddress($ipsecsettings{'RW_NET'});
|
||||
my $prefix = &Network::get_prefix($ipsecsettings{'RW_NET'});
|
||||
|
||||
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'ADR'} = $netaddress;
|
||||
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'NAME'} = "IPsec RW";
|
||||
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'NET'} = $netaddress;
|
||||
my ($ip,$sub) = split(/\//,$ipsecsettings{'RW_NET'});
|
||||
$sub=&General::iporsubtocidr($sub);
|
||||
my @tempipsecsubnet = split("\/", $ipsecsettings{'RW_NET'});
|
||||
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'ADR'} = $tempipsecsubnet[0];
|
||||
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'NAME'} = "IPsec RW";
|
||||
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'NET'} = &getnextip($ip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,9 +189,21 @@ sub setup_default_networks
|
||||
$defaultNetworks->{$name}{'NAME'} = "WGRW";
|
||||
}
|
||||
}
|
||||
|
||||
sub set_defaults($$) {
|
||||
my $hash = shift;
|
||||
my $defaults = shift;
|
||||
|
||||
foreach my $key (keys %$defaults) {
|
||||
unless (defined($hash->{$key})) {
|
||||
$hash->{$key} = $defaults->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub get_aliases
|
||||
{
|
||||
|
||||
|
||||
my $defaultNetworks = shift;
|
||||
open(FILE, "${General::swroot}/ethernet/aliases") or die 'Unable to open aliases file.';
|
||||
my @current = <FILE>;
|
||||
@@ -280,36 +219,25 @@ sub get_aliases
|
||||
}
|
||||
$defaultNetworks->{$temp[2]}{'IPT'} = "$temp[0]";
|
||||
$defaultNetworks->{$temp[2]}{'NET'} = "$temp[0]";
|
||||
|
||||
|
||||
$ctr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub set_defaults($$) {
|
||||
my $hash = shift;
|
||||
my $defaults = shift;
|
||||
|
||||
foreach my $key (keys %$defaults) {
|
||||
unless (defined($hash->{$key})) {
|
||||
$hash->{$key} = $defaults->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub readhash
|
||||
{
|
||||
my $filename = $_[0];
|
||||
my $hash = $_[1];
|
||||
my ($var, $val);
|
||||
|
||||
|
||||
|
||||
|
||||
# Some ipcop code expects that readhash 'complete' the hash if new entries
|
||||
# are presents. Not clear it !!!
|
||||
#%$hash = ();
|
||||
|
||||
open(FILE, $filename) or die "Unable to read file $filename";
|
||||
|
||||
|
||||
while (<FILE>)
|
||||
{
|
||||
chop;
|
||||
@@ -343,14 +271,50 @@ sub writehash
|
||||
my $filename = $_[0];
|
||||
my $hash = $_[1];
|
||||
my ($var, $val);
|
||||
|
||||
# write cgi vars to the file.
|
||||
open(FILE, ">${filename}") or die "Unable to write file $filename";
|
||||
flock FILE, 2;
|
||||
foreach $var (keys %$hash)
|
||||
{
|
||||
if ( $var eq "__CGI__"){next;}
|
||||
$val = $hash->{$var};
|
||||
# Darren Critchley Jan 17, 2003 added the following because when submitting with a graphic, the x and y
|
||||
# location of the mouse are submitted as well, this was being written to the settings file causing
|
||||
# some serious grief! This skips the variable.x and variable.y
|
||||
if (!($var =~ /(.x|.y)$/)) {
|
||||
if ($val =~ / /) {
|
||||
$val = "\'$val\'"; }
|
||||
if (!($var =~ /^ACTION/)) {
|
||||
print FILE "${var}=${val}\n"; }
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
||||
sub writehashpart
|
||||
{
|
||||
# This function replaces the given hash in the original hash by keeping the old
|
||||
# content and just replacing the new content
|
||||
|
||||
my $filename = $_[0];
|
||||
my $newhash = $_[1];
|
||||
my %oldhash;
|
||||
my ($var, $val);
|
||||
|
||||
readhash("${filename}", \%oldhash);
|
||||
|
||||
foreach $var (keys %$newhash){
|
||||
$oldhash{$var}=$newhash->{$var};
|
||||
}
|
||||
|
||||
# write cgi vars to the file.
|
||||
open(FILE, ">${filename}") or die "Unable to write file $filename";
|
||||
flock FILE, 2;
|
||||
foreach $var (keys %$hash)
|
||||
foreach $var (keys %oldhash)
|
||||
{
|
||||
if ( $var eq "__CGI__"){next;}
|
||||
$val = $hash->{$var};
|
||||
$val = $oldhash{$var};
|
||||
# Darren Critchley Jan 17, 2003 added the following because when submitting with a graphic, the x and y
|
||||
# location of the mouse are submitted as well, this was being written to the settings file causing
|
||||
# some serious grief! This skips the variable.x and variable.y
|
||||
@@ -408,7 +372,7 @@ sub validip
|
||||
|
||||
if (!($ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/)) {
|
||||
return 0; }
|
||||
else
|
||||
else
|
||||
{
|
||||
my @octets = ($1, $2, $3, $4);
|
||||
foreach $_ (@octets)
|
||||
@@ -422,6 +386,14 @@ sub validip
|
||||
}
|
||||
}
|
||||
|
||||
sub validnum {
|
||||
my $num = shift;
|
||||
if ($num =~ /^\d+$/) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub validmask {
|
||||
my $mask = shift;
|
||||
|
||||
@@ -453,7 +425,7 @@ sub subtocidr {
|
||||
sub cidrtosub {
|
||||
return &Network::convert_prefix2netmask(shift);
|
||||
}
|
||||
|
||||
|
||||
sub iporsubtodec
|
||||
{
|
||||
#Gets: Ip address or subnetmask in decimal oder CIDR
|
||||
@@ -477,7 +449,7 @@ sub iporsubtodec
|
||||
return $net."/".$mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#Subnet in binary format?
|
||||
if ($mask=~/^(\d{1,2})$/ && (($1<=32 && $1>=0))){
|
||||
@@ -489,8 +461,8 @@ sub iporsubtodec
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
sub iporsubtocidr
|
||||
{
|
||||
#gets: Ip Address or subnetmask in decimal oder CIDR
|
||||
@@ -513,7 +485,7 @@ sub iporsubtocidr
|
||||
return $net."/".&General::subtocidr($mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#Subnet already in binary format?
|
||||
if ($mask=~/^(\d{1,2})$/ && (($1<=32 && $1>=0))){
|
||||
@@ -532,6 +504,18 @@ sub getnetworkip {
|
||||
return &Network::get_netaddress($arg);
|
||||
}
|
||||
|
||||
sub getccdbc
|
||||
{
|
||||
#Gets: IP in Form ("192.168.0.0/24")
|
||||
#Gives: Broadcastaddress of network
|
||||
my $ccdnet=$_;
|
||||
my ($ccdip,$ccdsubnet) = split "/",$ccdnet;
|
||||
my $ip_address_binary = inet_aton( $ccdip );
|
||||
my $netmask_binary = ~pack("N", (2**(32-$ccdsubnet))-1);
|
||||
my $broadcast_address = inet_ntoa( $ip_address_binary | ~$netmask_binary );
|
||||
return $broadcast_address;
|
||||
}
|
||||
|
||||
sub ip2dec {
|
||||
return &Network::ip2bin(shift);
|
||||
}
|
||||
@@ -540,13 +524,21 @@ sub dec2ip {
|
||||
return &Network::bin2ip(shift);
|
||||
}
|
||||
|
||||
sub getnextip {
|
||||
return &Network::find_next_ip_address(shift, 4);
|
||||
}
|
||||
|
||||
sub getlastip {
|
||||
return &Network::find_next_ip_address(shift, -1);
|
||||
}
|
||||
|
||||
sub validipandmask
|
||||
{
|
||||
#Gets: Ip address in 192.168.0.0/24 or 192.168.0.0/255.255.255.0 and checks if subnet valid
|
||||
#Gives: True bzw 0 if success or false
|
||||
#Gives: True bzw 0 if success or false
|
||||
my $ccdnet=$_[0];
|
||||
my $subcidr;
|
||||
|
||||
|
||||
if (!($ccdnet =~ /^(.*?)\/(.*?)$/)) {
|
||||
return 0;
|
||||
}
|
||||
@@ -566,7 +558,7 @@ sub validipandmask
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -617,13 +609,13 @@ sub checksubnets
|
||||
&readhasharray("${General::swroot}/ovpn/ccd.conf", \%ccdconfhash);
|
||||
foreach my $key (keys %ccdconfhash) {
|
||||
@ccdconf=split(/\//,$ccdconfhash{$key}[1]);
|
||||
if ($ccdname eq $ccdconfhash{$key}[0])
|
||||
if ($ccdname eq $ccdconfhash{$key}[0])
|
||||
{
|
||||
$errormessage=$errormessage.$Lang::tr{'ccd err nameexist'}."<br>";
|
||||
return $errormessage;
|
||||
}
|
||||
my ($newip,$newsub) = split(/\//,$ccdnet);
|
||||
if (&IpInSubnet($newip,$ccdconf[0],&iporsubtodec($ccdconf[1])))
|
||||
if (&IpInSubnet($newip,$ccdconf[0],&iporsubtodec($ccdconf[1])))
|
||||
{
|
||||
$errormessage=$errormessage.$Lang::tr{'ccd err issubnet'}." $ccdconfhash{$key}[0]<br>";
|
||||
return $errormessage;
|
||||
@@ -659,7 +651,7 @@ sub checksubnets
|
||||
return $errormessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#call check_net_internal
|
||||
if ($checktype eq "exact")
|
||||
{
|
||||
@@ -672,10 +664,11 @@ sub checksubnets
|
||||
sub check_net_internal_range{
|
||||
my $network=shift;
|
||||
my ($ip,$cidr)=split(/\//,$network);
|
||||
my %ownnet = %Network::ethernet;
|
||||
my %ownnet=();
|
||||
my $errormessage;
|
||||
$cidr=&iporsubtocidr($cidr);
|
||||
#check if we use one of ipfire's networks (green,orange,blue)
|
||||
&readhash("${General::swroot}/ethernet/settings", \%ownnet);
|
||||
if (($ownnet{'GREEN_NETADDRESS'} ne '' && $ownnet{'GREEN_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'GREEN_NETADDRESS'},&iporsubtodec($ownnet{'GREEN_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;}
|
||||
if (($ownnet{'ORANGE_NETADDRESS'} ne '' && $ownnet{'ORANGE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'ORANGE_NETADDRESS'},&iporsubtodec($ownnet{'ORANGE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
|
||||
if (($ownnet{'BLUE_NETADDRESS'} ne '' && $ownnet{'BLUE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'BLUE_NETADDRESS'},&iporsubtodec($ownnet{'BLUE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
|
||||
@@ -685,10 +678,11 @@ sub check_net_internal_range{
|
||||
sub check_net_internal_exact{
|
||||
my $network=shift;
|
||||
my ($ip,$cidr)=split(/\//,$network);
|
||||
my %ownnet = %Network::ethernet;
|
||||
my %ownnet=();
|
||||
my $errormessage;
|
||||
$cidr=&iporsubtocidr($cidr);
|
||||
#check if we use one of ipfire's networks (green,orange,blue)
|
||||
&readhash("${General::swroot}/ethernet/settings", \%ownnet);
|
||||
if (($ownnet{'GREEN_NETADDRESS'} ne '' && $ownnet{'GREEN_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'GREEN_NETADDRESS'}/$ownnet{'GREEN_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;}
|
||||
if (($ownnet{'ORANGE_NETADDRESS'} ne '' && $ownnet{'ORANGE_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'ORANGE_NETADDRESS'}/$ownnet{'ORANGE_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
|
||||
if (($ownnet{'BLUE_NETADDRESS'} ne '' && $ownnet{'BLUE_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'BLUE_NETADDRESS'}/$ownnet{'BLUE_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
|
||||
@@ -815,7 +809,7 @@ sub validfqdn
|
||||
# but no more than 63 characters
|
||||
if (length ($parts[$index]) < 1 || length ($parts[$index]) > 63) {
|
||||
return 0;}
|
||||
if ($index eq 0) {
|
||||
if ($index eq 0) {
|
||||
# This is the hostname part
|
||||
# Only valid characters are a-z, A-Z, 0-9 and -
|
||||
if ($parts[$index] !~ /^[a-zA-Z0-9-]*$/) {
|
||||
@@ -826,7 +820,7 @@ sub validfqdn
|
||||
# Last character can only be a letter or a digit
|
||||
if (substr ($parts[$index], -1, 1) !~ /^[a-zA-Z0-9]*$/) {
|
||||
return 0;}
|
||||
} else{
|
||||
} else{
|
||||
# This is the domain part
|
||||
# Only valid characters are a-z, A-Z, 0-9, _ and -
|
||||
if ($parts[$index] !~ /^[a-zA-Z0-9_-]*$/) {
|
||||
@@ -836,23 +830,23 @@ sub validfqdn
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub validportrange # used to check a port range
|
||||
sub validportrange # used to check a port range
|
||||
{
|
||||
my $port = $_[0]; # port values
|
||||
$port =~ tr/-/:/; # replace all - with colons just in case someone used -
|
||||
my $srcdst = $_[1]; # is it a source or destination port
|
||||
|
||||
if (!($port =~ /^(\d+)\:(\d+)$/)) {
|
||||
|
||||
if (!(&validport($port))) {
|
||||
|
||||
if (!(&validport($port))) {
|
||||
if ($srcdst eq 'src'){
|
||||
return $Lang::tr{'source port numbers'};
|
||||
} else {
|
||||
return $Lang::tr{'destination port numbers'};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
my @ports = ($1, $2);
|
||||
if ($1 >= $2){
|
||||
@@ -860,22 +854,30 @@ sub validportrange # used to check a port range
|
||||
return $Lang::tr{'bad source range'};
|
||||
} else {
|
||||
return $Lang::tr{'bad destination range'};
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach $_ (@ports)
|
||||
{
|
||||
if (!(&validport($_))) {
|
||||
if ($srcdst eq 'src'){
|
||||
return $Lang::tr{'source port numbers'};
|
||||
return $Lang::tr{'source port numbers'};
|
||||
} else {
|
||||
return $Lang::tr{'destination port numbers'};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# Checks for a valid country code
|
||||
sub validcc($) {
|
||||
my $cc = shift;
|
||||
|
||||
# Must contain of exactly two uppercase characters, or must be A1, A2, or A3
|
||||
return ($cc =~ m/^([A-Z]{2}|A[123])$/);
|
||||
}
|
||||
|
||||
sub IpInSubnet {
|
||||
my $addr = shift;
|
||||
my $network = shift;
|
||||
@@ -884,6 +886,19 @@ sub IpInSubnet {
|
||||
return &Network::ip_address_in_network($addr, "$network/$netmask");
|
||||
}
|
||||
|
||||
#
|
||||
# Return the following IP (IP+1) in dotted notation.
|
||||
# Call: NextIP ('1.1.1.1');
|
||||
# Return: '1.1.1.2'
|
||||
#
|
||||
sub NextIP {
|
||||
return &Network::find_next_ip_address(shift, 1);
|
||||
}
|
||||
|
||||
sub NextIP2 {
|
||||
return &Network::find_next_ip_address(shift, 4);
|
||||
}
|
||||
|
||||
sub ipcidr {
|
||||
my ($ip,$cidr) = &Net::IPv4Addr::ipv4_parse(shift);
|
||||
return "$ip\/$cidr";
|
||||
@@ -969,6 +984,87 @@ sub findhasharraykey {
|
||||
}
|
||||
}
|
||||
|
||||
sub srtarray
|
||||
# Darren Critchley - darrenc@telus.net - (c) 2003
|
||||
# &srtarray(SortOrder, AlphaNumeric, SortDirection, ArrayToBeSorted)
|
||||
# This subroutine will take the following parameters:
|
||||
# ColumnNumber = the column which you want to sort on, starts at 1
|
||||
# AlphaNumberic = a or n (lowercase) defines whether the sort should be alpha or numberic
|
||||
# SortDirection = asc or dsc (lowercase) Ascending or Descending sort
|
||||
# ArrayToBeSorted = the array that wants sorting
|
||||
#
|
||||
# Returns an array that is sorted to your specs
|
||||
#
|
||||
# If SortOrder is greater than the elements in array, then it defaults to the first element
|
||||
#
|
||||
{
|
||||
my ($colno, $alpnum, $srtdir, @tobesorted) = @_;
|
||||
my @tmparray;
|
||||
my @srtedarray;
|
||||
my $line;
|
||||
my $newline;
|
||||
my $ctr;
|
||||
my $ttlitems = scalar @tobesorted; # want to know the number of rows in the passed array
|
||||
if ($ttlitems < 1){ # if no items, don't waste our time lets leave
|
||||
return (@tobesorted);
|
||||
}
|
||||
my @tmp = split(/\,/,$tobesorted[0]);
|
||||
$ttlitems = scalar @tmp; # this should be the number of elements in each row of the passed in array
|
||||
|
||||
# Darren Critchley - validate parameters
|
||||
if ($colno > $ttlitems){$colno = '1';}
|
||||
$colno--; # remove one from colno to deal with arrays starting at 0
|
||||
if($colno < 0){$colno = '0';}
|
||||
if ($alpnum ne '') { $alpnum = lc($alpnum); } else { $alpnum = 'a'; }
|
||||
if ($srtdir ne '') { $srtdir = lc($srtdir); } else { $srtdir = 'src'; }
|
||||
|
||||
foreach $line (@tobesorted)
|
||||
{
|
||||
chomp($line);
|
||||
if ($line ne '') {
|
||||
my @temp = split(/\,/,$line);
|
||||
# Darren Critchley - juggle the fields so that the one we want to sort on is first
|
||||
my $tmpholder = $temp[0];
|
||||
$temp[0] = $temp[$colno];
|
||||
$temp[$colno] = $tmpholder;
|
||||
$newline = "";
|
||||
for ($ctr=0; $ctr < $ttlitems ; $ctr++) {
|
||||
$newline=$newline . $temp[$ctr] . ",";
|
||||
}
|
||||
chop($newline);
|
||||
push(@tmparray,$newline);
|
||||
}
|
||||
}
|
||||
if ($alpnum eq 'n') {
|
||||
@tmparray = sort {$a <=> $b} @tmparray;
|
||||
} else {
|
||||
@tmparray = (sort @tmparray);
|
||||
}
|
||||
foreach $line (@tmparray)
|
||||
{
|
||||
chomp($line);
|
||||
if ($line ne '') {
|
||||
my @temp = split(/\,/,$line);
|
||||
my $tmpholder = $temp[0];
|
||||
$temp[0] = $temp[$colno];
|
||||
$temp[$colno] = $tmpholder;
|
||||
$newline = "";
|
||||
for ($ctr=0; $ctr < $ttlitems ; $ctr++){
|
||||
$newline=$newline . $temp[$ctr] . ",";
|
||||
}
|
||||
chop($newline);
|
||||
push(@srtedarray,$newline);
|
||||
}
|
||||
}
|
||||
|
||||
if ($srtdir eq 'dsc') {
|
||||
@tmparray = reverse(@srtedarray);
|
||||
return (@tmparray);
|
||||
} else {
|
||||
return (@srtedarray);
|
||||
}
|
||||
}
|
||||
|
||||
sub FetchPublicIp {
|
||||
my %proxysettings;
|
||||
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
||||
@@ -996,12 +1092,12 @@ sub FetchPublicIp {
|
||||
# IP
|
||||
# hostname
|
||||
# domain
|
||||
# Output
|
||||
# Output
|
||||
# 1 IP matches host.domain
|
||||
# 0 not in sync
|
||||
#
|
||||
sub DyndnsServiceSync ($;$;$) {
|
||||
|
||||
|
||||
my ($ip,$hostName,$domain) = @_;
|
||||
my @addresses;
|
||||
|
||||
@@ -1018,7 +1114,7 @@ sub DyndnsServiceSync ($;$;$) {
|
||||
}
|
||||
|
||||
if ($addresses[0] ne '') { # got something ?
|
||||
#&General::log("name:$addresses[0], alias:$addresses[1]");
|
||||
#&General::log("name:$addresses[0], alias:$addresses[1]");
|
||||
# Build clear text list of IP
|
||||
@addresses = map ( &Socket::inet_ntoa($_), @addresses[4..$#addresses]);
|
||||
if (grep (/$ip/, @addresses)) {
|
||||
@@ -1130,8 +1226,11 @@ sub MakeUserAgent() {
|
||||
sub RedIsWireless() {
|
||||
# This function checks if a network device is a wireless device.
|
||||
|
||||
my %settings = ();
|
||||
&readhash("${General::swroot}/ethernet/settings", \%settings);
|
||||
|
||||
# Find the name of the network device.
|
||||
my $device = $Network::ethernet{'RED_DEV'};
|
||||
my $device = $settings{'RED_DEV'};
|
||||
|
||||
# Exit, if no device is configured.
|
||||
return 0 if ($device eq "");
|
||||
@@ -1162,11 +1261,11 @@ sub read_file_utf8 ($) {
|
||||
sub write_file_utf8 ($) {
|
||||
my ($file, $content) = @_;
|
||||
|
||||
open my $out, '>:encoding(UTF-8)', $file or die "Could not open '$file' for writing $!";;
|
||||
open my $out, '>:encoding(UTF-8)', $file or die "Could not open '$file' for writing $!";;
|
||||
print $out $content;
|
||||
close $out;
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
my $FIREWALL_RELOAD_INDICATOR = "${General::swroot}/firewall/reread";
|
||||
@@ -1243,6 +1342,22 @@ sub grab_address_from_file($) {
|
||||
return;
|
||||
}
|
||||
|
||||
sub get_ipaddresses_from_interface($) {
|
||||
my ($interface) = @_;
|
||||
my @ip_addresses;
|
||||
|
||||
my $output = `ip addr show $interface 2>/dev/null`;
|
||||
|
||||
# Check if the command was successful
|
||||
if ($? == 0) {
|
||||
# Extract IP addresses using regex
|
||||
while ($output =~ /inet (\d+\.\d+\.\d+\.\d+)/g) {
|
||||
push @ip_addresses, $1;
|
||||
}
|
||||
}
|
||||
return @ip_addresses;
|
||||
}
|
||||
|
||||
# Function to get all configured and enabled nameservers.
|
||||
sub get_nameservers () {
|
||||
my %settings;
|
||||
@@ -1294,7 +1409,7 @@ sub get_nameservers () {
|
||||
}
|
||||
|
||||
# Function to format a string containing the amount of bytes to
|
||||
# something human-readable.
|
||||
# something human-readable.
|
||||
sub formatBytes {
|
||||
# Private array which contains the units.
|
||||
my @units = qw(B KB MB GB TB PB);
|
||||
|
||||
@@ -31,10 +31,10 @@ require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
# Approximate size of the final graph image including canvas and labeling (in pixels, mainly used for placeholders)
|
||||
our %image_size = ('width' => 900, 'height' => 400);
|
||||
our %image_size = ('width' => 900, 'height' => 300);
|
||||
|
||||
# Size of the actual data area within the image, without labeling (in pixels)
|
||||
our %canvas_size = ('width' => 800, 'height' => 290);
|
||||
our %canvas_size = ('width' => 800, 'height' => 190);
|
||||
|
||||
# List of all available time ranges
|
||||
our @time_ranges = ("hour", "day", "week", "month", "year");
|
||||
@@ -111,28 +111,21 @@ sub makegraphbox {
|
||||
$default_range = "day" unless ($default_range ~~ @time_ranges);
|
||||
|
||||
print <<END;
|
||||
<div class="graph" id="rrdimg-$name" data-origin="$origin" data-graph="$name" data-default-range="$default_range">
|
||||
<img src="/cgi-bin/getrrdimage.cgi?origin=${origin}&graph=${name}&range=${default_range}" alt="$Lang::tr{'graph'} ($name)">
|
||||
|
||||
<ul>
|
||||
<div class="rrdimage" id="rrdimg-$name" data-origin="$origin" data-graph="$name" data-default-range="$default_range">
|
||||
<ul>
|
||||
END
|
||||
|
||||
# Print range select buttons
|
||||
foreach my $range (@time_ranges) {
|
||||
my $selected = ($range eq $default_range) ? "class=\"selected\"" : "";
|
||||
|
||||
print <<END;
|
||||
<li>
|
||||
<button data-range="$range" onclick="rrdimage_selectRange(this)" $selected>
|
||||
$Lang::tr{$range}
|
||||
</button>
|
||||
</li>
|
||||
<li><button data-range="$range" onclick="rrdimage_selectRange(this)">$Lang::tr{$range}</button></li>
|
||||
END
|
||||
}
|
||||
|
||||
print <<END;
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
<img src="/cgi-bin/getrrdimage.cgi?origin=${origin}&graph=${name}&range=${default_range}" alt="$Lang::tr{'graph'} ($name)">
|
||||
</div>
|
||||
END
|
||||
}
|
||||
|
||||
@@ -150,6 +143,7 @@ sub updatecpugraph {
|
||||
"-l 0",
|
||||
"-u 100",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'cpu usage per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'percentage'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -276,6 +270,7 @@ sub updateloadgraph {
|
||||
"-1".$period,
|
||||
"-l 0",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'uptime load average'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'processes'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -308,6 +303,7 @@ sub updatememorygraph {
|
||||
"-l 0",
|
||||
"-u 100",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'memory usage per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'percentage'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -363,6 +359,7 @@ sub updateswapgraph {
|
||||
"-l 0",
|
||||
"-u 100",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'swap usage per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'percentage'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -399,6 +396,99 @@ sub updateswapgraph {
|
||||
return "Error in RRD::graph for memory: ".$ERROR."\n" if $ERROR;
|
||||
}
|
||||
|
||||
# Generate the Process Cpu Graph for the current period of time for values given by collecd
|
||||
|
||||
sub updateprocessescpugraph {
|
||||
my @processesgraph = getprocesses();
|
||||
my $period = $_[0];
|
||||
my $count="0";
|
||||
|
||||
my @command = (
|
||||
@GRAPH_ARGS,
|
||||
"-",
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-l 0",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'processes'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
"--color=BACK".$color{"color21"}
|
||||
);
|
||||
|
||||
foreach(@processesgraph){
|
||||
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
|
||||
push(@command,"DEF:".$name[1]."user=".$_."ps_cputime.rrd:user:AVERAGE");
|
||||
push(@command,"DEF:".$name[1]."system=".$_."ps_cputime.rrd:syst:AVERAGE");
|
||||
push(@command,"CDEF:".$name[1]."=".$name[1]."user,".$name[1]."system,+");
|
||||
}
|
||||
|
||||
push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
|
||||
|
||||
my $colorIndex = 0;
|
||||
foreach(@processesgraph){
|
||||
my $colorIndex = 10 + $count % 15;
|
||||
my $color="$color{\"color$colorIndex\"}";
|
||||
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
|
||||
if ($count eq "0"){
|
||||
push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
|
||||
}else{
|
||||
push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
|
||||
RRDs::graph (@command);
|
||||
$ERROR = RRDs::error;
|
||||
return "Error in RRD::graph for processes: ".$ERROR."\n" if $ERROR;
|
||||
}
|
||||
|
||||
# Generate the Process Memory Graph for the current period of time for values given by collecd
|
||||
|
||||
sub updateprocessesmemorygraph {
|
||||
my @processesgraph = getprocesses();
|
||||
my $period = $_[0];
|
||||
my $count="0";
|
||||
|
||||
my @command = (
|
||||
@GRAPH_ARGS,
|
||||
"-",
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-l 0",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'processes'}." ".$Lang::tr{'memory'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
"--color=BACK".$color{"color21"}
|
||||
);
|
||||
|
||||
foreach(@processesgraph){
|
||||
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
|
||||
push(@command,"DEF:".$name[1]."=".$_."ps_rss.rrd:value:AVERAGE");
|
||||
}
|
||||
|
||||
push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
|
||||
|
||||
my $colorIndex = 0;
|
||||
foreach(@processesgraph){
|
||||
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
|
||||
my $colorIndex = 10 + $count % 15;
|
||||
my $color="$color{\"color$colorIndex\"}";
|
||||
if ($count eq "0"){
|
||||
push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
|
||||
}else{
|
||||
push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
|
||||
RRDs::graph (@command);
|
||||
$ERROR = RRDs::error;
|
||||
return "Error in RRD::graph for processesmemory: ".$ERROR."\n" if $ERROR;
|
||||
}
|
||||
|
||||
# Generate the Disk Graph for the current period of time for values given by collecd
|
||||
|
||||
sub updatediskgraph {
|
||||
@@ -410,6 +500,7 @@ sub updatediskgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$disk." ".$Lang::tr{'disk access'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -453,6 +544,7 @@ sub updateifgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -489,6 +581,7 @@ sub updatevpngraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -525,6 +618,7 @@ sub updatevpnn2ngraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -589,6 +683,7 @@ sub updatefwhitsgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'firewall hits per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -667,6 +762,7 @@ sub updatefwhitsgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'firewall hits per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -753,6 +849,7 @@ sub updatepinggraph {
|
||||
"-1".$period,
|
||||
"-l 0",
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'linkq'}." ".$host." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ms",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -790,6 +887,7 @@ sub updatewirelessgraph {
|
||||
"-",
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-t Wireless ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v dBm",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -827,6 +925,7 @@ sub updatehddgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$disk." ".$Lang::tr{'harddisk temperature'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v Celsius",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -860,6 +959,7 @@ sub updatehwtempgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'mbmon temp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v Celsius",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -907,6 +1007,7 @@ sub updatehwfangraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'mbmon fan'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
"--color=BACK".$color{"color21"},
|
||||
@@ -953,6 +1054,7 @@ sub updatehwvoltgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'mbmon volt'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
"--color=BACK".$color{"color21"},
|
||||
@@ -1019,6 +1121,7 @@ sub updateqosgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'Utilization on'}." (".$qossettings{'DEV'}.") ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v ".$Lang::tr{'bytes per second'},
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -1080,6 +1183,7 @@ sub updatecpufreqgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'cpu frequency per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v MHz",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -1119,6 +1223,7 @@ sub updatethermaltempgraph {
|
||||
"--start",
|
||||
"-1".$period,
|
||||
"-r",
|
||||
"-t ".$Lang::tr{'acpitemp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
|
||||
"-v Celsius",
|
||||
"--color=SHADEA".$color{"color19"},
|
||||
"--color=SHADEB".$color{"color19"},
|
||||
@@ -1172,6 +1277,7 @@ sub updateconntrackgraph {
|
||||
"-1" . $period,
|
||||
"-r",
|
||||
"--lower-limit","0",
|
||||
"-t $Lang::tr{'connection tracking'}",
|
||||
"-v $Lang::tr{'open connections'}",
|
||||
"DEF:conntrack=$mainsettings{'RRDLOG'}/collectd/localhost/conntrack/conntrack.rrd:entropy:AVERAGE",
|
||||
"LINE3:conntrack#ff0000:" . sprintf("%-15s", $Lang::tr{'open connections'}),
|
||||
@@ -1189,90 +1295,3 @@ sub updateconntrackgraph {
|
||||
|
||||
return "Error in RRD::Graph for conntrack: " . $ERROR . "\n" if $ERROR;
|
||||
}
|
||||
|
||||
sub updateipsthroughputgraph {
|
||||
my $period = $_[0];
|
||||
|
||||
my @command = (
|
||||
@GRAPH_ARGS,
|
||||
"-",
|
||||
"--start",
|
||||
"-1" . $period,
|
||||
"-r",
|
||||
"--lower-limit","0",
|
||||
"-v $Lang::tr{'bytes per second'}",
|
||||
"--color=BACK" . $color{"color21"},
|
||||
|
||||
# Read bypassed packets
|
||||
"DEF:bypassed_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-BYPASSED.rrd:value:AVERAGE",
|
||||
#"DEF:bypassed_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-BYPASSED.rrd:value:AVERAGE",
|
||||
|
||||
"VDEF:bypassed_bytes_avg=bypassed_bytes,AVERAGE",
|
||||
"VDEF:bypassed_bytes_min=bypassed_bytes,MINIMUM",
|
||||
"VDEF:bypassed_bytes_max=bypassed_bytes,MAXIMUM",
|
||||
|
||||
# Read scanned packets
|
||||
"DEF:scanned_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-SCANNED.rrd:value:AVERAGE",
|
||||
#"DEF:scanned_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-SCANNED.rrd:value:AVERAGE",
|
||||
|
||||
"VDEF:scanned_bytes_avg=scanned_bytes,AVERAGE",
|
||||
"VDEF:scanned_bytes_min=scanned_bytes,MINIMUM",
|
||||
"VDEF:scanned_bytes_max=scanned_bytes,MAXIMUM",
|
||||
|
||||
# Read whitelisted packets
|
||||
"DEF:whitelisted_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-WHITELISTED.rrd:value:AVERAGE",
|
||||
#"DEF:whitelisted_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-WHITELISTED.rrd:value:AVERAGE",
|
||||
|
||||
"VDEF:whitelisted_bytes_avg=whitelisted_bytes,AVERAGE",
|
||||
"VDEF:whitelisted_bytes_min=whitelisted_bytes,MINIMUM",
|
||||
"VDEF:whitelisted_bytes_max=whitelisted_bytes,MAXIMUM",
|
||||
|
||||
# Total
|
||||
"CDEF:total_bytes=bypassed_bytes,scanned_bytes,ADDNAN,whitelisted_bytes,ADDNAN",
|
||||
#"CDEF:total_packets=bypassed_packets,scanned_packets,ADDNAN,whitelisted_packets,ADDNAN",
|
||||
|
||||
"VDEF:total_bytes_avg=total_bytes,AVERAGE",
|
||||
"VDEF:total_bytes_min=total_bytes,MINIMUM",
|
||||
"VDEF:total_bytes_max=total_bytes,MAXIMUM",
|
||||
|
||||
# Add some space below the graph
|
||||
"COMMENT: \\n",
|
||||
|
||||
# Headline
|
||||
"COMMENT:" . sprintf("%32s", ""),
|
||||
"COMMENT:" . sprintf("%16s", $Lang::tr{'average'}),
|
||||
"COMMENT:" . sprintf("%16s", $Lang::tr{'minimum'}),
|
||||
"COMMENT:" . sprintf("%16s", $Lang::tr{'maximum'}) . "\\j",
|
||||
|
||||
# Whitelisted Packets
|
||||
"AREA:whitelisted_bytes$color{'color12'}A0:" . sprintf("%-30s", $Lang::tr{'whitelisted'}),
|
||||
"GPRINT:whitelisted_bytes_avg:%9.2lf %sbps",
|
||||
"GPRINT:whitelisted_bytes_min:%9.2lf %sbps",
|
||||
"GPRINT:whitelisted_bytes_max:%9.2lf %sbps\\j",
|
||||
|
||||
# Bypassed Packets
|
||||
"STACK:bypassed_bytes$color{'color11'}A0:" . sprintf("%-30s", $Lang::tr{'bypassed'}),
|
||||
"GPRINT:bypassed_bytes_avg:%9.2lf %sbps",
|
||||
"GPRINT:bypassed_bytes_min:%9.2lf %sbps",
|
||||
"GPRINT:bypassed_bytes_max:%9.2lf %sbps\\j",
|
||||
|
||||
# Scanned Packets
|
||||
"STACK:scanned_bytes$color{'color13'}A0:" . sprintf("%-30s", $Lang::tr{'scanned'}),
|
||||
"GPRINT:scanned_bytes_avg:%9.2lf %sbps",
|
||||
"GPRINT:scanned_bytes_min:%9.2lf %sbps",
|
||||
"GPRINT:scanned_bytes_max:%9.2lf %sbps\\j",
|
||||
|
||||
"COMMENT: \\n",
|
||||
|
||||
# Total Packets
|
||||
"COMMENT:" . sprintf("%-32s", $Lang::tr{'total'}),
|
||||
"GPRINT:total_bytes_avg:%9.2lf %sbps",
|
||||
"GPRINT:total_bytes_min:%9.2lf %sbps",
|
||||
"GPRINT:total_bytes_max:%9.2lf %sbps\\j",
|
||||
);
|
||||
|
||||
RRDs::graph(@command);
|
||||
$ERROR = RRDs::error;
|
||||
|
||||
return "Error in RRD::Graph for suricata: " . $ERROR . "\n" if $ERROR;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,7 @@ use File::Basename;
|
||||
use HTML::Entities();
|
||||
use Socket;
|
||||
use Time::Local;
|
||||
use Encode;
|
||||
|
||||
require "${General::swroot}/graphs.pl";
|
||||
use Unicode::Normalize;
|
||||
|
||||
our %color = ();
|
||||
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||
@@ -38,9 +36,9 @@ $Header::colouryellow = '#FFFF00';
|
||||
$Header::colourgreen = '#339933';
|
||||
$Header::colourblue = '#333399';
|
||||
$Header::colourovpn = '#339999';
|
||||
$Header::colourwg = '#ff007f';
|
||||
$Header::colourfw = '#000000';
|
||||
$Header::colourvpn = '#990099';
|
||||
$Header::colourwg = '#ff007f';
|
||||
$Header::colourerr = '#FF0000';
|
||||
$Header::viewsize = 150;
|
||||
$Header::errormessage = '';
|
||||
@@ -57,10 +55,10 @@ $Header::extraHead = <<END
|
||||
}
|
||||
.orange {
|
||||
background-color: orange;
|
||||
}
|
||||
}
|
||||
.red {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
.table1colour {
|
||||
background-color: $Header::table1colour;
|
||||
}
|
||||
@@ -92,6 +90,8 @@ END
|
||||
my %menuhash = ();
|
||||
my $menu = \%menuhash;
|
||||
%settings = ();
|
||||
%ethsettings = ();
|
||||
%pppsettings = ();
|
||||
my @URI = split('\?', $ENV{'REQUEST_URI'});
|
||||
|
||||
### Make sure this is an SSL request
|
||||
@@ -103,311 +103,51 @@ if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
|
||||
|
||||
### Initialize environment
|
||||
&General::readhash("${swroot}/main/settings", \%settings);
|
||||
&General::readhash("${swroot}/ethernet/settings", \%ethsettings);
|
||||
&General::readhash("${swroot}/ppp/settings", \%pppsettings);
|
||||
$hostname = $settings{'HOSTNAME'};
|
||||
$hostnameintitle = 0;
|
||||
|
||||
### Initialize language
|
||||
require "${swroot}/lang.pl";
|
||||
$language = &Lang::FindWebLanguage($settings{"LANGUAGE"});
|
||||
|
||||
### Read English Files
|
||||
if ( -d "/var/ipfire/langs/en/" ) {
|
||||
opendir(DIR, "/var/ipfire/langs/en/");
|
||||
@names = readdir(DIR) or die "Cannot Read Directory: $!\n";
|
||||
foreach $name(@names) {
|
||||
next if ($name eq ".");
|
||||
next if ($name eq "..");
|
||||
next if (!($name =~ /\.pl$/));
|
||||
require "${swroot}/langs/en/${name}";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
### Enable Language Files
|
||||
if ( -d "/var/ipfire/langs/${language}/" ) {
|
||||
opendir(DIR, "/var/ipfire/langs/${language}/");
|
||||
@names = readdir(DIR) or die "Cannot Read Directory: $!\n";
|
||||
foreach $name(@names) {
|
||||
next if ($name eq ".");
|
||||
next if ($name eq "..");
|
||||
next if (!($name =~ /\.pl$/));
|
||||
require "${swroot}/langs/${language}/${name}";
|
||||
};
|
||||
};
|
||||
|
||||
### Initialize user manual
|
||||
my %manualpages = ();
|
||||
&_read_manualpage_hash("${General::swroot}/main/manualpages");
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print menu html elements for submenu entries
|
||||
# @param submenu entries
|
||||
sub showsubmenu() {
|
||||
my $submenus = shift;
|
||||
|
||||
print "<ul>";
|
||||
foreach my $item (sort keys %$submenus) {
|
||||
$link = getlink($submenus->{$item});
|
||||
next if (!is_menu_visible($link) or $link eq '');
|
||||
|
||||
my $subsubmenus = $submenus->{$item}->{'subMenu'};
|
||||
|
||||
if ($subsubmenus) {
|
||||
print '<li class="has-sub ">';
|
||||
} else {
|
||||
print '<li>';
|
||||
}
|
||||
print '<a href="'.$link.'">'.$submenus->{$item}->{'caption'}.'</a>';
|
||||
|
||||
&showsubmenu($subsubmenus) if ($subsubmenus);
|
||||
print '</li>';
|
||||
}
|
||||
print "</ul>"
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print menu html elements
|
||||
sub showmenu() {
|
||||
print '<div id="cssmenu" class="bigbox fixed">';
|
||||
|
||||
if ($settings{'SPEED'} ne 'off') {
|
||||
print <<EOF;
|
||||
<div id='traffic'>
|
||||
<strong>$Lang::tr{'traffic stat title'}:</strong>
|
||||
$Lang::tr{'traffic stat in'} <span id='rx_kbs'>--.-- bit/s</span>
|
||||
$Lang::tr{'traffic stat out'} <span id='tx_kbs'>--.-- bit/s</span>
|
||||
</div>
|
||||
EOF
|
||||
}
|
||||
|
||||
print "<ul>";
|
||||
foreach my $k1 ( sort keys %$menu ) {
|
||||
$link = getlink($menu->{$k1});
|
||||
next if (!is_menu_visible($link) or $link eq '');
|
||||
print '<li class="has-sub "><a href="#"><span>'.$menu->{$k1}->{'caption'}.'</span></a>';
|
||||
my $submenus = $menu->{$k1}->{'subMenu'};
|
||||
&showsubmenu($submenus) if ($submenus);
|
||||
print "</li>";
|
||||
}
|
||||
|
||||
print "</ul></div>";
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print page opening html layout
|
||||
# @param page title
|
||||
# @param boh
|
||||
# @param extra html code for html head section
|
||||
# @param suppress menu option, can be numeric 1 or nothing.
|
||||
# menu will be suppressed if param is 1
|
||||
sub openpage {
|
||||
my $title = shift;
|
||||
my $boh = shift;
|
||||
my $extrahead = shift;
|
||||
my $suppressMenu = shift // 0;
|
||||
|
||||
my $headline = "IPFire";
|
||||
if (($settings{'WINDOWWITHHOSTNAME'} eq 'on') || ($settings{'WINDOWWITHHOSTNAME'} eq '')) {
|
||||
$headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
|
||||
}
|
||||
|
||||
print <<END;
|
||||
<!DOCTYPE html>
|
||||
<html lang="$Lang::language">
|
||||
<head>
|
||||
<title>$headline - $title</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<script type="text/javascript" src="/include/jquery.js"></script>
|
||||
<script src="/include/rrdimage.js?v=20240926"></script>
|
||||
|
||||
$extrahead
|
||||
<script type="text/javascript">
|
||||
function swapVisibility(id) {
|
||||
\$('#' + id).toggle();
|
||||
}
|
||||
</script>
|
||||
END
|
||||
|
||||
|
||||
print "<link href=\"/themes/ipfire/include/css/style.css?v=20240806\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
||||
|
||||
|
||||
if ($settings{'SPEED'} ne 'off') {
|
||||
print <<END
|
||||
<script type="text/javascript" src="/themes/ipfire/include/js/refreshInetInfo.js"></script>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
print <<END
|
||||
</head>
|
||||
<body>
|
||||
<div id="header" class="fixed">
|
||||
<div id="logo">
|
||||
<h1>
|
||||
<a href="https://www.ipfire.org">
|
||||
IPFire_
|
||||
</a>
|
||||
END
|
||||
;
|
||||
if ($settings{'WINDOWWITHHOSTNAME'} ne 'off') {
|
||||
print "‐ $settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
|
||||
}
|
||||
|
||||
print <<END
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
END
|
||||
;
|
||||
|
||||
unless($suppressMenu) {
|
||||
&genmenu();
|
||||
&showmenu();
|
||||
}
|
||||
|
||||
print <<END
|
||||
<div class="bigbox fixed">
|
||||
<div id="main_inner" class="fixed">
|
||||
<div id="main_header">
|
||||
<h1>$title</h1>
|
||||
END
|
||||
;
|
||||
|
||||
# Print user manual link
|
||||
my $manual_url = &get_manualpage_url();
|
||||
if($manual_url) {
|
||||
print <<END
|
||||
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
print <<END
|
||||
</div>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print page closing html layout
|
||||
|
||||
sub closepage () {
|
||||
open(FILE, "</etc/system-release");
|
||||
my $system_release = <FILE>;
|
||||
$system_release =~ s/core/$Lang::tr{'core update'} /;
|
||||
close(FILE);
|
||||
|
||||
print <<END;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer" class='bigbox fixed'>
|
||||
<span class="pull-right">
|
||||
<a href="https://www.ipfire.org/" target="_blank"><strong>IPFire.org</strong></a> •
|
||||
<a href="https://www.ipfire.org/donate" target="_blank">$Lang::tr{'support donation'}</a>
|
||||
</span>
|
||||
|
||||
<strong>$system_release</strong>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
;
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print big box opening html layout
|
||||
sub openbigbox {
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print big box closing html layout
|
||||
sub closebigbox {
|
||||
}
|
||||
|
||||
# Sections
|
||||
|
||||
sub opensection($) {
|
||||
my $title = shift;
|
||||
|
||||
# Open the section
|
||||
print "<section class=\"section\">";
|
||||
|
||||
# Show the title if set
|
||||
if ($title) {
|
||||
print " <h2 class=\"title\">${title}</h2>\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub closesection() {
|
||||
print "</section>";
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print box opening html layout
|
||||
# @param page width
|
||||
# @param page align
|
||||
# @param page caption
|
||||
sub openbox {
|
||||
# The width parameter is ignored and should always be '100%'
|
||||
my $width = shift;
|
||||
my $align = shift;
|
||||
|
||||
my $title = shift;
|
||||
|
||||
my @classes = ("section", "is-box", @_);
|
||||
|
||||
print "<section class=\"@classes\">\n";
|
||||
|
||||
# Show the title
|
||||
if ($title) {
|
||||
print " <h2 class=\"title\">${title}</h2>\n";
|
||||
}
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# print box closing html layout
|
||||
sub closebox {
|
||||
print "</section>";
|
||||
}
|
||||
|
||||
sub errorbox($) {
|
||||
my @errors = grep { $_ ne "" } @_;
|
||||
|
||||
# Do nothing if there are no errors
|
||||
return unless (@errors);
|
||||
|
||||
# Open a new box
|
||||
&openbox('100%', 'left', $Lang::tr{'oops something went wrong'}, "is-error");
|
||||
|
||||
# Print all error messages
|
||||
print "<ul>\n";
|
||||
foreach my $error (@errors) {
|
||||
print "<li>$error</li>\n";
|
||||
}
|
||||
print "</ul>\n";
|
||||
|
||||
# Close the box again
|
||||
&closebox();
|
||||
}
|
||||
|
||||
sub warningbox($) {
|
||||
my @warnings = grep { $_ ne "" } @_;
|
||||
|
||||
# Do nothing if there are no errors
|
||||
return unless (@warnings);
|
||||
|
||||
# Open a new box
|
||||
&openbox('100%', 'left', $Lang::tr{'warning'}, "is-warning");
|
||||
|
||||
# Print all warning messages
|
||||
print "<ul>\n";
|
||||
foreach my $warning (@warnings) {
|
||||
print "<li>$warning</li>\n";
|
||||
}
|
||||
print "</ul>\n";
|
||||
|
||||
# Close the box again
|
||||
&closebox();
|
||||
}
|
||||
|
||||
sub graph($) {
|
||||
my $title = shift;
|
||||
|
||||
# Open a new section with a title
|
||||
&opensection($title);
|
||||
|
||||
&Graphs::makegraphbox(@_);
|
||||
|
||||
# Close the section
|
||||
&closesection();
|
||||
}
|
||||
### Load selected language and theme functions
|
||||
require "${swroot}/langs/en.pl";
|
||||
require "${swroot}/langs/${language}.pl";
|
||||
eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`;
|
||||
|
||||
sub green_used() {
|
||||
if ($Network::ethernet{'GREEN_DEV'} && $Network::ethernet{'GREEN_DEV'} ne "") {
|
||||
if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -415,14 +155,21 @@ sub green_used() {
|
||||
}
|
||||
|
||||
sub orange_used () {
|
||||
if ($Network::ethernet{'CONFIG_TYPE'} =~ /^[24]$/) {
|
||||
if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub blue_used () {
|
||||
if ($Network::ethernet{'CONFIG_TYPE'} =~ /^[34]$/) {
|
||||
if ($ethsettings{'CONFIG_TYPE'} =~ /^[34]$/) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub is_modem {
|
||||
if ($ethsettings{'CONFIG_TYPE'} =~ /^[0]$/) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -452,13 +199,15 @@ sub genmenu {
|
||||
my %sublogshash = ();
|
||||
my $sublogs = \%sublogshash;
|
||||
|
||||
if ( -e "/var/ipfire/main/gpl_accepted") {
|
||||
|
||||
eval `/bin/cat /var/ipfire/menu.d/*.menu`;
|
||||
eval `/bin/cat /var/ipfire/menu.d/*.main`;
|
||||
|
||||
if (! blue_used()) {
|
||||
$menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0;
|
||||
}
|
||||
if ( $Network::ethernet{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $Network::ethernet{'RED_TYPE'} eq 'STATIC' ) {
|
||||
if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
|
||||
$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
|
||||
}
|
||||
|
||||
@@ -466,7 +215,7 @@ sub genmenu {
|
||||
$menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1;
|
||||
}
|
||||
|
||||
if ( $Network::ethernet{'RED_TYPE'} eq "PPPOE" && $Network::ppp{'MONPORT'} ne "" ) {
|
||||
if ( $ethsettings{'RED_TYPE'} eq "PPPOE" && $pppsettings{'MONPORT'} ne "" ) {
|
||||
$menu->{'02.status'}{'subMenu'}->{'74.modem-status'}{'enabled'} = 1;
|
||||
}
|
||||
|
||||
@@ -482,26 +231,13 @@ sub genmenu {
|
||||
$menu->{'03.network'}{'subMenu'}->{'80.macadressmenu'}{'enabled'} = 0;
|
||||
$menu->{'03.network'}{'subMenu'}->{'90.wakeonlan'}{'enabled'} = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub showhttpheaders($) {
|
||||
my $overwrites = shift;
|
||||
|
||||
my %headers = (
|
||||
"Content-Type" => "text/html; charset=UTF-8",
|
||||
"Cache-Control" => "private",
|
||||
|
||||
# Overwrite anything passed
|
||||
%$overwrites,
|
||||
);
|
||||
|
||||
# Print all headers
|
||||
foreach my $header (keys %headers) {
|
||||
print "$header: $headers{$header}\n";
|
||||
}
|
||||
|
||||
# End headers
|
||||
print "\n";
|
||||
sub showhttpheaders
|
||||
{
|
||||
print "Cache-control: private\n";
|
||||
print "Content-type: text/html; charset=UTF-8\n\n";
|
||||
}
|
||||
|
||||
sub is_menu_visible($) {
|
||||
@@ -628,25 +364,38 @@ sub escape($) {
|
||||
return HTML::Entities::encode_entities($s);
|
||||
}
|
||||
|
||||
sub normalize($) {
|
||||
my $s = shift;
|
||||
|
||||
# Remove any special characters
|
||||
$s = &Unicode::Normalize::NFKD($s);
|
||||
|
||||
# Remove any whitespace and replace with dash
|
||||
$s =~ s/\s+/\-/g;
|
||||
|
||||
return $s;
|
||||
}
|
||||
|
||||
sub cleanhtml {
|
||||
my $outstring =$_[0];
|
||||
$outstring =~ tr/,/ / if not defined $_[1] or $_[1] ne 'y';
|
||||
# decode the UTF-8 text so that characters with diacritical marks such as
|
||||
# umlauts are treated correctly by the escape command
|
||||
$outstring = &Encode::decode("UTF-8",$outstring);
|
||||
escape($outstring);
|
||||
# encode the text back to UTF-8 after running the escape command
|
||||
$outstring = &Encode::encode("UTF-8",$outstring);
|
||||
return $outstring;
|
||||
|
||||
return escape($outstring);
|
||||
}
|
||||
|
||||
sub connectionstatus
|
||||
{
|
||||
my %pppsettings = ();
|
||||
my %netsettings = ();
|
||||
my $iface='';
|
||||
|
||||
$pppsettings{'PROFILENAME'} = 'None';
|
||||
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||
|
||||
my $profileused='';
|
||||
unless ($Network::ethernet{'RED_TYPE'} =~ /^(DHCP|STATIC)$/) {
|
||||
$profileused="- $Network::ppp{'PROFILENAME'}";
|
||||
unless ( $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) {
|
||||
$profileused="- $pppsettings{'PROFILENAME'}";
|
||||
}
|
||||
|
||||
my ($timestr, $connstate);
|
||||
@@ -657,13 +406,15 @@ sub connectionstatus
|
||||
$timestr = &General::age("${General::swroot}/red/active");
|
||||
$connstate = "<span>$Lang::tr{'connected'} - (<span>$timestr</span>) $profileused</span>";
|
||||
} else {
|
||||
if (open(KEEPCONNECTED, "</var/ipfire/red/keepconnected") == false) {
|
||||
if ((open(KEEPCONNECTED, "</var/ipfire/red/keepconnected") == false) && ($pppsettings{'RECONNECTION'} eq "persistent")) {
|
||||
$connstate = "<span>$Lang::tr{'connection closed'} $profileused</span>";
|
||||
} elsif (($pppsettings{'RECONNECTION'} eq "dialondemand") && ( -e "${General::swroot}/red/dial-on-demand")) {
|
||||
$connstate = "<span>$Lang::tr{'dod waiting'} $profileused</span>";
|
||||
} else {
|
||||
$connstate = "<span>$Lang::tr{'connecting'} $profileused</span>" if (system("ps -ef | grep -q '[p]ppd'"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $connstate;
|
||||
}
|
||||
|
||||
@@ -717,16 +468,12 @@ END
|
||||
$hostname = "";
|
||||
}
|
||||
|
||||
if ($line =~ /^\s*ends \d (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+)/) {
|
||||
if ($line =~ /^\s*ends/) {
|
||||
$line =~ /(\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+)/;
|
||||
$endtime = timegm($6, $5, $4, $3, $2 - 1, $1 - 1900);
|
||||
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $dst) = localtime($endtime);
|
||||
$endtime_print = sprintf ("%02d/%02d/%d %02d:%02d:%02d",$mday,$mon+1,$year+1900,$hour,$min,$sec);
|
||||
$expired = $endtime < time();
|
||||
|
||||
} elsif ($line =~ /^\s*ends never/) {
|
||||
$endtime = 0;
|
||||
$endtime_print = $Lang::tr{'never'};
|
||||
$expired = 0;
|
||||
}
|
||||
|
||||
if ($line =~ /^\s*hardware ethernet/) {
|
||||
@@ -757,7 +504,7 @@ END
|
||||
if($hostname_print eq "") { #print blank space if no hostname is found
|
||||
$hostname_print = " ";
|
||||
}
|
||||
|
||||
|
||||
# separate active and expired leases with a horizontal line
|
||||
if(($entries{$key}->{expired}) && ($divider_printed == 0)) {
|
||||
$divider_printed = 1;
|
||||
@@ -768,14 +515,14 @@ END
|
||||
}
|
||||
$id++;
|
||||
}
|
||||
|
||||
|
||||
print "<form method='post' action='/cgi-bin/dhcp.cgi'><tr>\n";
|
||||
if ($id % 2) {
|
||||
$col="bgcolor='$table1colour'";
|
||||
} else {
|
||||
$col="bgcolor='$table2colour'";
|
||||
}
|
||||
|
||||
|
||||
if($entries{$key}->{expired}) {
|
||||
print <<END
|
||||
<td align='center' $col><input type='hidden' name='FIX_ADDR' value='$entries{$key}->{IPADDR}' /><strike><i>$entries{$key}->{IPADDR}</i></strike></td>
|
||||
@@ -856,13 +603,13 @@ sub colorize {
|
||||
return "<font color='".${Header::colourovpn}."'>".$string."</font>";
|
||||
} elsif ( $string =~ "lo" or $string =~ "127.0.0.0" ){
|
||||
return "<font color='".${Header::colourfw}."'>".$string."</font>";
|
||||
} elsif ( $string =~ $Network::ethernet{'GREEN_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'GREEN_NETADDRESS'},$Network::ethernet{'GREEN_NETMASK'}) ){
|
||||
} elsif ( $string =~ $ethsettings{'GREEN_DEV'} or &General::IpInSubnet($string2,$ethsettings{'GREEN_NETADDRESS'},$ethsettings{'GREEN_NETMASK'}) ){
|
||||
return "<font color='".${Header::colourgreen}."'>".$string."</font>";
|
||||
} elsif ( $string =~ "ppp0" or $string =~ $Network::ethernet{'RED_DEV'} or $string =~ "0.0.0.0" or $string =~ $Network::ethernet{'RED_ADDRESS'} ){
|
||||
} elsif ( $string =~ "ppp0" or $string =~ $ethsettings{'RED_DEV'} or $string =~ "0.0.0.0" or $string =~ $ethsettings{'RED_ADDRESS'} ){
|
||||
return "<font color='".${Header::colourred}."'>".$string."</font>";
|
||||
} elsif ( $Network::ethernet{'CONFIG_TYPE'}>1 and ( $string =~ $Network::ethernet{'BLUE_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'BLUE_NETADDRESS'},$Network::ethernet{'BLUE_NETMASK'}) )){
|
||||
} elsif ( $ethsettings{'CONFIG_TYPE'}>1 and ( $string =~ $ethsettings{'BLUE_DEV'} or &General::IpInSubnet($string2,$ethsettings{'BLUE_NETADDRESS'},$ethsettings{'BLUE_NETMASK'}) )){
|
||||
return "<font color='".${Header::colourblue}."'>".$string."</font>";
|
||||
} elsif ( $Network::ethernet{'CONFIG_TYPE'}>2 and ( $string =~ $Network::ethernet{'ORANGE_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'ORANGE_NETADDRESS'},$Network::ethernet{'ORANGE_NETMASK'}) )){
|
||||
} elsif ( $ethsettings{'CONFIG_TYPE'}>2 and ( $string =~ $ethsettings{'ORANGE_DEV'} or &General::IpInSubnet($string2,$ethsettings{'ORANGE_NETADDRESS'},$ethsettings{'ORANGE_NETMASK'}) )){
|
||||
return "<font color='".${Header::colourorange}."'>".$string."</font>";
|
||||
} else {
|
||||
return $string;
|
||||
@@ -908,92 +655,4 @@ sub _read_manualpage_hash() {
|
||||
close($file);
|
||||
}
|
||||
|
||||
sub ServiceStatus() {
|
||||
my $services = shift;
|
||||
my %services = %{ $services };
|
||||
|
||||
# Write the table header
|
||||
print <<EOF;
|
||||
<table class="tbl">
|
||||
<!-- <thead>
|
||||
<tr>
|
||||
<th>
|
||||
$Lang::tr{'service'}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
$Lang::tr{'status'}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
$Lang::tr{'memory'}
|
||||
</th>
|
||||
</tr>
|
||||
</thead> -->
|
||||
|
||||
<tbody>
|
||||
EOF
|
||||
|
||||
foreach my $service (sort keys %services) {
|
||||
my %config = %{ $services{$service} };
|
||||
|
||||
my $pidfile = $config{"pidfile"};
|
||||
my $process = $config{"process"};
|
||||
|
||||
# Collect all pids
|
||||
my @pids = ();
|
||||
|
||||
# Read the PID file or go search...
|
||||
if (defined $pidfile) {
|
||||
@pids = &General::read_pids("${pidfile}");
|
||||
} else {
|
||||
@pids = &General::find_pids("${process}");
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
<tr>
|
||||
<th scope="row">
|
||||
$service
|
||||
</th>
|
||||
EOF
|
||||
|
||||
# Running?
|
||||
if (scalar @pids) {
|
||||
# Get memory consumption
|
||||
my $mem = &General::get_memory_consumption(@pids);
|
||||
|
||||
# Format memory
|
||||
$mem = &General::formatBytes($mem);
|
||||
|
||||
print <<EOF;
|
||||
<td class="status is-running">
|
||||
$Lang::tr{'running'}
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
${mem}
|
||||
</td>
|
||||
EOF
|
||||
|
||||
# Not Running
|
||||
} else {
|
||||
print <<EOF;
|
||||
<td class="status is-stopped" colspan="2">
|
||||
$Lang::tr{'stopped'}
|
||||
</td>
|
||||
EOF
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
</tr>
|
||||
EOF
|
||||
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
</tbody>
|
||||
</table>
|
||||
EOF
|
||||
}
|
||||
|
||||
1; # End of package "Header"
|
||||
|
||||
@@ -30,7 +30,7 @@ require "${General::swroot}/network-functions.pl";
|
||||
require "${General::swroot}/suricata/ruleset-sources";
|
||||
|
||||
# Load perl module to deal with Archives.
|
||||
use Archive::Peek::Libarchive;
|
||||
use Archive::Tar;
|
||||
|
||||
# Load perl module to deal with files and path.
|
||||
use File::Basename;
|
||||
@@ -152,9 +152,6 @@ my @http_ports = ('80', '81');
|
||||
# Array which contains a list of rulefiles which always will be included if they exist.
|
||||
my @static_included_rulefiles = ('local.rules', 'whitelist.rules');
|
||||
|
||||
# Log App Layer Events? (Useful for debugging only)
|
||||
my $LOG_APP_LAYER_EVENTS = 0;
|
||||
|
||||
# Array which contains a list of allways enabled application layer protocols.
|
||||
my @static_enabled_app_layer_protos = ('app-layer', 'decoder', 'files', 'stream');
|
||||
|
||||
@@ -518,6 +515,9 @@ sub downloadruleset ($) {
|
||||
sub extractruleset ($) {
|
||||
my ($provider) = @_;
|
||||
|
||||
# Disable chown functionality when uncompressing files.
|
||||
$Archive::Tar::CHOWN = "0";
|
||||
|
||||
# Get full path and downloaded rulesfile for the given provider.
|
||||
my $tarball = &_get_dl_rulesfile($provider);
|
||||
|
||||
@@ -547,11 +547,13 @@ sub extractruleset ($) {
|
||||
|
||||
} elsif ( $type eq "archive") {
|
||||
# Initialize the tar module.
|
||||
my $tar = Archive::Peek::Libarchive->new(filename => $tarball);
|
||||
my $tar = Archive::Tar->new($tarball);
|
||||
|
||||
# Loop through the archive
|
||||
$tar->iterate( sub {
|
||||
my ($packed_file, $content) = @_;
|
||||
# Get the filelist inside the tarball.
|
||||
my @packed_files = $tar->list_files;
|
||||
|
||||
# Loop through the filelist.
|
||||
foreach my $packed_file (@packed_files) {
|
||||
my $destination;
|
||||
|
||||
# Splitt the packed file into chunks.
|
||||
@@ -570,13 +572,13 @@ sub extractruleset ($) {
|
||||
# Handle rules files.
|
||||
} elsif ($file =~ m/\.rules$/) {
|
||||
# Skip rule files which are not located in the rules directory or archive root.
|
||||
return unless(($packed_file =~ /^rules\//) || ($packed_file =~ /^$provider-rules\//) || ($packed_file !~ /\//));
|
||||
next unless(($packed_file =~ /^rules\//) || ($packed_file =~ /^$provider-rules\//) || ($packed_file !~ /\//));
|
||||
|
||||
# Skip deleted.rules.
|
||||
#
|
||||
# Mostly they have been taken out for correctness or performance reasons and therfore
|
||||
# it is not a great idea to enable any of them.
|
||||
return if($file =~ m/deleted.rules$/);
|
||||
next if($file =~ m/deleted.rules$/);
|
||||
|
||||
my $rulesfilename;
|
||||
|
||||
@@ -613,24 +615,39 @@ sub extractruleset ($) {
|
||||
$destination = "$tmp_rules_directory/$rulesfilename";
|
||||
} else {
|
||||
# Skip all other files.
|
||||
return;
|
||||
next;
|
||||
}
|
||||
|
||||
# Check if the destination file exists.
|
||||
unless(-e "$destination") {
|
||||
# Open filehandle to write the content to a new file.
|
||||
open(FILE, ">", "$destination") or die "Could not open $destination. $!\n";
|
||||
# Extract the file to the temporary directory.
|
||||
$tar->extract_file("$packed_file", "$destination");
|
||||
} else {
|
||||
# Open filehandle to append the content to the existing file.
|
||||
open(FILE, ">>", "$destination") or die "Could not open $destination. $!\n";
|
||||
# Generate temporary file name, located in the temporary rules directory and a suffix of ".tmp".
|
||||
my $tmp = File::Temp->new( SUFFIX => ".tmp", DIR => "$tmp_rules_directory", UNLINK => 0 );
|
||||
my $tmpfile = $tmp->filename();
|
||||
|
||||
# Extract the file to the new temporary file name.
|
||||
$tar->extract_file("$packed_file", "$tmpfile");
|
||||
|
||||
# Open the the existing file.
|
||||
open(DESTFILE, ">>", "$destination") or die "Could not open $destination. $!\n";
|
||||
open(TMPFILE, "<", "$tmpfile") or die "Could not open $tmpfile. $!\n";
|
||||
|
||||
# Loop through the content of the temporary file.
|
||||
while (<TMPFILE>) {
|
||||
# Append the content line by line to the destination file.
|
||||
print DESTFILE "$_";
|
||||
}
|
||||
|
||||
# Close the file handles.
|
||||
close(TMPFILE);
|
||||
close(DESTFILE);
|
||||
|
||||
# Remove the temporary file.
|
||||
unlink("$tmpfile");
|
||||
}
|
||||
|
||||
# Write the extracted file content to the filehandle.
|
||||
print FILE "$content" if ($content);
|
||||
|
||||
# Close the file handle.
|
||||
close(FILE);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1010,14 +1027,11 @@ sub _store_error_message ($) {
|
||||
sub _get_dl_rulesfile($) {
|
||||
my ($provider) = @_;
|
||||
|
||||
# Abort if the requested provider is not known.
|
||||
return unless($IDS::Ruleset::Providers{$provider});
|
||||
# Check if the requested provider is known.
|
||||
if ($IDS::Ruleset::Providers{$provider}) {
|
||||
# Gather the download type for the given provider.
|
||||
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
|
||||
|
||||
# Try to gather the download type for the given provider.
|
||||
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
|
||||
|
||||
# Check if a download type could be grabbed.
|
||||
if ($dl_type) {
|
||||
# Obtain the file suffix for the download file type.
|
||||
my $suffix = $dl_type_to_suffix{$dl_type};
|
||||
|
||||
@@ -1440,33 +1454,31 @@ sub write_used_rulefiles_file (@) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($LOG_APP_LAYER_EVENTS) {
|
||||
print FILE "\n#Default rules for used application layer protocols.\n";
|
||||
foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
|
||||
# Check if the current processed app layer proto needs to be translated
|
||||
# into an application name.
|
||||
if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
|
||||
# Obtain the translated application name for this protocol.
|
||||
$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
|
||||
}
|
||||
print FILE "\n#Default rules for used application layer protocols.\n";
|
||||
foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
|
||||
# Check if the current processed app layer proto needs to be translated
|
||||
# into an application name.
|
||||
if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
|
||||
# Obtain the translated application name for this protocol.
|
||||
$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
|
||||
}
|
||||
|
||||
# Generate filename.
|
||||
my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
|
||||
# Generate filename.
|
||||
my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
|
||||
|
||||
# Check if such a file exists.
|
||||
if (-f "$rulesfile") {
|
||||
# Write the rulesfile name to the file.
|
||||
print FILE " - $rulesfile\n";
|
||||
}
|
||||
# Check if such a file exists.
|
||||
if (-f "$rulesfile") {
|
||||
# Write the rulesfile name to the file.
|
||||
print FILE " - $rulesfile\n";
|
||||
}
|
||||
|
||||
# Generate filename with "events" in filename.
|
||||
$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
|
||||
# Generate filename with "events" in filename.
|
||||
$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
|
||||
|
||||
# Check if this file exists.
|
||||
if (-f "$rulesfile" ) {
|
||||
# Write the rulesfile name to the file.
|
||||
print FILE " - $rulesfile\n";
|
||||
}
|
||||
# Check if this file exists.
|
||||
if (-f "$rulesfile" ) {
|
||||
# Write the rulesfile name to the file.
|
||||
print FILE " - $rulesfile\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
|
||||
package Lang;
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require 'CONFIG_ROOT/general-functions.pl';
|
||||
use strict;
|
||||
|
||||
### A cache file to avoid long recalculation
|
||||
@@ -25,7 +25,7 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
|
||||
# The file content has to start with (of course without the leading #):
|
||||
# --------- CODE ---------
|
||||
#%tr = (%tr,
|
||||
# 'key1' => 'value', # add all your entries key/values here
|
||||
# 'key1' => 'value', # add all your entries key/values here
|
||||
# 'key2' => 'value' # and end with (of course without the leading #):
|
||||
#);
|
||||
# --------- CODE END---------
|
||||
@@ -37,14 +37,13 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
|
||||
|
||||
### Initialize language
|
||||
%Lang::tr = ();
|
||||
|
||||
my %settings = ();
|
||||
&General::readhash("${General::swroot}/main/settings", \%settings);
|
||||
|
||||
# Load the selected language
|
||||
reload($settings{'LANGUAGE'});
|
||||
|
||||
our $language = $settings{'LANGUAGE'};
|
||||
# language variable used by makegraphs script
|
||||
our $language;
|
||||
$language = $settings{'LANGUAGE'};
|
||||
|
||||
#
|
||||
# Load requested language file from cachefile. If cachefile doesn't exist, build on the fly.
|
||||
@@ -55,32 +54,35 @@ sub reload {
|
||||
|
||||
%Lang::tr = (); # start with a clean array
|
||||
|
||||
# Use CacheLang if present & not empty.
|
||||
if (-s "$Lang::CacheLang.$LG" ) {
|
||||
do "$Lang::CacheLang.$LG";
|
||||
return;
|
||||
}
|
||||
# Use CacheLang if present & not empty.
|
||||
if (-s "$Lang::CacheLang.$LG" ) {
|
||||
##fix: need to put a lock_shared on it in case rebuild is active ?
|
||||
do "$Lang::CacheLang.$LG";
|
||||
#&General::log ("cachelang file used [$LG]");
|
||||
return;
|
||||
}
|
||||
|
||||
#&General::log("Building on the fly cachelang file for [$LG]");
|
||||
do "${General::swroot}/langs/en.pl";
|
||||
do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
|
||||
|
||||
do "${General::swroot}/langs/en.pl";
|
||||
do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
|
||||
my $AddonDir = ${General::swroot}.'/addon-lang';
|
||||
|
||||
my $AddonDir = ${General::swroot}.'/addon-lang';
|
||||
|
||||
opendir (DIR, $AddonDir);
|
||||
my @files = readdir (DIR);
|
||||
closedir (DIR);
|
||||
opendir (DIR, $AddonDir);
|
||||
my @files = readdir (DIR);
|
||||
closedir (DIR);
|
||||
|
||||
# default is to load english first
|
||||
foreach my $file ( grep (/.*\.en.pl$/,@files)) {
|
||||
do "$AddonDir/$file";
|
||||
}
|
||||
foreach my $file ( grep (/.*\.en.pl$/,@files)) {
|
||||
do "$AddonDir/$file";
|
||||
}
|
||||
|
||||
# read again, overwriting 'en' with choosed lang
|
||||
if ($LG ne 'en') {
|
||||
foreach my $file (grep (/.*\.$LG\.pl$/,@files)) {
|
||||
do "$AddonDir/$file";
|
||||
}
|
||||
# read again, overwriting 'en' with choosed lang
|
||||
if ($LG ne 'en') {
|
||||
foreach my $file (grep (/.*\.$LG\.pl$/,@files) ) {
|
||||
do "$AddonDir/$file";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@@ -91,7 +93,7 @@ sub reload {
|
||||
sub BuildUniqueCacheLang {
|
||||
|
||||
my ($LG) = @_;
|
||||
|
||||
|
||||
# Make CacheLang empty so that it won't be used by Lang::reload
|
||||
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
|
||||
flock (FILE, 2) or return 1;
|
||||
@@ -99,7 +101,7 @@ sub BuildUniqueCacheLang {
|
||||
|
||||
# Load languages files
|
||||
&Lang::reload ($LG);
|
||||
|
||||
|
||||
# Write the unique %tr=('key'=>'value') array
|
||||
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
|
||||
flock (FILE, 2) or return 1;
|
||||
@@ -110,7 +112,7 @@ sub BuildUniqueCacheLang {
|
||||
}
|
||||
print FILE ');';
|
||||
close (FILE);
|
||||
|
||||
|
||||
# Make nobody:nobody file's owner
|
||||
# Will work when called by root/rc.sysinit
|
||||
chown (0,0,"$Lang::CacheLang.$LG");
|
||||
@@ -124,7 +126,7 @@ sub BuildUniqueCacheLang {
|
||||
sub BuildCacheLang {
|
||||
|
||||
my $AddonDir = ${General::swroot}.'/addon-lang';
|
||||
|
||||
|
||||
# Correct permission in case addon-installer did not do it
|
||||
opendir (DIR, $AddonDir);
|
||||
my @files = readdir (DIR);
|
||||
@@ -138,7 +140,7 @@ sub BuildCacheLang {
|
||||
my $selected = '';;
|
||||
my $missed = '';
|
||||
my $error = 0;
|
||||
|
||||
|
||||
open (LANGS, "${General::swroot}/langs/list");
|
||||
while (<LANGS>) {
|
||||
($selected) = split (':');
|
||||
@@ -151,7 +153,7 @@ sub BuildCacheLang {
|
||||
if ($missed) { # collision with current cache lang being used ?
|
||||
$error = &BuildUniqueCacheLang ($missed);
|
||||
}
|
||||
|
||||
|
||||
&General::log ("WARNING: cannot build cachelang file for [$missed].") if ($error);
|
||||
return $error;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# The CGI files are referenced relative to the "/cgi-bin/" path
|
||||
|
||||
# Fixed base URL (without trailing slash)
|
||||
BASE_URL=https://www.ipfire.org/docs
|
||||
BASE_URL=https://wiki.ipfire.org
|
||||
|
||||
# System menu
|
||||
index.cgi=configuration/system/startpage
|
||||
@@ -70,6 +70,7 @@ iptables.cgi=configuration/firewall/iptables
|
||||
pakfire.cgi=configuration/ipfire/pakfire
|
||||
wlanap.cgi=addons/wireless
|
||||
tor.cgi=addons/tor
|
||||
mpfire.cgi=addons/mpfire
|
||||
samba.cgi=addons/samba
|
||||
|
||||
# Logs menu
|
||||
|
||||
@@ -28,12 +28,9 @@ require "/var/ipfire/general-functions.pl";
|
||||
use experimental 'smartmatch';
|
||||
use Socket;
|
||||
|
||||
our %ethernet = ();
|
||||
our %ppp = ();
|
||||
|
||||
# Read configuration files
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%ethernet);
|
||||
&General::readhash("${General::swroot}/ppp/settings", \%ppp);
|
||||
# System ethernet configuration
|
||||
our %ethernet_settings = ();
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%ethernet_settings);
|
||||
|
||||
# List of all possible network zones that can be configured
|
||||
our @known_network_zones = ("red", "green", "orange", "blue");
|
||||
@@ -295,40 +292,52 @@ sub get_broadcast($) {
|
||||
}
|
||||
|
||||
sub get_prefix($) {
|
||||
my $network = shift;
|
||||
my $network = shift;
|
||||
|
||||
# Convert to binary
|
||||
my ($network_bin, $netmask_bin) = &network2bin($network);
|
||||
# Convert to binary
|
||||
my ($network_bin, $netmask_bin) = &network2bin($network);
|
||||
|
||||
if (defined $netmask_bin) {
|
||||
my $prefix = 0;
|
||||
if (defined $netmask_bin) {
|
||||
my $prefix = 0;
|
||||
|
||||
while (1) {
|
||||
# End the loop if we have consumed all ones
|
||||
last if ($netmask_bin == 0);
|
||||
while (1) {
|
||||
# End the loop if we have consumed all ones
|
||||
last if ($netmask_bin == 0);
|
||||
|
||||
# Increment prefix
|
||||
$prefix++;
|
||||
# Increment prefix
|
||||
$prefix++;
|
||||
|
||||
# Remove the most-significant one
|
||||
$netmask_bin <<= 1;
|
||||
$netmask_bin &= 0xffffffff;
|
||||
}
|
||||
# Remove the most-significant one
|
||||
$netmask_bin <<= 1;
|
||||
$netmask_bin &= 0xffffffff;
|
||||
}
|
||||
|
||||
return $prefix;
|
||||
}
|
||||
return $prefix;
|
||||
}
|
||||
|
||||
return undef;
|
||||
return undef;
|
||||
}
|
||||
|
||||
sub get_netmask($) {
|
||||
my $network = shift;
|
||||
|
||||
# Fetch the prefix
|
||||
my $prefix = &get_prefix($network);
|
||||
|
||||
# Convert to netmask
|
||||
return &convert_prefix2netmask($prefix);
|
||||
}
|
||||
|
||||
sub normalize_network($) {
|
||||
my $network = shift;
|
||||
my $address = &get_netaddress($network);
|
||||
my $prefix = &get_prefix($network);
|
||||
|
||||
# Fetch the prefix
|
||||
my $prefix = &get_prefix($network);
|
||||
unless (defined $address && defined $prefix) {
|
||||
return undef;
|
||||
}
|
||||
|
||||
# Convert to netmask
|
||||
return &convert_prefix2netmask($prefix);
|
||||
return "${address}/${prefix}";
|
||||
}
|
||||
|
||||
# Returns True if $address is in $network.
|
||||
@@ -438,7 +447,7 @@ sub _get_wireless_status($) {
|
||||
my $intf = shift;
|
||||
|
||||
if (!$wireless_status{$intf}) {
|
||||
$wireless_status{$intf} = join("\n", &General::system_output("iw", "dev", "$intf", "link"));
|
||||
$wireless_status{$intf} = join('\n', &General::system_output("iwconfig", "$intf"));
|
||||
}
|
||||
|
||||
return $wireless_status{$intf};
|
||||
@@ -447,7 +456,7 @@ sub _get_wireless_status($) {
|
||||
sub wifi_get_essid($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($essid) = $status =~ /^\s+SSID: (.*)$/m;
|
||||
my ($essid) = $status =~ /ESSID:\"(.*)\"/;
|
||||
|
||||
return $essid;
|
||||
}
|
||||
@@ -455,15 +464,15 @@ sub wifi_get_essid($) {
|
||||
sub wifi_get_frequency($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($frequency) = $status =~ /^\s+freq: (\d+\.\d+)/m;
|
||||
my ($frequency) = $status =~ /Frequency:(\d+\.\d+ GHz)/;
|
||||
|
||||
return $frequency / 1000 . " GHz";
|
||||
return $frequency;
|
||||
}
|
||||
|
||||
sub wifi_get_access_point($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($access_point) = $status =~ /^Connected to ([0-9a-f:]+)/;
|
||||
my ($access_point) = $status =~ /Access Point: ([0-9A-F:]+)/;
|
||||
|
||||
return $access_point;
|
||||
}
|
||||
@@ -471,15 +480,27 @@ sub wifi_get_access_point($) {
|
||||
sub wifi_get_bit_rate($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($bit_rate) = $status =~ /^\s+rx bitrate: (\d+(?:\.\d+) MBit\/s)/m;
|
||||
my ($bit_rate) = $status =~ /Bit Rate=(\d+ [GM]b\/s)/;
|
||||
|
||||
return $bit_rate;
|
||||
}
|
||||
|
||||
sub wifi_get_link_quality($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($cur, $max) = $status =~ /Link Quality=(\d+)\/(\d+)/;
|
||||
|
||||
if($max > 0) {
|
||||
return sprintf('%.0f', ($cur * 100) / $max);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub wifi_get_signal_level($) {
|
||||
my $status = &_get_wireless_status(shift);
|
||||
|
||||
my ($signal_level) = $status =~ /^\s+signal: (\-\d+ dBm)/m;
|
||||
my ($signal_level) = $status =~ /Signal level=(\-\d+ dBm)/;
|
||||
|
||||
return $signal_level;
|
||||
}
|
||||
@@ -584,7 +605,7 @@ sub get_intf_by_address($) {
|
||||
#
|
||||
sub get_available_network_zones () {
|
||||
# Obtain the configuration type from the netsettings hash.
|
||||
my $config_type = $ethernet{'CONFIG_TYPE'};
|
||||
my $config_type = $ethernet_settings{'CONFIG_TYPE'};
|
||||
|
||||
# Hash which contains the conversation from the config mode
|
||||
# to the existing network interface names. They are stored like
|
||||
@@ -616,10 +637,10 @@ sub get_available_network_zones () {
|
||||
#
|
||||
sub is_zone_available() {
|
||||
my $zone = lc shift;
|
||||
|
||||
|
||||
# Make sure the zone is valid
|
||||
die("Unknown network zone '$zone'") unless ($zone ~~ @known_network_zones);
|
||||
|
||||
|
||||
# Get available zones and return result
|
||||
my @available_zones = get_available_network_zones();
|
||||
return ($zone ~~ @available_zones);
|
||||
@@ -630,8 +651,8 @@ sub is_zone_available() {
|
||||
#
|
||||
sub is_red_mode_ip() {
|
||||
# Obtain the settings from the netsettings hash
|
||||
my $config_type = $ethernet{'CONFIG_TYPE'};
|
||||
my $red_type = $ethernet{'RED_TYPE'};
|
||||
my $config_type = $ethernet_settings{'CONFIG_TYPE'};
|
||||
my $red_type = $ethernet_settings{'RED_TYPE'};
|
||||
|
||||
# RED must be a network device (configuration 1-4) with dynamic or static IP
|
||||
return (($config_type ~~ [1..4]) && ($red_type ~~ ["DHCP", "STATIC"]));
|
||||
@@ -692,7 +713,7 @@ sub testsuite() {
|
||||
assert('find_next_ip_address("1.2.3.4", 2)', $result eq "1.2.3.6");
|
||||
|
||||
$result = &network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0");
|
||||
assert('network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0")', !$result);
|
||||
assert('network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0")', $result);
|
||||
|
||||
$result = &network_equal("192.168.0.0/24", "192.168.0.0/25");
|
||||
assert('network_equal("192.168.0.0/24", "192.168.0.0/25")', !$result);
|
||||
@@ -718,13 +739,6 @@ sub testsuite() {
|
||||
$result = &ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20");
|
||||
assert('ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20")', !$result);
|
||||
|
||||
# Check &get_prefix()
|
||||
$result = &get_prefix("192.168.0.0/24");
|
||||
assert('get_prefix("192.168.0.0/24")', $result != 24);
|
||||
|
||||
$result = &get_prefix("192.168.0.0/255.255.0.0");
|
||||
assert('get_prefix("192.168.0.0/255.255.0.0")', $result != 16);
|
||||
|
||||
print "Testsuite completed successfully!\n";
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
FWBRIDGEMODE=off
|
||||
FWBRIDGEIP=0.0.0.0
|
||||
FWBRIDGEMASK=0.0.0.0
|
||||
BRIDGENETFILTER=off
|
||||
DROPNEWNOTSYN=on
|
||||
DROPINPUT=on
|
||||
DROPFORWARD=on
|
||||
FWPOLICY=DROP
|
||||
FWPOLICY1=DROP
|
||||
FWPOLICY2=DROP
|
||||
DROPPORTSCAN=on
|
||||
DROPOUTGOING=on
|
||||
DROPSAMBA=off
|
||||
DROPPROXY=off
|
||||
SHOWREMARK=on
|
||||
SHOWCOLORS=on
|
||||
SHOWTABLES=off
|
||||
SHOWDROPDOWN=off
|
||||
DROPWIRELESSINPUT=on
|
||||
DROPWIRELESSFORWARD=on
|
||||
DROPSPOOFEDMARTIAN=on
|
||||
DROPHOSTILE=on
|
||||
LOGDROPHOSTILEIN=on
|
||||
LOGDROPHOSTILEOUT=on
|
||||
LOGDROPCTINVALID=on
|
||||
@@ -1,9 +0,0 @@
|
||||
22=off
|
||||
ENABLE_TCP_DDOS=off
|
||||
25=off
|
||||
80=off
|
||||
53=off
|
||||
8080=off
|
||||
8090=off
|
||||
443=off
|
||||
5555=off
|
||||
5
config/cfgroot/udp-ddos-settings
Normal file
5
config/cfgroot/udp-ddos-settings
Normal file
@@ -0,0 +1,5 @@
|
||||
53=off
|
||||
ENABLE_UDP_DDOS=off
|
||||
5060=off
|
||||
5061=off
|
||||
10408=off
|
||||
5
config/cfgroot/udp_ports
Normal file
5
config/cfgroot/udp_ports
Normal file
@@ -0,0 +1,5 @@
|
||||
domain 53/udp # Domain Name Server
|
||||
game1 10408/udp # Domain Name Server
|
||||
sip 5060/udp # Voice over Internet
|
||||
siptls 5061/udp # Voice over Internet TLS
|
||||
|
||||
@@ -52,6 +52,11 @@ if (-e "/var/ipfire/wireguard/peers") {
|
||||
"CLIENT_DNS" => $Network::ethernet{'GREEN_ADDRESS'},
|
||||
});
|
||||
|
||||
# Returns true if WireGuard is enabled
|
||||
sub is_enabled() {
|
||||
return ($settings{'ENABLED'} eq "on");
|
||||
}
|
||||
|
||||
# Returns the local endpoint
|
||||
sub get_endpoint() {
|
||||
my $endpoint = $settings{'ENDPOINT'};
|
||||
@@ -339,6 +344,9 @@ sub free_pool_addresses($$) {
|
||||
my @used_addresses = ();
|
||||
my @free_addresses = ();
|
||||
|
||||
# wg0 IP is reserved so put in @used_addresses
|
||||
push(@used_addresses, &Network::ip2bin($settings{'ADDRESS'}));
|
||||
|
||||
# Collect all used addresses
|
||||
foreach my $key (keys %peers) {
|
||||
my $peer = &load_peer($key);
|
||||
@@ -483,6 +491,9 @@ sub parse_configuration($$) {
|
||||
# Remove line breaks
|
||||
chomp;
|
||||
|
||||
# Remove any carriage returns
|
||||
$_ =~ s/\r$//;
|
||||
|
||||
# Search for section headers
|
||||
if ($_ =~ m/^\[(\w+)\]$/) {
|
||||
$section = $1;
|
||||
@@ -565,6 +576,9 @@ sub parse_configuration($$) {
|
||||
|
||||
# Check if all networks are valid
|
||||
foreach my $network (@networks) {
|
||||
# Skip any IPv6 networks
|
||||
next if ($network =~ m/:/);
|
||||
|
||||
unless (&Network::check_subnet($network)) {
|
||||
push(@errormessages, $Lang::tr{'invalid network'} . " $network");
|
||||
}
|
||||
|
||||
1
config/cfgroot/xdpdns-settings
Normal file
1
config/cfgroot/xdpdns-settings
Normal file
@@ -0,0 +1 @@
|
||||
ENABLE_DNSBLOCK=on
|
||||
1
config/cfgroot/xdpsni-settings
Normal file
1
config/cfgroot/xdpsni-settings
Normal file
@@ -0,0 +1 @@
|
||||
ENABLE_SNIBLOCK=on
|
||||
@@ -1 +0,0 @@
|
||||
ENABLE_XDPTAILCALL=on
|
||||
@@ -22,6 +22,7 @@ LoadPlugin load
|
||||
#LoadPlugin logfile
|
||||
LoadPlugin memory
|
||||
LoadPlugin ping
|
||||
LoadPlugin processes
|
||||
LoadPlugin rrdtool
|
||||
LoadPlugin sensors
|
||||
LoadPlugin swap
|
||||
@@ -52,11 +53,6 @@ include "/etc/collectd.precache"
|
||||
Chain filter SPOOFED_MARTIAN DROP_SPOOFED_MARTIAN
|
||||
Chain filter HOSTILE_DROP_IN DROP_HOSTILE
|
||||
Chain filter HOSTILE_DROP_OUT DROP_HOSTILE
|
||||
|
||||
# IPS
|
||||
Chain mangle IPS BYPASSED
|
||||
Chain mangle IPS SCANNED
|
||||
Chain mangle IPS WHITELISTED
|
||||
</Plugin>
|
||||
|
||||
#<Plugin logfile>
|
||||
@@ -70,6 +66,18 @@ include "/etc/collectd.precache"
|
||||
timeout 10
|
||||
</Plugin>
|
||||
|
||||
<Plugin processes>
|
||||
Process "sshd"
|
||||
Process "smbd"
|
||||
Process "nmbd"
|
||||
Process "squid"
|
||||
Process "squidguard"
|
||||
Process "charon"
|
||||
Process "openvpn"
|
||||
Process "qemu"
|
||||
Process "mpd"
|
||||
</Plugin>
|
||||
|
||||
<Plugin rrdtool>
|
||||
DataDir "/var/log/rrd/collectd"
|
||||
</Plugin>
|
||||
@@ -79,5 +87,5 @@ include "/etc/collectd.precache"
|
||||
</Plugin>
|
||||
|
||||
#include "/etc/collectd.thermal"
|
||||
include "/etc/collectd.custom"
|
||||
include "/etc/collectd.vpn"
|
||||
include "/etc/collectd.d/*"
|
||||
|
||||
1
config/collectd/collectd.custom
Normal file
1
config/collectd/collectd.custom
Normal file
@@ -0,0 +1 @@
|
||||
# Use this file to add custom configs and rules for collectd
|
||||
@@ -37,6 +37,11 @@ option host_name
|
||||
# Most distributions have NTP support.
|
||||
option ntp_servers
|
||||
|
||||
# Rapid commit support.
|
||||
# Safe to enable by default because it requires the equivalent option set
|
||||
# on the server to actually work.
|
||||
option rapid_commit
|
||||
|
||||
# A ServerID is required by RFC2131.
|
||||
require dhcp_server_identifier
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
net.ipv6.conf.default.accept_redirects = 0
|
||||
|
||||
# Do not try to pick up existing TCP connections in conntrack
|
||||
net.netfilter.nf_conntrack_tcp_loose = 0
|
||||
|
||||
# Enable netfilter accounting
|
||||
net.netfilter.nf_conntrack_acct = 1
|
||||
|
||||
@@ -114,6 +111,3 @@ kernel.perf_event_paranoid = 3
|
||||
|
||||
# Only processes with CAP_SYS_PTRACE may use ptrace
|
||||
kernel.yama.ptrace_scope = 2
|
||||
|
||||
# Disable unprivileged calls to bpf() without option to enable during runtime
|
||||
kernel.unprivileged_bpf_disabled = 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Log all kernel messages to the console.
|
||||
# Logging much else clutters up the screen.
|
||||
kern.* -/var/log/kern.log
|
||||
#kern.* /dev/console
|
||||
|
||||
# Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
|
||||
@@ -240,7 +240,7 @@ sub get_std_net_ip
|
||||
}elsif($val eq 'RED'){
|
||||
return "0.0.0.0/0";
|
||||
}elsif($val eq 'WGRW'){
|
||||
return $Wireguard::settings{'CLIENT_POOL'};
|
||||
return $Wireguard::settings{'CLIENT_POOL'};
|
||||
}elsif($val =~ /OpenVPN/i){
|
||||
return "$ovpnsettings{'DOVPN_SUBNET'}";
|
||||
}elsif($val =~ /IPsec/i){
|
||||
@@ -261,12 +261,10 @@ sub get_interface
|
||||
if($net eq "$netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}"){
|
||||
return "$netsettings{'BLUE_DEV'}";
|
||||
}
|
||||
|
||||
# Wireguard
|
||||
if ($net eq $Wireguard::settings{'CLIENT_POOL'}) {
|
||||
return "wg0";
|
||||
}
|
||||
|
||||
# Wireguard
|
||||
if ($net eq $Wireguard::settings{'CLIENT_POOL'}) {
|
||||
return "wg0";
|
||||
}
|
||||
if($net eq "0.0.0.0/0") {
|
||||
return &get_external_interface();
|
||||
}
|
||||
@@ -393,24 +391,24 @@ sub get_address
|
||||
push(@ret, [$host_address, ""]);
|
||||
}
|
||||
|
||||
# WireGuard Peers
|
||||
} elsif ($key eq 'wg_peer' || $key eq 'wg_peer_src' || $key eq 'wg_peer_tgt') {
|
||||
my $peer = &Wireguard::get_peer_by_name($value);
|
||||
if (defined $peer) {
|
||||
my $remotes;
|
||||
# WireGuard Peers
|
||||
} elsif ($key eq 'wg_peer' || $key eq 'wg_peer_src' || $key eq 'wg_peer_tgt') {
|
||||
my $peer = &Wireguard::get_peer_by_name($value);
|
||||
if (defined $peer) {
|
||||
my $remotes;
|
||||
|
||||
# Select the remote IP addresses
|
||||
if ($peer->{'TYPE'} eq 'host') {
|
||||
$remotes = $peer->{'CLIENT_ADDRESS'};
|
||||
} elsif ($peer->{'TYPE'} eq 'net') {
|
||||
$remotes = $peer->{'REMOTE_SUBNETS'};
|
||||
}
|
||||
# Select the remote IP addresses
|
||||
if ($peer->{'TYPE'} eq 'host') {
|
||||
$remotes = $peer->{'CLIENT_ADDRESS'};
|
||||
} elsif ($peer->{'TYPE'} eq 'net') {
|
||||
$remotes = $peer->{'REMOTE_SUBNETS'};
|
||||
}
|
||||
|
||||
# Add all remotes
|
||||
foreach my $remote (@$remotes) {
|
||||
push(@ret, [$remote, $peer->{'INTERFACE'}]);
|
||||
}
|
||||
}
|
||||
# Add all remotes
|
||||
foreach my $remote (@$remotes) {
|
||||
push(@ret, [$remote, $peer->{'INTERFACE'}]);
|
||||
}
|
||||
}
|
||||
|
||||
# OpenVPN networks.
|
||||
} elsif ($key ~~ ["ovpn_net_src", "ovpn_net_tgt", "OpenVPN static network"]) {
|
||||
|
||||
@@ -54,6 +54,7 @@ esac
|
||||
|
||||
HAVE_IPSEC="true"
|
||||
HAVE_OPENVPN="true"
|
||||
HAVE_WG="true"
|
||||
|
||||
# INPUT
|
||||
|
||||
@@ -97,6 +98,14 @@ case "${HAVE_OPENVPN},${POLICY}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
# WireGuard INPUT
|
||||
case "${HAVE_WG},${POLICY}" in
|
||||
true,MODE1) ;;
|
||||
true,*)
|
||||
iptables -A POLICYIN -i wg+ -j ACCEPT
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${FWPOLICY2}" in
|
||||
REJECT)
|
||||
if [ "${DROPINPUT}" = "on" ]; then
|
||||
@@ -122,9 +131,6 @@ case "${POLICY}" in
|
||||
fi
|
||||
iptables -A POLICYFWD -j REJECT --reject-with icmp-host-unreachable -m comment --comment "DROP_FORWARD"
|
||||
;;
|
||||
ACCEPT) # ACCEPT for firewall bridge mode
|
||||
iptables -A POLICYFWD -j ACCEPT -m comment --comment "ACCEPT_FORWARD"
|
||||
;;
|
||||
*) # DROP
|
||||
if [ "${DROPFORWARD}" = "on" ]; then
|
||||
iptables -A POLICYFWD -m limit --limit 10/second -j LOG --log-prefix "DROP_FORWARD "
|
||||
@@ -152,6 +158,9 @@ case "${POLICY}" in
|
||||
# Grant access for OpenVPN connections
|
||||
iptables -A POLICYFWD -i tun+ -j ACCEPT
|
||||
|
||||
# Grant access for WireGuard
|
||||
iptables -A POLICYFWD -i wg+ -j ACCEPT
|
||||
|
||||
if [ -n "${IFACE}" ]; then
|
||||
if [ "${HAVE_BLUE}" = "true" ] && [ -n "${BLUE_DEV}" ]; then
|
||||
iptables -A POLICYFWD -i "${BLUE_DEV}" -s "${BLUE_NETADDRESS}/${BLUE_NETMASK}" -o "${IFACE}" -j ACCEPT
|
||||
@@ -165,15 +174,7 @@ case "${POLICY}" in
|
||||
if [ "${DROPFORWARD}" = "on" ]; then
|
||||
iptables -A POLICYFWD -m limit --limit 10/second -j LOG --log-prefix "DROP_FORWARD "
|
||||
fi
|
||||
|
||||
case "${FWPOLICY}" in
|
||||
ACCEPT) # ACCEPT for firewall bridge mode
|
||||
iptables -A POLICYFWD -j ACCEPT -m comment --comment "ACCEPT_FORWARD"
|
||||
;;
|
||||
*) # DROP
|
||||
iptables -A POLICYFWD -j DROP -m comment --comment "DROP_FORWARD"
|
||||
;;
|
||||
esac
|
||||
iptables -A POLICYFWD -m comment --comment "DROP_FORWARD" -j DROP
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ my $CHAIN = $CHAIN_FORWARD;
|
||||
my $CHAIN_NAT_SOURCE = "NAT_SOURCE";
|
||||
my $CHAIN_NAT_DESTINATION = "NAT_DESTINATION";
|
||||
my $CHAIN_MANGLE_NAT_DESTINATION_FIX = "NAT_DESTINATION";
|
||||
my $CHAIN_XDP_SYNPROXY = "XDP_SYNPROXY";
|
||||
my $CHAIN_INSYNPROXY = "INSYNPROXY";
|
||||
my $CHAIN_RAWSYNPROXY = "RAWSYNPROXY";
|
||||
my @VALID_CHAINS = ($CHAIN_INPUT, $CHAIN_FORWARD, $CHAIN_OUTPUT);
|
||||
my @ANY_ADDRESSES = ("0.0.0.0/0.0.0.0", "0.0.0.0/0", "0/0");
|
||||
|
||||
@@ -219,12 +220,11 @@ sub flush {
|
||||
run("$IPTABLES -F $CHAIN_INPUT");
|
||||
run("$IPTABLES -F $CHAIN_FORWARD");
|
||||
run("$IPTABLES -F $CHAIN_OUTPUT");
|
||||
run("$IPTABLES -F $CHAIN_INSYNPROXY");
|
||||
run("$IPTABLES -t raw -F $CHAIN_RAWSYNPROXY");
|
||||
run("$IPTABLES -t nat -F $CHAIN_NAT_SOURCE");
|
||||
run("$IPTABLES -t nat -F $CHAIN_NAT_DESTINATION");
|
||||
run("$IPTABLES -t mangle -F $CHAIN_MANGLE_NAT_DESTINATION_FIX");
|
||||
run("$IPTABLES -t raw -F SYN_FLOOD_PROTECT");
|
||||
run("$IPTABLES -F $CHAIN_XDP_SYNPROXY");
|
||||
run("$IPTABLES -t raw -F $CHAIN_XDP_SYNPROXY");
|
||||
}
|
||||
|
||||
sub buildrules {
|
||||
@@ -301,11 +301,11 @@ sub buildrules {
|
||||
$NAT_MODE = uc($$hash{$key}[31]);
|
||||
}
|
||||
|
||||
# Enable SYN flood protection?
|
||||
my $SYN_FLOOD_PROTECTION = 0;
|
||||
|
||||
# Enable XDP SYNPROXY acceleration?
|
||||
my $XDP_SYNPROXY_ACCELERATION = 0;
|
||||
# Check if XDP SYNPROXY is turned on
|
||||
my $SYNPROXY;
|
||||
if(exists($$hash{$key}[37])) {
|
||||
$SYNPROXY = ($$hash{$key}[37] eq 'ON');
|
||||
}
|
||||
|
||||
# Set up time constraints.
|
||||
my @time_options = ();
|
||||
@@ -380,16 +380,6 @@ sub buildrules {
|
||||
}
|
||||
}
|
||||
|
||||
# DoS Protection
|
||||
if (($elements ge 38) && ($$hash{$key}[37] eq "ON")) {
|
||||
$SYN_FLOOD_PROTECTION = 1;
|
||||
}
|
||||
|
||||
# XDP SYNPROXY DDoS Protection Acceleration
|
||||
if (($elements ge 39) && ($$hash{$key}[38] eq "ON")) {
|
||||
$XDP_SYNPROXY_ACCELERATION = 1;
|
||||
}
|
||||
|
||||
# Check which protocols are used in this rule and so that we can
|
||||
# later group rules by protocols.
|
||||
my @protocols = &get_protocols($hash, $key);
|
||||
@@ -628,25 +618,21 @@ sub buildrules {
|
||||
}
|
||||
run("$IPTABLES -A $chain @options @source_intf_options @destination_intf_options -j $target");
|
||||
|
||||
if ($SYN_FLOOD_PROTECTION && ($protocol eq "tcp")) {
|
||||
run("$IPTABLES -t raw -A SYN_FLOOD_PROTECT @options -j CT --notrack");
|
||||
}
|
||||
|
||||
if ($XDP_SYNPROXY_ACCELERATION && ($protocol eq "tcp")) {
|
||||
my $dport = &get_external_port($hash, $key);
|
||||
my @raw_options = ("-p", "tcp", "-m", "tcp", "--syn");
|
||||
my @in_options = ("-p", "tcp", "-m", "tcp");
|
||||
my @options = ("--sack-perm", "--timestamp", "--wscale", "7", "--mss", "1460");
|
||||
push(@raw_options, "--dport", "$dport");
|
||||
push(@in_options, "--dport", "$dport", "-m", "state", "--state", "INVALID,UNTRACKED");
|
||||
if ($LOG) {
|
||||
run("$IPTABLES -t raw -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @raw_options -j LOG --log-prefix '$CHAIN_XDP_SYNPROXY '");
|
||||
}
|
||||
run("$IPTABLES -t raw -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @raw_options -j CT --notrack");
|
||||
if ($LOG) {
|
||||
run("$IPTABLES -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @in_options -j LOG --log-prefix '$CHAIN_XDP_SYNPROXY ' @options");
|
||||
}
|
||||
run("$IPTABLES -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @in_options -j SYNPROXY @options");
|
||||
if ($SYNPROXY) {
|
||||
my $dport = &get_external_port($hash, $key);
|
||||
my @raw_options = ("-p", "tcp", "-m", "tcp", "--syn");
|
||||
my @in_options = ("-p", "tcp", "-m", "tcp");
|
||||
my @options = ("--sack-perm", "--timestamp", "--wscale", "7", "--mss", "1460");
|
||||
push(@raw_options, "--dport", "$dport");
|
||||
push(@in_options, "--dport", "$dport", "-m", "state", "--state", "INVALID,UNTRACKED");
|
||||
if ($LOG) {
|
||||
run("$IPTABLES -t raw -A $CHAIN_RAWSYNPROXY -i $RED_DEV @raw_options -j LOG --log-prefix '$CHAIN_RAWSYNPROXY '");
|
||||
}
|
||||
run("$IPTABLES -t raw -A $CHAIN_RAWSYNPROXY -i $RED_DEV @raw_options -j CT --notrack");
|
||||
if ($LOG) {
|
||||
run("$IPTABLES -A $CHAIN_INSYNPROXY -i $RED_DEV @in_options -j LOG --log-prefix '$CHAIN_RAWSYNPROXY ' @options");
|
||||
}
|
||||
run("$IPTABLES -A $CHAIN_INSYNPROXY -i $RED_DEV @in_options -j SYNPROXY @options");
|
||||
}
|
||||
|
||||
# Handle forwarding rules and add corresponding rules for firewall access.
|
||||
@@ -987,19 +973,19 @@ sub get_dnat_target_port {
|
||||
}
|
||||
|
||||
sub get_external_port {
|
||||
my $hash = shift;
|
||||
my $key = shift;
|
||||
my $hash = shift;
|
||||
my $key = shift;
|
||||
|
||||
if ($$hash{$key}[14] eq "TGT_PORT") {
|
||||
my $port = $$hash{$key}[15];
|
||||
my $external_port = $$hash{$key}[30];
|
||||
if ($$hash{$key}[14] eq "TGT_PORT") {
|
||||
my $port = $$hash{$key}[15];
|
||||
my $external_port = $$hash{$key}[30];
|
||||
|
||||
if ($external_port && ($port ne $external_port)) {
|
||||
return $external_port;
|
||||
} else {
|
||||
return $port;
|
||||
}
|
||||
}
|
||||
if ($external_port && ($port ne $external_port)) {
|
||||
return $external_port;
|
||||
} else {
|
||||
return $port;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub add_dnat_mangle_rules {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
GRUB_DEFAULT=saved
|
||||
GRUB_CMDLINE_LINUX="rd.auto nmi_watchdog=1 softlockup_panic=1 panic=10"
|
||||
GRUB_CMDLINE_LINUX="rd.auto crashkernel=512M nmi_watchdog=1 softlockup_panic=1 panic=10"
|
||||
GRUB_DISABLE_RECOVERY="true"
|
||||
GRUB_BACKGROUND="/boot/grub/splash.png"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 436 KiB |
@@ -171,7 +171,7 @@ CONFIG_IEEE80211AX=y
|
||||
#CONFIG_DEBUG_FILE=y
|
||||
|
||||
# Send debug messages to syslog instead of stdout
|
||||
CONFIG_DEBUG_SYSLOG=y
|
||||
#CONFIG_DEBUG_SYSLOG=y
|
||||
|
||||
# Add support for sending all debug messages (regardless of debug verbosity)
|
||||
# to the Linux kernel tracing facility. This helps debug the entire stack by
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
SSLHonorCipherOrder on
|
||||
SSLCompression off
|
||||
SSLSessionTickets off
|
||||
SSLCertificateFile /etc/httpd/server.crt
|
||||
SSLCertificateKeyFile /etc/httpd/server.key
|
||||
SSLCertificateFile /etc/httpd/server-ecdsa.crt
|
||||
SSLCertificateKeyFile /etc/httpd/server-ecdsa.key
|
||||
|
||||
|
||||
31
config/icinga/icinga.conf
Normal file
31
config/icinga/icinga.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
Listen 1010
|
||||
|
||||
<VirtualHost *:1010>
|
||||
ScriptAlias /icinga/cgi-bin /usr/share/icinga/cgi-bin
|
||||
Alias /icinga /usr/share/icinga/
|
||||
|
||||
RewriteEngine on
|
||||
RewriteRule ^/$ /icinga/ [R]
|
||||
|
||||
<Directory /usr/share/icinga/cgi-bin>
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
|
||||
AuthName "Icinga Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/icinga/htpasswd.users
|
||||
|
||||
Require valid-user
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/icinga/>
|
||||
Options None
|
||||
AllowOverride All
|
||||
|
||||
AuthName "Icinga Access"
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/icinga/htpasswd.users
|
||||
|
||||
Require valid-user
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
@@ -55,6 +55,12 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '12h',
|
||||
'category' => 'reputation' },
|
||||
'SPAMHAUS_EDROP' => { 'name' => "Spamhaus Extended Don't Route or Peer List",
|
||||
'url' => 'https://www.spamhaus.org/drop/edrop.txt',
|
||||
'info' => 'https://www.spamhaus.org/drop/',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '1h',
|
||||
'category' => 'reputation' },
|
||||
'DSHIELD' => { 'name' => 'Dshield.org Recommended Block List',
|
||||
'url' => 'https://www.dshield.org/block.txt',
|
||||
'info' => 'https://dshield.org/',
|
||||
@@ -100,6 +106,12 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
|
||||
'parser' => 'ip-or-net-list',,
|
||||
'rate' => '1h',
|
||||
'category' => 'application' },
|
||||
'ALIENVAULT' => { 'name' => 'AlienVault IP Reputation database',
|
||||
'url' => 'https://reputation.alienvault.com/reputation.generic',
|
||||
'info' => 'https://www.alienvault.com/resource-center/videos/what-is-ip-domain-reputation',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '1h',
|
||||
'category' => 'reputation' },
|
||||
'BOGON' => { 'name' => 'Bogus address list (Martian)',
|
||||
'url' => 'https://www.team-cymru.org/Services/Bogons/bogon-bn-agg.txt',
|
||||
'info' => 'https://www.team-cymru.com/bogon-reference',
|
||||
@@ -124,29 +136,5 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
|
||||
'info' => 'https://www.blocklist.de',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '30m',
|
||||
'category' => 'attacker' },
|
||||
'3CORESEC_SSH' => { 'name' => '3CORESec SSH Activity Blocklist',
|
||||
'url' => 'https://blacklist.3coresec.net/lists/ssh.txt',
|
||||
'info' => 'https://blacklist.3coresec.net',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '1d',
|
||||
'category' => 'attacker' },
|
||||
'3CORESEC_SCAN' => { 'name' => '3CORESec Scan and IDS Blocklist',
|
||||
'url' => 'https://blacklist.3coresec.net/lists/misc.txt',
|
||||
'info' => 'https://blacklist.3coresec.net',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '1d',
|
||||
'category' => 'reputation' },
|
||||
'3CORESEC_WEB' => { 'name' => '3CORESec Web Server Activity Blocklist',
|
||||
'url' => 'https://blacklist.3coresec.net/lists/http.txt',
|
||||
'info' => 'https://blacklist.3coresec.net',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '1d',
|
||||
'category' => 'attacker' },
|
||||
'ABUSECH_BOTNETC2' => { 'name' => 'ABUSE.ch Botnet C2 IP Blocklist',
|
||||
'url' => 'https://sslbl.abuse.ch/blacklist/sslipblacklist.txt',
|
||||
'info' => 'https://sslbl.abuse.ch/blacklist#botnet-c2-ips-csv',
|
||||
'parser' => 'ip-or-net-list',
|
||||
'rate' => '5m',
|
||||
'category' => 'reputation' }
|
||||
'category' => 'attacker' }
|
||||
);
|
||||
|
||||
883
config/kernel/bpfire-logo-ascii.ppm
Normal file
883
config/kernel/bpfire-logo-ascii.ppm
Normal file
@@ -0,0 +1,883 @@
|
||||
P3
|
||||
63 80
|
||||
255
|
||||
161 18 12 165 19 14 170 20 15 171 21 16 170 20 15 171 21 16
|
||||
173 20 15 173 20 15 171 21 16 171 21 16 171 21 16 173 19 15
|
||||
173 20 15 173 19 15 176 18 12 173 19 15 173 20 15 173 20 15
|
||||
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 177 20 14
|
||||
177 20 14 177 20 14 177 20 14 176 18 12 174 18 12 176 17 11
|
||||
176 18 12 177 20 14 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 177 20 14
|
||||
177 20 14 183 19 13 177 20 14 173 19 15 177 20 14 177 20 14
|
||||
177 20 14 173 19 15 177 20 14 177 20 14 177 20 14 177 20 14
|
||||
177 20 14 177 20 14 177 20 14 173 19 15 177 20 14 177 20 14
|
||||
177 20 14 168 18 14 164 16 11
|
||||
161 18 12 165 19 14 170 20 15 171 21 16 170 20 15 170 20 15
|
||||
171 21 16 171 21 16 169 21 14 171 21 16 170 20 15 170 20 15
|
||||
170 20 15 173 20 15 173 19 15 173 20 15 173 20 15 173 19 15
|
||||
173 19 15 173 19 15 177 20 14 176 18 12 176 18 12 176 18 12
|
||||
177 20 14 177 20 14 176 18 12 176 17 11 176 17 11 176 17 11
|
||||
176 17 11 176 18 12 177 20 14 177 20 14 177 20 14 177 20 14
|
||||
177 20 14 183 19 13 177 20 14 177 20 14 177 20 14 177 20 14
|
||||
177 20 14 176 18 12 173 19 15 173 19 15 173 19 15 177 20 14
|
||||
173 19 15 173 19 15 173 19 15 173 19 15 176 18 12 177 20 14
|
||||
177 20 14 177 20 14 177 20 14 173 19 15 173 20 15 173 20 15
|
||||
173 19 15 164 16 11 183 19 13
|
||||
160 19 13 168 22 16 168 22 16 171 21 16 168 22 16 168 22 16
|
||||
168 22 16 168 22 16 168 22 16 168 22 16 171 21 16 171 21 16
|
||||
168 22 16 171 21 16 171 21 16 171 21 16 173 20 15 173 20 15
|
||||
173 20 15 173 19 15 173 20 15 173 20 15 173 19 15 173 19 15
|
||||
173 19 15 173 19 15 176 18 12 173 19 15 174 18 12 176 17 11
|
||||
174 18 12 173 19 15 176 17 11 177 20 14 177 20 14 177 20 14
|
||||
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
|
||||
173 20 15 173 20 15 173 20 15 171 21 16 171 21 16 171 21 16
|
||||
171 21 16 170 20 15 173 20 15 173 20 15 173 20 15 173 20 15
|
||||
173 20 15 173 20 15 173 20 15 171 21 16 171 21 16 173 20 15
|
||||
156 15 13 183 19 13 183 19 13
|
||||
160 19 13 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 171 21 16 171 21 16 171 21 16 173 20 15 171 21 16
|
||||
173 20 15 173 20 15 173 20 15 173 20 15 173 19 15 173 19 15
|
||||
173 19 15 173 19 15 174 18 12 174 18 12 176 17 11 173 19 15
|
||||
174 18 12 173 19 15 176 24 12 173 19 15 176 18 12 177 20 14
|
||||
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
|
||||
173 20 15 173 20 15 173 20 15 171 21 16 173 20 15 173 20 15
|
||||
171 21 16 171 21 16 171 21 16 173 20 15 173 20 15 173 20 15
|
||||
171 21 16 173 20 15 173 20 15 171 21 16 177 20 14 157 19 14
|
||||
183 19 13 183 19 13 183 19 13
|
||||
156 15 13 162 20 14 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 171 21 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 171 21 16 171 21 16 173 20 15 173 20 15 171 21 16
|
||||
173 20 15 173 20 15 173 20 15 173 20 15 173 19 15 173 19 15
|
||||
173 19 15 168 18 14 168 18 14 176 17 11 167 52 24 176 17 11
|
||||
176 17 11 176 18 12 173 92 60 177 20 14 177 20 14 176 17 11
|
||||
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
|
||||
173 20 15 173 19 15 173 19 15 173 20 15 173 19 15 173 20 15
|
||||
171 21 16 171 21 16 171 21 16 173 20 15 171 21 16 171 21 16
|
||||
171 21 16 171 21 16 171 21 16 173 20 15 164 19 14 164 16 11
|
||||
183 19 13 183 19 13 183 19 13
|
||||
157 19 14 162 20 14 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 171 21 16 171 21 16 171 21 16 171 21 16 164 16 11
|
||||
173 20 15 173 19 15 171 21 16 173 19 15 173 19 15 173 19 15
|
||||
164 16 11 167 52 24 167 52 24 164 16 11 173 92 60 211 179 117
|
||||
176 17 11 176 18 12 164 16 11 167 52 24 175 97 50 176 17 11
|
||||
177 20 14 177 20 14 173 19 15 173 19 15 173 19 15 173 20 15
|
||||
176 17 11 176 17 11 173 20 15 173 19 15 173 20 15 171 21 16
|
||||
171 21 16 171 21 16 173 20 15 173 20 15 171 21 16 171 21 16
|
||||
171 21 16 170 20 15 171 21 16 168 22 16 152 14 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13
|
||||
156 20 14 162 20 14 168 22 16 168 22 16 160 22 16 160 22 16
|
||||
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 171 21 16 168 22 16 168 18 14 174 18 12 163 56 28
|
||||
173 19 15 168 18 14 176 17 11 183 19 13 164 16 11 168 18 14
|
||||
164 16 11 175 97 50 175 97 50 164 16 11 176 17 11 238 229 170
|
||||
215 186 121 183 19 13 176 17 11 167 52 24 213 153 88 176 17 11
|
||||
177 20 14 176 17 11 183 19 13 183 19 13 164 16 11 176 17 11
|
||||
167 52 24 176 24 12 176 17 11 173 20 15 173 20 15 171 21 16
|
||||
171 21 16 171 21 16 171 21 16 170 20 15 171 21 16 171 21 16
|
||||
171 21 16 168 22 16 168 22 16 151 18 14 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13
|
||||
152 20 15 160 22 16 160 22 16 160 22 16 168 22 16 162 20 14
|
||||
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
168 22 16 168 22 16 168 18 14 176 24 12 206 199 148 179 118 76
|
||||
164 16 11 176 24 12 191 130 98 162 137 108 191 130 98 164 16 11
|
||||
164 16 11 176 24 12 176 24 12 177 20 14 183 19 13 211 179 117
|
||||
254 255 240 175 96 57 176 17 11 183 19 13 167 52 24 176 17 11
|
||||
176 17 11 175 96 57 162 137 108 169 133 98 167 52 24 164 16 11
|
||||
167 52 24 206 199 148 167 52 24 176 17 11 173 20 15 173 20 15
|
||||
171 21 16 171 21 16 171 21 16 168 22 16 171 21 16 171 21 16
|
||||
168 22 16 168 22 16 152 20 15 176 17 11 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13
|
||||
151 18 14 159 21 16 160 22 16 160 22 16 160 22 16 168 22 16
|
||||
162 20 14 168 22 16 168 22 16 168 22 16 167 21 14 168 22 16
|
||||
168 22 16 168 22 16 164 16 11 191 130 98 243 238 185 176 17 11
|
||||
164 16 11 191 130 98 97 69 52 0 0 0 131 94 71 176 111 73
|
||||
154 14 11 168 18 14 176 17 11 176 111 73 183 19 13 215 186 121
|
||||
254 255 240 221 205 133 183 19 13 176 17 11 164 16 11 164 16 11
|
||||
183 19 13 158 125 90 0 0 0 0 0 0 162 137 108 183 19 13
|
||||
164 16 11 199 143 96 225 212 158 176 17 11 171 21 16 170 20 15
|
||||
171 21 16 171 21 16 170 20 15 171 21 16 171 21 16 168 22 16
|
||||
168 22 16 162 20 14 161 18 12 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 128 8 8
|
||||
151 18 14 156 20 14 160 21 14 160 22 16 160 22 16 168 22 16
|
||||
160 22 16 160 22 16 168 22 16 168 22 16 168 22 16 168 22 16
|
||||
165 19 14 165 19 14 164 16 11 225 212 158 225 212 158 176 17 11
|
||||
183 19 13 131 94 71 91 31 21 243 238 185 91 31 21 162 137 108
|
||||
183 19 13 176 24 12 176 24 12 176 17 11 183 19 13 247 246 193
|
||||
254 255 233 238 229 170 183 19 13 167 52 24 176 24 12 176 17 11
|
||||
199 143 96 91 31 21 225 212 158 162 137 108 97 69 52 173 92 60
|
||||
176 17 11 199 143 96 243 238 185 183 19 13 173 20 15 170 20 15
|
||||
170 20 15 171 21 16 167 21 14 167 21 14 167 21 14 164 19 14
|
||||
168 22 16 150 16 12 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 147 12 10 89 3 6
|
||||
151 18 14 152 20 15 159 21 16 162 20 14 164 19 14 160 22 16
|
||||
160 22 16 167 21 14 168 22 16 168 22 16 168 22 16 165 19 14
|
||||
164 19 14 164 19 14 164 16 11 199 163 109 249 249 214 183 19 13
|
||||
176 24 12 131 94 71 111 0 3 183 19 13 106 7 8 97 69 52
|
||||
199 163 109 211 179 117 183 19 13 183 19 13 211 179 117 254 255 233
|
||||
253 255 226 238 229 170 183 19 13 183 19 13 183 19 13 199 143 96
|
||||
97 69 52 77 0 3 183 19 13 171 21 16 97 69 52 173 92 60
|
||||
176 17 11 238 229 170 225 212 158 176 17 11 173 20 15 170 20 15
|
||||
170 20 15 171 21 16 168 18 14 165 19 14 164 19 14 168 18 14
|
||||
150 16 12 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
164 16 11 109 5 7 77 0 3
|
||||
151 18 14 152 20 15 159 21 16 162 20 14 162 20 14 160 22 16
|
||||
160 22 16 167 21 14 165 19 14 167 21 14 164 19 14 161 18 12
|
||||
165 19 14 164 19 14 164 16 11 176 24 12 249 249 214 191 130 98
|
||||
154 14 11 162 137 108 0 0 0 107 0 4 0 0 0 77 0 3
|
||||
0 0 0 206 199 148 175 97 50 213 153 88 254 255 233 249 249 214
|
||||
254 255 233 215 186 121 193 134 84 167 52 24 191 130 98 91 31 21
|
||||
77 0 3 0 0 0 77 0 3 0 0 0 158 125 90 183 19 13
|
||||
175 96 57 254 255 210 167 52 24 176 17 11 170 20 15 168 18 14
|
||||
168 18 14 171 21 16 168 18 14 164 19 14 167 21 14 156 15 13
|
||||
174 18 12 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
119 5 9 77 0 3 77 0 3
|
||||
151 18 14 156 20 14 159 21 16 160 19 13 162 20 14 162 20 14
|
||||
162 20 14 164 19 14 167 21 14 168 22 16 160 19 13 156 15 13
|
||||
164 19 14 161 18 12 156 15 13 133 0 5 176 111 73 243 238 185
|
||||
133 0 5 173 92 60 162 137 108 97 69 52 162 137 108 91 31 21
|
||||
77 0 3 0 0 0 202 183 123 254 255 223 250 251 219 249 249 214
|
||||
254 255 233 193 134 84 215 186 121 225 212 158 91 31 21 77 0 3
|
||||
78 2 7 158 125 90 97 69 52 131 94 71 173 92 60 154 14 11
|
||||
231 215 150 213 153 88 154 14 11 164 16 11 164 16 11 168 18 14
|
||||
168 18 14 168 18 14 164 16 11 167 21 14 162 20 14 156 15 13
|
||||
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 128 6 9
|
||||
78 2 7 77 0 3 78 2 7
|
||||
150 16 12 152 20 15 159 21 16 159 21 16 160 19 13 162 20 14
|
||||
160 22 16 160 22 16 165 19 14 168 22 16 164 16 11 156 15 13
|
||||
164 16 11 154 14 11 147 12 10 143 19 14 154 43 26 247 246 193
|
||||
150 53 31 107 0 4 173 92 60 199 163 109 147 67 48 202 183 123
|
||||
97 69 52 77 0 3 97 69 52 252 253 227 254 255 210 254 255 223
|
||||
238 229 170 183 19 13 232 217 158 131 94 71 77 0 3 78 2 7
|
||||
162 137 108 147 67 48 176 111 73 207 156 97 133 0 5 164 16 11
|
||||
238 229 170 173 92 60 147 12 10 154 14 11 167 52 24 174 18 12
|
||||
164 16 11 169 21 14 171 21 16 168 18 14 144 14 14 183 19 13
|
||||
183 19 13 183 19 13 183 19 13 183 19 13 147 12 10 93 4 6
|
||||
77 0 3 78 2 7 91 2 10
|
||||
150 16 12 152 20 15 157 23 16 159 21 16 159 21 16 162 20 14
|
||||
160 22 16 162 20 14 164 19 14 168 22 16 191 130 98 154 14 11
|
||||
163 56 28 199 163 109 133 0 5 151 28 16 173 92 60 254 255 210
|
||||
147 67 48 107 0 4 199 143 96 154 63 38 80 0 2 193 134 84
|
||||
237 235 180 78 2 7 77 0 3 162 137 108 253 255 226 253 254 208
|
||||
193 134 84 183 19 13 202 183 123 91 31 21 77 0 3 162 137 108
|
||||
193 134 84 92 0 2 102 0 4 211 179 117 167 52 24 164 16 11
|
||||
247 246 193 199 143 96 159 29 16 164 16 11 225 212 158 167 52 24
|
||||
164 16 11 199 143 96 167 52 24 147 12 10 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13 164 16 11 102 4 5 77 0 3
|
||||
78 2 7 91 2 10 99 1 11
|
||||
150 16 12 152 20 15 157 23 16 157 23 16 159 21 16 160 22 16
|
||||
159 21 16 160 21 14 161 18 12 168 22 16 249 249 214 173 92 60
|
||||
161 18 12 154 63 38 139 9 7 154 14 11 238 229 170 252 252 206
|
||||
139 27 18 131 14 12 247 246 193 150 53 31 116 3 5 211 173 103
|
||||
237 223 121 162 137 108 0 0 0 97 69 52 250 251 219 254 255 223
|
||||
193 134 84 183 19 13 158 125 90 77 0 3 97 69 52 224 209 127
|
||||
208 170 99 137 32 21 120 0 3 243 238 185 173 92 60 164 16 11
|
||||
238 229 170 247 246 193 171 21 16 176 17 11 167 52 24 176 17 11
|
||||
167 52 24 252 253 227 173 92 60 176 17 11 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 183 19 13 114 7 7 77 0 3 78 2 7
|
||||
87 1 5 99 1 11 133 0 5
|
||||
150 16 12 151 18 14 159 21 16 156 20 14 159 21 16 162 20 14
|
||||
160 21 14 160 22 16 164 16 11 176 111 73 254 255 240 176 111 73
|
||||
154 14 11 164 16 11 167 52 24 238 229 170 254 255 233 206 199 148
|
||||
123 0 2 133 0 5 238 229 170 199 163 109 139 9 7 237 223 121
|
||||
213 153 88 221 205 133 91 31 21 77 0 3 206 199 148 206 199 148
|
||||
162 137 108 202 183 123 97 69 52 0 0 0 187 167 103 213 153 88
|
||||
237 223 121 163 56 28 176 111 73 254 255 233 176 24 12 154 14 11
|
||||
199 163 109 254 255 240 238 229 170 167 52 24 176 17 11 176 24 12
|
||||
173 92 60 254 255 240 215 186 121 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 127 5 8 78 2 7 78 2 7 78 2 7
|
||||
99 1 11 128 6 9 122 7 7
|
||||
145 15 12 152 20 15 156 20 14 156 20 14 159 21 16 162 20 14
|
||||
160 19 13 160 22 16 164 16 11 215 186 121 254 255 240 163 56 28
|
||||
176 17 11 175 97 50 243 238 185 254 255 223 254 255 223 173 92 60
|
||||
139 9 7 154 43 26 163 56 28 247 246 193 167 52 24 219 195 113
|
||||
213 153 88 241 232 158 97 69 52 77 0 3 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 91 31 21 225 212 158 213 153 88
|
||||
237 223 121 167 52 24 237 235 180 199 143 96 176 24 12 177 20 14
|
||||
167 52 24 249 249 214 253 255 226 243 238 185 167 52 24 183 19 13
|
||||
167 52 24 252 253 227 243 238 185 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 147 12 10 87 1 5 78 2 7 78 2 7 99 1 11
|
||||
128 6 9 131 9 10 129 12 11
|
||||
145 15 12 151 18 14 156 20 14 159 21 16 159 21 16 162 20 14
|
||||
160 19 13 162 20 14 164 16 11 215 186 121 211 179 117 176 17 11
|
||||
183 19 13 215 186 121 253 255 226 254 255 210 238 229 170 164 16 11
|
||||
199 163 109 173 92 60 139 9 7 199 143 96 173 92 60 192 140 79
|
||||
237 223 121 97 69 52 0 0 0 91 31 21 173 92 60 211 179 117
|
||||
211 179 117 191 130 98 106 7 8 0 0 0 91 31 21 225 212 158
|
||||
237 223 121 175 96 57 225 212 158 176 17 11 163 56 28 206 199 148
|
||||
176 17 11 206 199 148 254 255 223 254 255 223 215 186 121 183 19 13
|
||||
176 24 12 213 153 88 232 217 158 183 19 13 183 19 13 183 19 13
|
||||
176 17 11 95 4 6 78 2 7 78 2 7 99 1 11 122 8 8
|
||||
131 9 10 125 8 10 131 9 10
|
||||
145 15 12 151 18 14 156 20 14 156 20 14 160 21 14 160 19 13
|
||||
164 19 14 156 15 13 147 12 10 164 16 11 164 16 11 183 19 13
|
||||
183 19 13 243 238 185 254 255 210 254 255 223 199 163 109 176 17 11
|
||||
249 249 214 167 52 24 139 9 7 199 143 96 193 134 84 213 153 88
|
||||
97 69 52 91 31 21 191 130 98 183 19 13 183 19 13 211 179 117
|
||||
249 249 214 173 92 60 183 19 13 173 92 60 97 69 52 0 0 0
|
||||
199 163 109 213 153 88 206 199 148 154 14 11 183 19 13 249 249 214
|
||||
167 52 24 193 134 84 254 255 223 252 252 206 252 252 206 175 97 50
|
||||
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
122 8 8 78 2 7 78 2 7 95 4 6 119 5 9 137 11 10
|
||||
125 8 10 137 11 10 142 10 9
|
||||
145 15 12 151 18 14 152 20 15 156 20 14 160 21 14 168 22 16
|
||||
164 16 11 176 24 12 175 96 57 176 111 73 193 134 84 175 96 57
|
||||
175 96 57 249 249 214 252 252 206 254 255 223 199 143 96 183 19 13
|
||||
254 255 233 199 143 96 163 56 28 247 246 193 215 186 121 97 69 52
|
||||
91 31 21 213 153 88 183 19 13 173 92 60 207 156 97 225 212 158
|
||||
254 255 240 199 143 96 211 179 117 183 19 13 175 96 57 129 78 48
|
||||
91 31 21 221 205 133 249 249 214 175 96 57 191 130 98 254 255 240
|
||||
173 92 60 193 134 84 254 255 223 247 246 193 253 254 208 213 153 88
|
||||
175 97 50 213 153 88 213 153 88 213 153 88 175 97 50 161 18 12
|
||||
106 7 8 89 3 6 93 4 6 114 7 7 139 9 7 125 8 10
|
||||
138 12 11 142 10 9 164 16 11
|
||||
144 16 12 152 20 15 156 20 14 160 22 16 168 22 16 176 24 12
|
||||
175 96 57 162 137 108 97 69 52 97 69 52 97 69 52 131 94 71
|
||||
191 177 112 250 251 219 254 255 223 254 255 223 211 179 117 183 19 13
|
||||
243 238 185 253 254 208 254 255 223 235 226 137 182 147 96 0 0 0
|
||||
175 97 50 147 12 10 102 0 4 183 19 13 183 19 13 215 186 121
|
||||
249 249 214 173 92 60 183 19 13 139 9 7 99 0 3 173 92 60
|
||||
105 45 32 131 94 71 249 243 164 250 251 219 254 255 210 244 241 169
|
||||
183 19 13 211 173 103 254 255 210 252 252 206 254 255 210 206 199 148
|
||||
131 94 71 97 69 52 97 69 52 97 69 52 162 137 108 191 130 98
|
||||
114 7 7 111 14 13 111 14 13 137 11 10 128 8 8 137 13 11
|
||||
145 11 11 164 16 11 156 15 13
|
||||
143 19 14 152 20 15 157 23 16 168 22 16 176 24 12 167 52 24
|
||||
158 125 90 0 0 0 97 69 52 162 137 108 158 125 90 97 69 52
|
||||
0 0 0 91 31 21 191 177 112 254 255 223 252 252 206 183 19 13
|
||||
213 153 88 237 223 121 237 223 121 216 189 107 97 69 52 132 32 17
|
||||
78 2 7 91 31 21 162 137 108 91 31 21 183 19 13 173 92 60
|
||||
191 130 98 183 19 13 78 2 7 131 94 71 131 94 71 0 0 0
|
||||
141 65 38 91 31 21 219 195 113 237 223 121 237 223 121 213 153 88
|
||||
183 19 13 243 238 185 254 255 210 206 199 148 91 31 21 0 0 0
|
||||
97 69 52 131 94 71 162 137 108 131 94 71 0 0 0 97 69 52
|
||||
173 92 60 135 17 11 143 19 14 139 9 7 131 14 12 142 13 12
|
||||
164 16 11 164 16 11 156 15 13
|
||||
143 19 14 152 20 15 159 29 16 168 22 16 176 24 12 175 96 57
|
||||
131 94 71 206 199 148 249 249 214 254 255 240 254 255 240 254 255 233
|
||||
249 249 214 162 137 108 0 0 0 91 31 21 225 212 158 243 238 185
|
||||
213 153 88 213 153 88 213 153 88 208 170 99 91 31 21 106 7 8
|
||||
0 0 0 225 212 158 254 255 240 206 199 148 77 0 3 191 130 98
|
||||
215 186 121 133 0 5 131 94 71 254 255 240 254 255 240 97 69 52
|
||||
77 0 3 78 2 7 162 137 108 213 153 88 216 189 107 213 153 88
|
||||
232 217 158 237 235 180 97 69 52 0 0 0 158 125 90 243 238 185
|
||||
254 255 240 254 255 240 254 255 233 249 249 214 206 199 148 97 69 52
|
||||
176 111 73 152 17 12 150 16 12 125 8 10 144 14 14 156 15 13
|
||||
168 18 14 161 18 12 183 19 13
|
||||
143 19 14 157 23 16 159 29 16 168 22 16 174 18 12 175 96 57
|
||||
131 94 71 206 199 148 225 212 158 206 199 148 249 249 214 250 251 219
|
||||
254 255 223 254 255 233 249 249 214 131 94 71 0 0 0 162 137 108
|
||||
247 246 193 213 153 88 175 97 50 182 147 96 78 2 7 77 0 3
|
||||
0 0 0 237 235 180 254 255 240 237 235 180 0 0 0 183 19 13
|
||||
183 19 13 77 0 3 162 137 108 254 255 240 254 255 240 97 69 52
|
||||
0 0 0 77 0 3 131 94 71 213 153 88 213 153 88 237 223 121
|
||||
206 199 148 0 0 0 97 69 52 249 249 214 254 255 240 254 255 223
|
||||
250 251 219 249 249 214 206 199 148 206 199 148 206 199 148 97 69 52
|
||||
176 111 73 164 16 11 138 12 11 146 12 11 147 12 10 173 20 15
|
||||
156 15 13 183 19 13 150 16 12
|
||||
143 19 14 152 20 15 157 23 16 159 29 16 164 16 11 173 92 60
|
||||
131 94 71 162 137 108 237 235 180 206 199 148 206 199 148 254 255 223
|
||||
250 251 219 249 249 214 250 251 219 254 255 240 206 199 148 0 0 0
|
||||
131 94 71 213 153 88 213 153 88 162 137 108 77 0 3 0 0 0
|
||||
0 0 0 131 94 71 249 249 214 131 94 71 0 0 0 168 18 14
|
||||
183 19 13 0 0 0 0 0 0 237 235 180 206 199 148 91 31 21
|
||||
0 0 0 77 0 3 97 69 52 215 186 121 213 153 88 162 137 108
|
||||
0 0 0 162 137 108 254 255 240 254 255 223 249 249 214 249 249 214
|
||||
254 255 223 225 212 158 206 199 148 237 235 180 206 199 148 97 69 52
|
||||
175 96 57 133 0 5 156 15 13 147 12 10 168 18 14 160 19 13
|
||||
183 19 13 160 19 13 105 1 7
|
||||
144 16 12 152 20 15 152 20 15 157 23 16 154 14 11 176 108 61
|
||||
158 125 90 131 94 71 249 249 214 237 235 180 206 199 148 206 199 148
|
||||
253 255 226 254 255 223 250 251 219 249 249 214 254 255 233 249 249 214
|
||||
91 31 21 97 69 52 215 186 121 143 100 73 78 2 7 0 0 0
|
||||
162 137 108 0 0 0 0 0 0 131 94 71 97 69 52 123 0 2
|
||||
183 19 13 0 0 0 162 137 108 0 0 0 0 0 0 131 94 71
|
||||
97 69 52 0 0 0 97 69 52 231 215 150 131 94 71 0 0 0
|
||||
237 235 180 254 255 240 249 249 214 250 251 219 250 251 219 254 255 223
|
||||
237 235 180 206 199 148 237 235 180 249 249 214 162 137 108 97 69 52
|
||||
193 134 84 142 10 9 164 16 11 168 18 14 164 19 14 174 18 12
|
||||
176 24 12 109 5 7 119 5 9
|
||||
144 16 12 147 20 17 147 20 17 150 16 12 154 43 26 211 179 117
|
||||
179 118 76 97 69 52 206 199 148 206 199 148 237 235 180 206 199 148
|
||||
206 199 148 254 255 223 254 255 223 250 251 219 250 251 219 254 255 223
|
||||
206 199 148 91 31 21 97 69 52 206 199 148 0 0 0 91 31 21
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 156 15 13
|
||||
183 19 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 131 94 71 162 137 108 0 0 0 206 199 148
|
||||
250 251 219 254 255 223 254 255 223 254 255 223 254 255 223 237 235 180
|
||||
206 199 148 237 235 180 206 199 148 206 199 148 97 69 52 131 94 71
|
||||
199 163 109 173 92 60 164 16 11 173 20 15 164 16 11 183 19 13
|
||||
116 9 9 105 1 7 119 5 9
|
||||
141 15 12 143 19 14 147 20 17 139 9 7 173 92 60 219 202 125
|
||||
173 92 60 97 69 52 97 69 52 206 199 148 206 199 148 249 249 214
|
||||
237 235 180 206 199 148 237 235 180 253 255 226 249 249 214 206 199 148
|
||||
237 235 180 253 255 226 97 69 52 97 69 52 78 2 7 91 31 21
|
||||
97 69 52 0 0 0 0 0 0 0 0 0 0 0 0 183 19 13
|
||||
183 19 13 91 31 21 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
97 69 52 77 0 3 91 31 21 91 31 21 243 238 185 249 249 214
|
||||
206 199 148 237 235 180 253 255 226 249 249 214 206 199 148 206 199 148
|
||||
249 249 214 206 199 148 206 199 148 162 137 108 97 69 52 173 92 60
|
||||
211 173 103 199 143 96 176 17 11 165 19 14 183 19 13 135 17 11
|
||||
99 1 11 119 5 9 117 6 7
|
||||
141 15 12 141 15 12 143 19 14 139 9 7 163 56 28 231 215 150
|
||||
124 14 13 153 103 68 0 0 0 162 137 108 206 199 148 206 199 148
|
||||
249 249 214 250 251 219 206 199 148 206 199 148 162 137 108 249 249 214
|
||||
253 255 226 250 251 219 252 253 227 97 69 52 0 0 0 78 2 7
|
||||
97 69 52 97 69 52 97 69 52 97 69 52 78 2 7 183 19 13
|
||||
183 19 13 145 11 11 97 69 52 97 69 52 97 69 52 97 69 52
|
||||
91 31 21 77 0 3 0 0 0 237 235 180 253 255 226 254 255 223
|
||||
249 249 214 206 199 148 162 137 108 206 199 148 252 253 227 250 251 219
|
||||
206 199 148 206 199 148 206 199 148 91 31 21 131 94 71 176 17 11
|
||||
215 186 121 175 96 57 164 16 11 183 19 13 159 29 16 93 4 6
|
||||
114 7 7 119 5 9 125 8 10
|
||||
137 13 11 138 15 12 141 15 12 143 13 11 147 12 10 154 63 38
|
||||
111 0 3 175 96 57 133 82 52 91 31 21 206 199 148 206 199 148
|
||||
206 199 148 237 235 180 206 199 148 206 199 148 206 199 148 206 199 148
|
||||
206 199 148 237 235 180 250 251 219 249 249 214 0 0 0 78 2 7
|
||||
78 2 7 97 69 52 97 69 52 0 0 0 183 19 13 183 19 13
|
||||
183 19 13 183 19 13 78 2 7 97 69 52 97 69 52 0 0 0
|
||||
91 2 10 0 0 0 206 199 148 254 255 233 237 235 180 206 199 148
|
||||
206 199 148 206 199 148 237 235 180 206 199 148 206 199 148 206 199 148
|
||||
206 199 148 206 199 148 97 69 52 97 69 52 192 140 79 164 16 11
|
||||
167 52 24 176 24 12 183 19 13 176 24 12 95 4 6 106 7 8
|
||||
117 6 7 125 8 10 134 12 11
|
||||
134 12 11 138 15 12 144 16 12 146 12 11 131 10 9 122 7 7
|
||||
128 8 8 192 140 79 216 189 107 91 31 21 97 69 52 206 199 148
|
||||
162 137 108 162 137 108 237 235 180 253 255 226 250 251 219 249 249 214
|
||||
225 212 158 206 199 148 206 199 148 237 235 180 162 137 108 0 0 0
|
||||
99 1 11 111 0 3 123 0 2 183 19 13 183 19 13 145 11 11
|
||||
91 2 10 183 19 13 183 19 13 111 0 3 92 0 2 111 14 13
|
||||
0 0 0 131 94 71 249 249 214 206 199 148 206 199 148 206 199 148
|
||||
249 249 214 250 251 219 254 255 223 249 249 214 162 137 108 162 137 108
|
||||
206 199 148 131 94 71 91 31 21 211 173 103 217 193 123 167 52 24
|
||||
147 12 10 174 18 12 183 19 13 111 14 13 102 4 5 114 7 7
|
||||
119 5 9 131 9 10 142 13 12
|
||||
131 14 12 138 15 12 152 14 13 139 9 7 131 14 12 131 10 9
|
||||
152 48 27 231 215 150 187 167 103 208 170 99 91 31 21 0 0 0
|
||||
162 137 108 206 199 148 206 199 148 206 199 148 237 235 180 237 235 180
|
||||
249 249 214 250 251 219 237 235 180 206 199 148 206 199 148 97 69 52
|
||||
0 0 0 111 14 13 183 19 13 183 19 13 183 19 13 78 2 7
|
||||
0 0 0 183 19 13 183 19 13 183 19 13 144 14 14 78 2 7
|
||||
0 0 0 162 137 108 206 199 148 237 235 180 252 253 227 254 255 233
|
||||
249 249 214 237 235 180 225 212 158 206 199 148 206 199 148 162 137 108
|
||||
0 0 0 91 31 21 211 179 117 208 170 99 243 238 185 173 92 60
|
||||
154 14 11 183 19 13 150 16 12 95 4 6 114 7 7 122 8 8
|
||||
131 10 10 138 12 11 142 13 12
|
||||
135 17 11 144 16 12 145 11 11 167 52 24 159 30 14 150 16 12
|
||||
175 97 50 243 238 185 217 193 123 192 140 79 203 150 89 97 69 52
|
||||
0 0 0 131 94 71 162 137 108 162 137 108 162 137 108 162 137 108
|
||||
162 137 108 97 69 52 97 69 52 97 69 52 97 69 52 91 31 21
|
||||
0 0 0 78 2 7 99 1 11 176 17 11 183 19 13 183 19 13
|
||||
176 17 11 183 19 13 183 19 13 125 8 10 78 2 7 0 0 0
|
||||
78 2 7 0 0 0 97 69 52 97 69 52 97 69 52 131 94 71
|
||||
162 137 108 162 137 108 162 137 108 162 137 108 131 94 71 0 0 0
|
||||
97 69 52 199 143 96 192 140 79 217 193 123 254 255 210 173 92 60
|
||||
183 19 13 176 24 12 114 7 7 117 6 7 119 5 9 131 9 10
|
||||
138 12 11 138 12 11 164 16 11
|
||||
138 15 12 147 12 10 137 11 10 213 153 88 167 52 24 176 24 12
|
||||
167 52 24 243 238 185 238 229 170 203 150 89 176 17 11 176 108 61
|
||||
162 115 76 91 31 21 0 0 0 97 69 52 162 137 108 97 69 52
|
||||
97 69 52 97 69 52 131 94 71 163 121 81 91 31 21 0 0 0
|
||||
183 19 13 77 0 3 0 0 0 78 2 7 119 5 9 168 18 14
|
||||
183 19 13 131 9 10 99 1 11 78 2 7 0 0 0 176 17 11
|
||||
111 14 13 0 0 0 147 67 48 151 106 70 131 94 71 97 69 52
|
||||
0 0 0 162 137 108 97 69 52 0 0 0 0 0 0 143 100 73
|
||||
213 153 88 176 24 12 179 118 76 238 229 170 252 252 206 175 97 50
|
||||
183 19 13 175 97 50 154 43 26 116 3 5 131 10 9 138 12 11
|
||||
138 12 11 156 15 13 176 17 11
|
||||
145 11 11 137 13 11 131 9 10 175 97 50 167 52 24 161 18 12
|
||||
176 24 12 231 215 150 249 249 214 219 195 113 183 19 13 167 52 24
|
||||
175 97 50 179 118 76 163 121 81 97 69 52 0 0 0 0 0 0
|
||||
191 130 98 193 134 84 167 52 24 171 21 16 77 0 3 138 37 20
|
||||
183 19 13 154 14 11 0 0 0 0 0 0 0 0 0 78 2 7
|
||||
78 2 7 0 0 0 0 0 0 0 0 0 120 0 3 183 19 13
|
||||
176 24 12 0 0 0 105 1 7 183 19 13 173 92 60 213 153 88
|
||||
78 2 7 0 0 0 97 69 52 158 125 90 191 130 98 175 97 50
|
||||
163 56 28 183 19 13 213 153 88 250 251 219 241 232 158 167 52 24
|
||||
154 14 11 213 153 88 167 52 24 127 5 8 141 14 11 139 13 11
|
||||
146 12 11 183 19 13 154 14 11
|
||||
137 13 11 131 14 12 131 12 12 159 30 14 174 18 12 167 21 14
|
||||
154 14 11 192 140 79 249 243 164 235 226 137 213 153 88 183 19 13
|
||||
167 21 14 92 0 2 179 118 76 162 137 108 91 31 21 104 58 46
|
||||
77 0 3 77 0 3 0 0 0 0 0 0 0 0 0 119 34 17
|
||||
175 97 50 183 19 13 176 17 11 109 5 7 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 89 3 6 164 16 11 164 16 11 167 52 24
|
||||
138 37 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
91 31 21 111 35 21 131 94 71 199 143 96 107 0 4 135 17 11
|
||||
183 19 13 183 19 13 216 189 107 249 243 164 213 153 88 147 12 10
|
||||
142 10 9 167 52 24 167 21 14 142 10 9 146 12 11 142 13 12
|
||||
176 17 11 164 16 11 164 16 11
|
||||
124 14 13 128 14 13 143 19 14 154 14 11 163 56 28 176 108 61
|
||||
147 12 10 151 28 16 216 189 107 237 223 121 213 153 88 183 19 13
|
||||
183 19 13 183 19 13 162 137 108 0 0 0 183 19 13 111 14 13
|
||||
91 31 21 158 125 90 131 94 71 97 69 52 0 0 0 78 2 7
|
||||
213 153 88 175 97 50 183 19 13 183 19 13 176 17 11 154 14 11
|
||||
154 14 11 176 17 11 183 19 13 176 17 11 175 97 50 213 153 88
|
||||
119 59 34 0 0 0 0 0 0 97 69 52 162 137 108 97 69 52
|
||||
78 2 7 183 19 13 77 0 3 158 125 90 173 92 60 176 17 11
|
||||
183 19 13 213 153 88 216 189 107 216 189 107 138 37 20 123 0 2
|
||||
176 108 61 167 52 24 142 10 9 150 16 12 144 14 14 164 16 11
|
||||
164 16 11 156 15 13 164 16 11
|
||||
124 14 13 128 14 13 157 23 16 154 14 11 199 143 96 232 217 158
|
||||
176 24 12 139 9 7 163 56 28 213 153 88 216 189 107 213 153 88
|
||||
183 19 13 199 143 96 0 0 0 183 19 13 176 17 11 0 0 0
|
||||
202 183 123 97 69 52 91 31 21 162 115 76 105 45 32 158 83 45
|
||||
213 153 88 192 140 79 175 97 50 175 97 50 183 19 13 183 19 13
|
||||
176 17 11 183 19 13 183 19 13 175 97 50 176 108 61 174 128 69
|
||||
175 97 50 77 0 3 163 56 28 97 69 52 0 0 0 202 183 123
|
||||
97 69 52 111 0 3 183 19 13 0 0 0 191 130 98 183 19 13
|
||||
183 19 13 213 153 88 213 153 88 163 56 28 102 0 4 154 63 38
|
||||
252 252 206 167 52 24 147 12 10 150 16 12 164 16 11 174 18 12
|
||||
152 14 13 161 18 12 156 15 13
|
||||
122 13 12 151 28 16 151 28 16 176 24 12 167 52 24 199 163 109
|
||||
167 52 24 159 30 14 123 0 2 135 17 11 175 97 50 213 153 88
|
||||
183 19 13 193 134 84 0 0 0 176 17 11 0 0 0 162 137 108
|
||||
97 69 52 131 94 71 213 153 88 171 21 16 0 0 0 91 31 21
|
||||
91 31 21 213 153 88 216 189 107 213 153 88 175 97 50 167 52 24
|
||||
167 52 24 175 97 50 213 153 88 213 153 88 237 223 121 129 78 48
|
||||
0 0 0 0 0 0 87 1 5 175 96 57 191 130 98 91 31 21
|
||||
162 137 108 0 0 0 154 14 11 87 1 5 131 94 71 183 19 13
|
||||
175 97 50 175 97 50 139 27 18 111 0 3 131 14 12 173 92 60
|
||||
199 143 96 161 18 12 147 12 10 154 14 11 176 17 11 154 14 11
|
||||
156 15 13 161 18 12 156 15 13
|
||||
139 27 18 138 37 20 154 43 26 169 21 14 159 30 14 159 30 14
|
||||
193 134 84 167 52 24 150 53 31 158 83 45 107 0 4 183 19 13
|
||||
183 19 13 179 118 76 0 0 0 0 0 0 97 69 52 191 177 112
|
||||
0 0 0 183 19 13 87 1 5 0 0 0 0 0 0 0 0 0
|
||||
91 31 21 216 189 107 146 87 48 237 223 121 213 153 88 213 153 88
|
||||
213 153 88 213 153 88 237 223 121 174 128 69 174 128 69 174 128 69
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 183 19 13 78 2 7
|
||||
131 94 71 162 137 108 0 0 0 0 0 0 143 100 73 175 97 50
|
||||
183 19 13 123 0 2 150 53 31 150 53 31 150 53 31 191 130 98
|
||||
133 0 5 147 12 10 147 12 10 176 17 11 164 16 11 156 15 13
|
||||
164 16 11 161 18 12 156 15 13
|
||||
138 37 20 152 48 27 159 29 16 151 28 16 147 24 15 163 56 28
|
||||
215 186 121 175 96 57 164 16 11 199 143 96 173 92 60 164 16 11
|
||||
183 19 13 131 94 71 77 0 3 97 69 52 208 170 99 97 69 52
|
||||
106 0 7 0 0 0 97 69 52 162 137 108 0 0 0 0 0 0
|
||||
105 45 32 124 72 43 146 87 48 237 223 121 237 223 121 237 223 121
|
||||
216 189 107 237 223 121 237 223 121 216 189 107 97 69 52 146 87 48
|
||||
0 0 0 0 0 0 131 94 71 162 137 108 0 0 0 123 0 2
|
||||
78 2 7 206 199 148 131 94 71 77 0 3 97 69 52 175 96 57
|
||||
183 19 13 150 55 28 207 156 97 133 0 5 154 63 38 225 212 158
|
||||
133 0 5 141 15 12 176 17 11 176 17 11 156 15 13 164 16 11
|
||||
176 17 11 161 18 12 156 15 13
|
||||
123 39 27 154 43 26 151 28 16 135 17 11 150 55 28 159 30 14
|
||||
225 212 158 225 212 158 176 24 12 142 10 9 213 153 88 183 19 13
|
||||
183 19 13 97 69 52 78 2 7 151 106 70 162 115 76 91 31 21
|
||||
183 19 13 91 31 21 206 199 148 158 125 90 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 91 31 21 129 78 48 213 153 88 216 189 107
|
||||
216 189 107 216 189 107 174 128 69 120 74 50 91 31 21 91 31 21
|
||||
0 0 0 0 0 0 0 0 0 243 238 185 97 69 52 176 17 11
|
||||
133 0 5 97 69 52 179 118 76 91 31 21 91 31 21 176 111 73
|
||||
183 19 13 213 153 88 167 52 24 159 29 16 225 212 158 225 212 158
|
||||
133 0 5 147 12 10 176 17 11 156 15 13 164 16 11 174 18 12
|
||||
183 19 13 164 16 11 144 14 14
|
||||
150 53 31 139 27 18 128 26 15 119 34 17 141 65 38 133 0 5
|
||||
199 163 109 254 255 240 247 246 193 191 130 98 167 52 24 213 153 88
|
||||
183 19 13 97 69 52 91 31 21 158 83 45 131 94 71 99 1 11
|
||||
111 0 3 97 69 52 158 125 90 97 69 52 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
91 31 21 0 0 0 0 0 0 0 0 0 131 94 71 91 31 21
|
||||
0 0 0 0 0 0 0 0 0 162 137 108 131 94 71 77 0 3
|
||||
120 0 3 97 69 52 163 56 28 91 31 21 91 31 21 173 92 60
|
||||
175 97 50 175 97 50 211 179 117 249 249 214 254 255 240 199 163 109
|
||||
139 9 7 164 16 11 164 16 11 164 16 11 174 18 12 183 19 13
|
||||
183 19 13 154 14 11 145 15 12
|
||||
139 27 18 137 32 21 125 28 16 158 83 45 127 13 12 119 9 8
|
||||
154 43 26 238 229 170 254 255 240 254 255 233 193 134 84 213 153 88
|
||||
213 153 88 131 94 71 97 69 52 193 134 84 182 147 96 0 0 0
|
||||
0 0 0 158 125 90 158 125 90 97 69 52 175 97 50 78 2 7
|
||||
0 0 0 0 0 0 97 69 52 97 69 52 91 31 21 91 31 21
|
||||
97 69 52 97 69 52 97 69 52 146 87 48 237 235 180 187 145 96
|
||||
78 2 7 158 83 45 116 46 29 131 94 71 131 94 71 97 69 52
|
||||
0 0 0 97 69 52 154 43 26 111 35 21 0 0 0 175 96 57
|
||||
213 153 88 213 153 88 254 255 233 254 255 233 238 229 170 151 28 16
|
||||
139 9 7 154 14 11 156 15 13 174 18 12 176 17 11 183 19 13
|
||||
176 17 11 142 13 12 152 14 13
|
||||
138 37 20 119 9 8 158 83 45 138 37 20 122 8 8 125 28 16
|
||||
151 28 16 159 30 14 225 212 158 254 255 233 244 241 169 182 147 96
|
||||
143 100 73 97 69 52 91 31 21 131 94 71 97 69 52 77 0 3
|
||||
78 2 7 158 125 90 131 94 71 0 0 0 119 59 34 97 69 52
|
||||
0 0 0 97 69 52 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 78 2 7 199 143 96 254 255 240 225 212 158
|
||||
174 110 60 216 189 107 150 55 28 97 69 52 143 100 73 131 94 71
|
||||
77 0 3 97 69 52 213 153 88 124 72 43 97 69 52 175 97 50
|
||||
213 153 88 235 226 137 254 255 240 225 212 158 147 12 10 167 52 24
|
||||
147 20 17 147 12 10 164 16 11 168 18 14 183 19 13 176 17 11
|
||||
134 12 11 146 12 11 152 14 13
|
||||
122 13 12 150 55 28 154 63 38 139 9 7 128 8 8 158 83 45
|
||||
176 111 73 139 9 7 175 97 50 249 249 214 252 252 206 97 69 52
|
||||
0 0 0 119 59 34 119 59 34 119 59 34 119 59 34 91 31 21
|
||||
0 0 0 0 0 0 91 31 21 97 69 52 91 31 21 91 31 21
|
||||
0 0 0 0 0 0 97 69 52 249 249 214 249 249 214 237 235 180
|
||||
237 235 180 249 249 214 162 137 108 158 125 90 254 255 240 143 100 73
|
||||
119 59 34 175 97 50 114 7 7 97 69 52 187 167 103 97 69 52
|
||||
80 0 2 91 31 21 131 94 71 91 31 21 169 133 98 183 19 13
|
||||
213 153 88 249 243 164 253 255 226 154 63 38 154 14 11 176 111 73
|
||||
173 92 60 164 16 11 168 18 14 164 16 11 156 15 13 137 13 11
|
||||
144 14 14 145 15 12 150 16 12
|
||||
125 28 16 141 65 38 134 12 11 156 15 13 154 14 11 199 143 96
|
||||
199 143 96 176 24 12 167 52 24 238 229 170 247 246 193 97 69 52
|
||||
174 128 69 237 223 121 237 223 121 237 223 121 237 223 121 216 189 107
|
||||
78 2 7 129 78 48 237 223 121 237 223 121 237 223 121 237 223 121
|
||||
237 223 121 91 31 21 91 31 21 254 255 240 254 255 240 254 255 240
|
||||
254 255 240 254 255 240 206 199 148 0 0 0 131 94 71 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 91 31 21 0 0 0 97 69 52 213 153 88
|
||||
213 153 88 249 243 164 243 238 185 159 29 16 164 16 11 191 130 98
|
||||
199 163 109 164 16 11 167 21 14 161 18 12 150 16 12 150 16 12
|
||||
145 15 12 145 15 12 150 16 12
|
||||
158 83 45 122 13 12 139 9 7 164 16 11 161 18 12 202 183 123
|
||||
237 235 180 167 52 24 175 97 50 247 246 193 249 243 164 97 69 52
|
||||
175 97 50 216 189 107 174 128 69 174 110 60 213 153 88 216 189 107
|
||||
146 87 48 119 59 34 216 189 107 213 153 88 192 140 79 213 153 88
|
||||
237 223 121 192 140 79 97 69 52 254 255 240 237 235 180 97 69 52
|
||||
97 69 52 131 94 71 97 69 52 158 125 90 206 199 148 97 69 52
|
||||
162 137 108 254 255 233 97 69 52 162 137 108 254 255 233 0 0 0
|
||||
97 69 52 249 249 214 254 255 240 254 255 233 97 69 52 97 69 52
|
||||
237 223 121 249 243 164 252 252 206 163 56 28 147 12 10 225 212 158
|
||||
206 199 148 176 17 11 168 22 16 157 19 14 152 17 12 150 16 12
|
||||
145 15 12 144 14 14 144 14 14
|
||||
122 13 12 128 8 8 147 12 10 160 21 14 132 32 17 199 163 109
|
||||
254 255 240 231 215 150 232 217 158 250 251 219 249 243 164 97 69 52
|
||||
175 97 50 216 189 107 91 31 21 0 0 0 119 59 34 216 189 107
|
||||
146 87 48 119 59 34 216 189 107 175 97 50 0 0 0 0 0 0
|
||||
213 153 88 213 153 88 97 69 52 254 255 240 225 212 158 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 206 199 148 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 206 199 148 254 255 240 252 253 227 97 69 52
|
||||
249 249 214 254 255 240 243 238 185 254 255 240 254 255 240 97 69 52
|
||||
187 167 103 249 243 164 254 255 223 238 229 170 206 199 148 254 255 240
|
||||
211 179 117 176 17 11 168 22 16 156 15 13 152 17 12 150 16 12
|
||||
144 14 14 144 14 14 144 14 14
|
||||
114 7 7 137 11 10 156 15 13 125 28 16 138 37 20 193 134 84
|
||||
254 255 233 252 253 227 252 253 227 238 229 170 249 243 164 97 69 52
|
||||
158 83 45 213 153 88 146 87 48 105 45 32 174 128 69 213 153 88
|
||||
91 31 21 119 59 34 213 153 88 146 87 48 0 0 0 0 0 0
|
||||
213 153 88 213 153 88 97 69 52 254 255 240 249 249 214 206 199 148
|
||||
206 199 148 225 212 158 0 0 0 162 137 108 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 254 255 240 162 137 108 97 69 52 162 137 108
|
||||
254 255 240 162 137 108 0 0 0 97 69 52 254 255 240 162 137 108
|
||||
97 69 52 252 252 206 238 229 170 254 255 223 254 255 233 254 255 233
|
||||
199 143 96 176 24 12 167 21 14 156 15 13 151 18 14 144 14 14
|
||||
144 14 14 144 14 14 144 14 14
|
||||
122 8 8 156 15 13 122 13 12 111 14 13 138 37 20 175 97 50
|
||||
249 249 214 254 255 223 247 246 193 219 195 113 249 243 164 97 69 52
|
||||
158 83 45 213 153 88 213 153 88 213 153 88 213 153 88 175 97 50
|
||||
0 0 0 119 59 34 213 153 88 175 97 50 119 59 34 175 97 50
|
||||
213 153 88 175 97 50 97 69 52 254 255 233 254 255 233 254 255 240
|
||||
254 255 240 254 255 240 91 31 21 162 137 108 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 206 199 148 0 0 0 0 0 0 162 137 108
|
||||
254 255 240 191 177 112 131 94 71 162 137 108 254 255 233 206 199 148
|
||||
97 69 52 252 252 206 237 223 121 247 246 193 254 255 223 249 249 214
|
||||
167 52 24 176 24 12 162 20 14 152 14 13 145 15 12 145 15 12
|
||||
144 14 14 141 15 12 144 14 14
|
||||
152 14 13 137 11 10 89 3 6 106 7 8 138 37 20 152 17 12
|
||||
213 153 88 253 255 226 249 249 214 216 189 107 249 243 164 97 69 52
|
||||
163 56 28 213 153 88 175 97 50 141 65 38 175 97 50 213 153 88
|
||||
175 97 50 119 59 34 213 153 88 213 153 88 213 153 88 213 153 88
|
||||
213 153 88 91 31 21 91 31 21 254 255 240 249 249 214 162 137 108
|
||||
162 137 108 162 137 108 0 0 0 202 183 123 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 131 94 71 146 87 48 133 82 52 162 137 108
|
||||
254 255 240 254 255 240 254 255 240 254 255 240 254 255 240 206 199 148
|
||||
97 69 52 249 243 164 216 189 107 250 251 219 254 255 233 207 156 97
|
||||
154 14 11 159 29 16 152 17 12 150 16 12 145 15 12 141 15 12
|
||||
141 15 12 141 15 12 142 13 12
|
||||
147 12 10 95 4 6 95 4 6 119 34 17 135 17 11 141 15 12
|
||||
119 34 17 216 189 107 252 252 206 216 189 107 237 223 121 97 69 52
|
||||
159 30 14 175 97 50 78 2 7 0 0 0 0 0 0 175 97 50
|
||||
167 52 24 150 55 28 175 97 50 167 52 24 138 37 20 132 32 17
|
||||
77 0 3 0 0 0 97 69 52 254 255 240 206 199 148 0 0 0
|
||||
91 31 21 0 0 0 0 0 0 162 137 108 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 97 69 52 151 106 70 120 74 50 162 137 108
|
||||
254 255 240 162 137 108 0 0 0 0 0 0 91 31 21 0 0 0
|
||||
131 94 71 237 223 121 216 189 107 252 252 206 216 189 107 151 28 16
|
||||
144 16 12 151 18 14 150 16 12 145 15 12 144 16 12 141 15 12
|
||||
138 15 12 138 15 12 141 15 12
|
||||
106 7 8 93 4 6 111 35 21 132 32 17 154 14 11 119 34 17
|
||||
111 14 13 167 52 24 213 153 88 216 189 107 213 153 88 97 69 52
|
||||
154 14 11 183 19 13 114 7 7 78 2 7 128 14 13 183 19 13
|
||||
183 19 13 131 14 12 183 19 13 133 0 5 0 0 0 97 69 52
|
||||
131 94 71 158 125 90 97 69 52 249 249 214 191 177 112 97 69 52
|
||||
97 69 52 0 0 0 0 0 0 162 137 108 254 255 240 97 69 52
|
||||
162 137 108 252 253 227 97 69 52 120 74 50 131 94 71 97 69 52
|
||||
250 251 219 237 235 180 97 69 52 97 69 52 162 137 108 91 31 21
|
||||
133 82 52 213 153 88 216 189 107 213 153 88 138 37 20 116 3 5
|
||||
137 13 11 143 13 11 145 15 12 144 16 12 144 16 12 144 14 14
|
||||
138 15 12 138 15 12 138 15 12
|
||||
89 3 6 106 7 8 138 37 20 164 16 11 138 37 20 128 26 15
|
||||
159 30 14 139 9 7 167 52 24 175 97 50 213 153 88 97 69 52
|
||||
164 16 11 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
152 17 12 106 7 8 183 19 13 139 9 7 131 94 71 175 96 57
|
||||
176 24 12 163 56 28 97 69 52 254 255 233 206 199 148 97 69 52
|
||||
213 153 88 213 153 88 119 59 34 162 137 108 254 255 240 97 69 52
|
||||
162 137 108 254 255 240 131 94 71 97 69 52 120 74 50 97 69 52
|
||||
162 137 108 254 255 240 252 253 227 250 251 219 254 255 240 162 137 108
|
||||
97 69 52 213 153 88 175 97 50 111 14 13 95 4 6 119 9 8
|
||||
131 10 9 142 13 12 144 14 14 144 14 14 144 14 14 141 15 12
|
||||
138 15 12 138 15 12 138 15 12
|
||||
93 4 6 123 39 27 164 16 11 167 52 24 138 37 20 176 24 12
|
||||
167 21 14 159 30 14 164 16 11 123 0 2 158 83 45 97 69 52
|
||||
123 0 2 183 19 13 183 19 13 183 19 13 183 19 13 133 0 5
|
||||
0 0 0 78 2 7 183 19 13 107 0 4 97 69 52 111 14 13
|
||||
183 19 13 175 97 50 97 69 52 206 199 148 131 94 71 97 69 52
|
||||
216 189 107 216 189 107 119 59 34 131 94 71 237 235 180 97 69 52
|
||||
162 137 108 225 212 158 97 69 52 97 69 52 93 4 6 158 125 90
|
||||
0 0 0 131 94 71 206 199 148 206 199 148 131 94 71 91 31 21
|
||||
143 100 73 128 26 15 111 14 13 99 0 3 137 32 21 122 8 8
|
||||
129 12 11 138 12 11 142 13 12 141 15 12 141 15 12 138 15 12
|
||||
138 15 12 138 15 12 138 15 12
|
||||
120 41 26 151 28 16 183 19 13 141 65 38 183 19 13 183 19 13
|
||||
183 19 13 193 134 84 154 63 38 77 0 3 169 133 98 131 94 71
|
||||
0 0 0 0 0 0 0 0 0 91 31 21 0 0 0 97 69 52
|
||||
162 137 108 91 31 21 91 31 21 91 31 21 162 137 108 0 0 0
|
||||
183 19 13 192 140 79 97 69 52 91 31 21 0 0 0 131 94 71
|
||||
213 153 88 213 153 88 146 87 48 0 0 0 91 31 21 91 31 21
|
||||
0 0 0 0 0 0 97 69 52 158 125 90 111 0 3 111 14 13
|
||||
193 134 84 97 69 52 0 0 0 0 0 0 91 31 21 174 128 69
|
||||
192 140 79 162 137 108 119 34 17 148 61 42 179 118 76 123 0 2
|
||||
131 14 12 137 13 11 138 15 12 138 15 12 138 15 12 138 15 12
|
||||
134 12 11 134 12 11 137 13 11
|
||||
124 33 21 176 17 11 141 65 38 167 52 24 183 19 13 183 19 13
|
||||
183 19 13 219 195 113 146 90 61 105 45 32 143 100 73 215 186 121
|
||||
211 179 117 193 134 84 179 118 76 193 134 84 169 133 98 146 90 61
|
||||
173 92 60 158 125 90 143 100 73 131 94 71 162 137 108 131 94 71
|
||||
77 0 3 167 52 24 176 108 61 175 97 50 175 97 50 175 97 50
|
||||
213 153 88 213 153 88 192 140 79 175 97 50 176 108 61 120 74 50
|
||||
91 31 21 162 137 108 131 94 71 141 65 38 133 0 5 164 16 11
|
||||
139 9 7 158 83 45 169 113 67 174 110 60 176 108 61 174 128 69
|
||||
221 205 133 169 133 98 137 32 21 191 130 98 211 173 103 123 0 2
|
||||
138 15 12 137 13 11 138 15 12 141 15 12 141 15 12 138 15 12
|
||||
131 14 12 131 14 12 134 12 11
|
||||
154 14 11 163 56 28 116 46 29 183 19 13 183 19 13 183 19 13
|
||||
183 19 13 216 189 107 150 55 28 129 68 42 202 183 123 199 163 109
|
||||
187 167 103 146 90 61 152 17 12 144 16 12 139 9 7 92 0 2
|
||||
92 0 2 99 0 3 93 4 6 0 0 0 0 0 0 162 137 108
|
||||
97 69 52 0 0 0 78 2 7 78 2 7 77 0 3 167 52 24
|
||||
213 153 88 213 153 88 175 97 50 127 5 8 0 0 0 0 0 0
|
||||
162 137 108 91 31 21 77 0 3 147 24 15 183 19 13 183 19 13
|
||||
154 14 11 152 17 12 164 16 11 154 14 11 158 83 45 191 177 112
|
||||
225 212 158 206 199 148 154 43 26 175 97 50 175 97 50 133 0 5
|
||||
137 13 11 138 15 12 138 15 12 138 15 12 138 15 12 138 15 12
|
||||
131 14 12 138 15 12 134 12 11
|
||||
176 24 12 123 39 27 183 19 13 183 19 13 183 19 13 183 19 13
|
||||
158 83 45 175 97 50 152 48 27 95 4 6 237 235 180 232 217 158
|
||||
199 163 109 182 147 96 174 128 69 175 97 50 175 97 50 167 52 24
|
||||
176 17 11 164 16 11 167 52 24 158 83 45 99 0 3 77 0 3
|
||||
162 137 108 131 94 71 0 0 0 0 0 0 0 0 0 111 35 21
|
||||
158 83 45 158 83 45 91 31 21 0 0 0 91 31 21 191 177 112
|
||||
91 31 21 77 0 3 151 28 16 213 153 88 183 19 13 183 19 13
|
||||
183 19 13 175 97 50 175 97 50 192 140 79 187 167 103 221 205 133
|
||||
254 255 210 237 235 180 139 9 7 176 24 12 183 19 13 137 11 10
|
||||
137 13 11 138 15 12 138 15 12 138 15 12 138 15 12 134 12 11
|
||||
131 14 12 134 12 11 131 12 12
|
||||
154 43 26 156 20 14 183 19 13 183 19 13 183 19 13 175 97 50
|
||||
78 2 7 119 9 8 224 209 127 136 76 50 140 85 58 249 249 214
|
||||
232 217 158 206 199 148 195 174 110 213 153 88 208 170 99 175 97 50
|
||||
183 19 13 183 19 13 183 19 13 213 153 88 127 5 8 116 3 5
|
||||
77 0 3 158 125 90 162 137 108 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 131 94 71 162 137 108 91 31 21
|
||||
92 0 2 133 0 5 175 97 50 213 153 88 183 19 13 183 19 13
|
||||
183 19 13 213 153 88 216 189 107 216 189 107 221 205 133 247 246 193
|
||||
253 255 226 158 83 45 154 63 38 213 153 88 183 19 13 134 12 11
|
||||
137 13 11 137 13 11 138 15 12 138 15 12 138 15 12 131 14 12
|
||||
131 14 12 131 12 12 131 14 12
|
||||
128 26 15 183 19 13 183 19 13 183 19 13 175 97 50 104 58 46
|
||||
0 0 0 93 4 6 238 229 170 237 235 180 87 1 5 136 76 50
|
||||
202 183 123 202 183 123 225 212 158 232 217 158 235 226 137 213 153 88
|
||||
183 19 13 213 153 88 183 19 13 213 153 88 147 12 10 176 17 11
|
||||
135 17 11 77 0 3 104 58 46 202 183 123 91 31 21 0 0 0
|
||||
97 69 52 0 0 0 162 137 108 131 94 71 77 0 3 111 14 13
|
||||
169 21 14 133 0 5 175 97 50 175 97 50 175 97 50 175 97 50
|
||||
175 97 50 237 223 121 232 217 158 232 217 158 225 212 158 206 199 148
|
||||
158 83 45 120 0 3 232 217 158 237 223 121 139 9 7 134 12 11
|
||||
137 13 11 134 12 11 134 12 11 138 15 12 138 15 12 131 14 12
|
||||
131 14 12 131 14 12 128 14 13
|
||||
138 37 20 183 19 13 183 19 13 175 97 50 146 87 48 0 0 0
|
||||
78 2 7 77 0 3 136 76 50 225 212 158 119 34 17 123 0 2
|
||||
107 0 4 127 13 12 132 32 17 238 229 170 253 254 208 213 153 88
|
||||
213 153 88 213 153 88 183 19 13 175 97 50 183 19 13 183 19 13
|
||||
183 19 13 156 20 14 99 0 3 97 69 52 131 94 71 0 0 0
|
||||
97 69 52 97 69 52 131 94 71 77 0 3 127 13 12 183 19 13
|
||||
164 16 11 183 19 13 213 153 88 183 19 13 213 153 88 213 153 88
|
||||
213 153 88 241 232 158 252 252 206 175 96 57 135 17 11 122 7 7
|
||||
107 0 4 125 28 16 225 212 158 158 83 45 123 0 2 134 12 11
|
||||
137 13 11 137 13 11 134 12 11 138 15 12 131 14 12 128 14 13
|
||||
128 14 13 128 14 13 131 12 12
|
||||
167 52 24 183 19 13 183 19 13 175 97 50 0 0 0 77 0 3
|
||||
78 2 7 78 2 7 87 1 5 119 34 17 143 19 14 114 7 7
|
||||
109 5 7 143 80 49 107 0 4 199 143 96 254 255 240 237 223 121
|
||||
213 153 88 213 153 88 175 97 50 183 19 13 175 97 50 183 19 13
|
||||
183 19 13 175 97 50 176 17 11 109 5 7 162 137 108 97 69 52
|
||||
97 69 52 131 94 71 120 38 28 142 10 9 183 19 13 175 97 50
|
||||
183 19 13 183 19 13 175 97 50 167 52 24 213 153 88 213 153 88
|
||||
216 189 107 254 255 223 238 229 170 139 9 7 143 80 49 125 28 16
|
||||
102 4 5 116 9 9 128 26 15 116 3 5 122 13 12 131 12 12
|
||||
134 12 11 134 12 11 134 12 11 131 14 12 131 14 12 128 14 13
|
||||
128 14 13 128 14 13 128 14 13
|
||||
183 19 13 183 19 13 176 108 61 91 31 21 0 0 0 78 2 7
|
||||
78 2 7 89 3 6 78 2 7 131 10 9 106 7 8 102 4 5
|
||||
147 12 10 158 83 45 123 0 2 179 118 76 254 255 240 247 246 193
|
||||
216 189 107 216 189 107 213 153 88 213 153 88 213 153 88 183 19 13
|
||||
213 153 88 213 153 88 183 19 13 183 19 13 191 130 98 97 69 52
|
||||
0 0 0 169 133 98 183 19 13 183 19 13 175 97 50 213 153 88
|
||||
183 19 13 175 97 50 213 153 88 213 153 88 213 153 88 213 153 88
|
||||
235 226 137 254 255 233 206 199 148 128 8 8 147 67 48 122 13 12
|
||||
111 3 7 117 6 7 109 5 7 106 7 8 122 13 12 131 12 12
|
||||
131 14 12 131 14 12 131 14 12 131 14 12 131 14 12 128 14 13
|
||||
128 14 13 128 14 13 128 14 13
|
||||
183 19 13 175 97 50 119 70 46 0 0 0 77 0 3 78 2 7
|
||||
89 3 6 78 2 7 128 8 8 134 12 11 78 2 7 154 14 11
|
||||
135 17 11 176 111 73 123 0 2 148 61 42 254 255 223 252 253 227
|
||||
249 243 164 237 223 121 216 189 107 216 189 107 213 153 88 183 19 13
|
||||
216 189 107 213 153 88 183 19 13 183 19 13 183 19 13 131 94 71
|
||||
97 69 52 175 96 57 175 97 50 183 19 13 213 153 88 216 189 107
|
||||
183 19 13 175 97 50 216 189 107 213 153 88 216 189 107 237 223 121
|
||||
252 252 206 254 255 233 191 130 98 120 0 3 176 111 73 128 14 13
|
||||
111 3 7 119 9 8 116 9 9 116 9 9 122 13 12 131 12 12
|
||||
131 14 12 131 14 12 131 14 12 128 14 13 128 14 13 128 14 13
|
||||
128 14 13 128 14 13 128 14 13
|
||||
175 97 50 175 97 50 0 0 0 77 0 3 78 2 7 78 2 7
|
||||
89 3 6 114 7 7 183 19 13 78 2 7 154 14 11 160 21 14
|
||||
103 5 5 103 5 5 103 5 5 133 0 5 225 212 158 254 255 240
|
||||
249 249 214 244 241 169 237 223 121 249 243 164 193 134 84 175 97 50
|
||||
237 223 121 216 189 107 213 153 88 175 97 50 183 19 13 169 133 98
|
||||
162 137 108 183 19 13 213 153 88 175 97 50 213 153 88 237 223 121
|
||||
175 97 50 183 19 13 247 246 193 235 226 137 237 223 121 252 252 206
|
||||
254 255 223 250 251 219 163 56 28 116 3 5 116 3 5 118 7 7
|
||||
116 9 9 116 9 9 116 9 9 122 13 12 128 14 13 131 14 12
|
||||
131 14 12 131 14 12 128 14 13 128 14 13 128 14 13 128 14 13
|
||||
124 14 13 124 14 13 128 14 13
|
||||
176 108 61 78 2 7 77 0 3 77 0 3 78 2 7 89 3 6
|
||||
89 3 6 183 19 13 122 13 12 128 6 9 183 19 13 111 14 13
|
||||
111 14 13 106 7 8 117 6 7 139 9 7 175 97 50 249 249 214
|
||||
254 255 240 254 255 233 254 255 240 225 212 158 154 43 26 176 111 73
|
||||
211 179 117 254 255 210 237 223 121 213 153 88 183 19 13 213 153 88
|
||||
199 143 96 175 97 50 237 223 121 213 153 88 167 52 24 237 223 121
|
||||
237 223 121 159 30 14 191 130 98 254 255 240 254 255 240 254 255 240
|
||||
254 255 233 191 130 98 120 0 3 116 9 9 119 5 9 116 3 5
|
||||
116 3 5 116 3 5 119 5 9 125 8 10 125 8 10 127 13 12
|
||||
131 14 12 131 14 12 128 14 13 128 14 13 128 14 13 124 14 13
|
||||
124 14 13 128 14 13 128 14 13
|
||||
91 31 21 0 0 0 77 0 3 78 2 7 89 3 6 78 2 7
|
||||
174 18 12 174 18 12 106 7 8 183 19 13 151 28 16 111 14 13
|
||||
111 14 13 127 5 8 122 7 7 176 24 12 167 52 24 158 83 45
|
||||
191 130 98 202 183 123 179 118 76 122 13 12 120 0 3 191 130 98
|
||||
163 56 28 199 163 109 254 255 210 213 153 88 213 153 88 175 97 50
|
||||
175 97 50 213 153 88 249 243 164 237 223 121 176 17 11 167 52 24
|
||||
249 243 164 176 111 73 92 0 2 147 67 48 199 163 109 199 163 109
|
||||
147 67 48 107 0 4 106 7 8 114 7 7 137 32 21 124 33 21
|
||||
124 33 21 137 32 21 124 33 21 137 32 21 137 32 21 137 32 21
|
||||
131 14 12 131 14 12 128 14 13 128 14 13 127 13 12 124 14 13
|
||||
122 13 12 124 14 13 127 13 12
|
||||
0 0 0 77 0 3 77 0 3 78 2 7 78 2 7 131 14 12
|
||||
183 19 13 91 2 10 183 19 13 183 19 13 125 28 16 125 28 16
|
||||
131 9 10 116 3 5 152 17 12 176 24 12 167 52 24 111 14 13
|
||||
92 0 2 111 14 13 95 4 6 89 3 6 133 0 5 238 229 170
|
||||
191 130 98 139 9 7 249 249 214 211 179 117 175 97 50 213 153 88
|
||||
213 153 88 235 226 137 244 241 169 235 226 137 164 16 11 199 163 109
|
||||
254 255 240 176 111 73 80 0 2 89 3 6 87 1 5 80 0 2
|
||||
80 0 2 89 3 6 102 4 5 116 9 9 148 61 42 136 76 50
|
||||
147 67 48 147 67 48 118 44 32 147 67 48 147 67 48 150 53 31
|
||||
127 13 12 128 14 13 127 13 12 127 13 12 127 13 12 124 14 13
|
||||
124 14 13 122 13 12 122 13 12
|
||||
0 0 0 77 0 3 78 2 7 78 2 7 93 4 6 183 19 13
|
||||
106 7 8 154 14 11 183 19 13 132 32 17 132 32 17 138 15 12
|
||||
127 5 8 144 16 12 183 19 13 176 24 12 111 14 13 78 2 7
|
||||
91 31 21 91 31 21 78 2 7 123 0 2 154 43 26 252 253 227
|
||||
154 63 38 150 53 31 254 255 240 191 130 98 167 52 24 237 223 121
|
||||
235 226 137 247 246 193 254 255 210 215 186 121 158 83 45 254 255 240
|
||||
249 249 214 119 34 17 119 70 46 91 31 21 77 0 3 78 2 7
|
||||
78 2 7 87 1 5 102 4 5 116 9 9 123 39 27 148 61 42
|
||||
125 28 16 125 28 16 125 28 16 123 39 27 148 61 42 148 61 42
|
||||
122 13 12 122 13 12 128 14 13 127 13 12 124 14 13 122 13 12
|
||||
122 13 12 122 13 12 122 13 12
|
||||
0 0 0 77 0 3 78 2 7 78 2 7 183 19 13 143 19 14
|
||||
116 3 5 183 19 13 152 48 27 124 33 21 128 26 15 139 9 7
|
||||
135 17 11 183 19 13 183 19 13 151 28 16 77 0 3 91 31 21
|
||||
91 31 21 77 0 3 105 1 7 133 0 5 103 5 5 249 249 214
|
||||
191 130 98 176 111 73 206 199 148 147 12 10 158 83 45 249 243 164
|
||||
252 252 206 252 252 206 254 255 223 173 92 60 176 111 73 254 255 240
|
||||
173 92 60 92 0 2 78 2 7 77 0 3 77 0 3 77 0 3
|
||||
78 2 7 89 3 6 106 7 8 119 9 8 122 13 12 122 8 8
|
||||
119 5 9 119 9 8 119 9 8 119 9 8 122 13 12 128 14 13
|
||||
127 13 12 127 13 12 127 13 12 124 14 13 124 14 13 122 13 12
|
||||
122 13 12 122 13 12 122 13 12
|
||||
77 0 3 77 0 3 78 2 7 143 13 11 183 19 13 91 2 10
|
||||
183 19 13 167 52 24 119 34 17 125 28 16 145 11 11 122 13 12
|
||||
183 19 13 183 19 13 183 19 13 78 2 7 78 2 7 91 31 21
|
||||
77 0 3 78 2 7 127 5 8 89 3 6 80 0 2 153 103 68
|
||||
179 118 76 111 0 3 119 9 8 122 7 7 173 92 60 254 255 223
|
||||
249 249 214 254 255 223 221 205 133 123 0 2 140 85 58 249 249 214
|
||||
122 8 8 89 3 6 78 2 7 78 2 7 78 2 7 78 2 7
|
||||
87 1 5 95 4 6 114 7 7 122 13 12 125 8 10 122 13 12
|
||||
124 14 13 127 13 12 127 13 12 127 13 12 127 13 12 127 13 12
|
||||
127 13 12 124 14 13 124 14 13 124 14 13 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 122 13 12
|
||||
77 0 3 77 0 3 95 4 6 183 19 13 103 5 5 164 16 11
|
||||
183 19 13 124 33 21 124 33 21 142 10 9 122 8 8 176 24 12
|
||||
183 19 13 183 19 13 128 14 13 78 2 7 105 45 32 78 2 7
|
||||
78 2 7 125 8 10 102 4 5 79 0 3 93 4 6 103 5 5
|
||||
111 14 13 111 14 13 111 14 13 114 7 7 176 111 73 253 255 226
|
||||
250 251 219 249 249 214 167 52 24 119 34 17 118 44 32 162 115 76
|
||||
111 14 13 87 1 5 93 4 6 93 4 6 93 4 6 93 4 6
|
||||
95 4 6 106 7 8 116 9 9 122 13 12 127 13 12 127 13 12
|
||||
128 14 13 128 14 13 127 13 12 128 14 13 128 14 13 128 14 13
|
||||
127 13 12 124 14 13 124 14 13 124 14 13 124 14 13 122 13 12
|
||||
122 13 12 122 13 12 116 9 9
|
||||
77 0 3 77 0 3 183 19 13 142 10 9 119 5 9 183 19 13
|
||||
138 37 20 124 33 21 135 17 11 139 9 7 147 24 15 183 19 13
|
||||
183 19 13 167 52 24 80 0 2 114 50 39 91 31 21 77 0 3
|
||||
131 9 10 128 6 9 87 1 5 93 4 6 95 4 6 103 5 5
|
||||
95 4 6 119 34 17 138 37 20 103 5 5 179 118 76 254 255 233
|
||||
254 255 233 199 163 109 138 37 20 91 31 21 91 31 21 80 0 2
|
||||
89 3 6 93 4 6 102 4 5 106 7 8 106 7 8 106 7 8
|
||||
106 7 8 106 7 8 116 9 9 124 14 13 127 13 12 127 13 12
|
||||
124 14 13 124 14 13 124 14 13 128 14 13 124 14 13 124 14 13
|
||||
124 14 13 124 14 13 124 14 13 122 13 12 122 13 12 122 13 12
|
||||
122 13 12 116 9 9 116 9 9
|
||||
77 0 3 154 14 11 176 17 11 89 3 6 183 19 13 167 52 24
|
||||
124 33 21 124 33 21 145 11 11 128 14 13 183 19 13 183 19 13
|
||||
167 52 24 99 0 3 111 35 21 105 45 32 77 0 3 116 9 9
|
||||
147 12 10 93 4 6 95 4 6 106 7 8 103 5 5 103 5 5
|
||||
92 0 2 119 59 34 148 61 42 106 7 8 179 118 76 254 255 240
|
||||
243 238 185 163 56 28 119 59 34 111 35 21 111 35 21 80 0 2
|
||||
89 3 6 102 4 5 106 7 8 114 7 7 114 7 7 106 7 8
|
||||
116 9 9 116 9 9 122 13 12 124 14 13 127 13 12 122 13 12
|
||||
122 13 12 122 13 12 124 14 13 124 14 13 124 14 13 122 13 12
|
||||
124 14 13 122 13 12 124 14 13 122 13 12 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 122 13 12
|
||||
103 5 5 183 19 13 78 2 7 176 17 11 167 52 24 119 34 17
|
||||
124 33 21 137 11 10 125 8 10 176 24 12 183 19 13 183 19 13
|
||||
129 12 11 91 2 10 119 70 46 78 2 7 106 7 8 176 17 11
|
||||
111 1 9 95 4 6 106 7 8 106 7 8 106 7 8 103 5 5
|
||||
102 4 5 102 4 5 111 14 13 124 33 21 179 118 76 254 255 240
|
||||
176 111 73 119 9 8 95 4 6 141 65 38 141 65 38 80 0 2
|
||||
99 1 11 106 7 8 114 7 7 114 7 7 116 9 9 116 9 9
|
||||
116 9 9 116 9 9 122 13 12 122 13 12 124 14 13 124 14 13
|
||||
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 124 14 13 122 13 12 122 13 12 122 13 12
|
||||
116 9 9 116 9 9 116 9 9
|
||||
183 19 13 106 7 8 133 0 5 183 19 13 138 37 20 125 28 16
|
||||
128 14 13 127 5 8 157 23 16 183 19 13 183 19 13 176 24 12
|
||||
79 0 3 119 70 46 91 31 21 89 3 6 176 17 11 142 10 9
|
||||
91 2 10 114 7 7 114 7 7 114 7 7 109 5 7 106 7 8
|
||||
102 4 5 103 5 5 106 7 8 92 0 2 191 130 98 191 130 98
|
||||
119 9 8 111 14 13 106 7 8 103 5 5 102 4 5 95 4 6
|
||||
106 7 8 109 5 7 114 7 7 116 9 9 116 9 9 119 9 8
|
||||
119 9 8 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
124 14 13 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
116 9 9 116 9 9 119 9 8
|
||||
135 17 11 99 1 11 183 19 13 167 52 24 119 34 17 125 28 16
|
||||
147 12 10 131 14 12 183 19 13 183 19 13 183 19 13 87 1 5
|
||||
105 45 32 105 45 32 77 0 3 145 11 11 176 17 11 95 4 6
|
||||
106 7 8 116 9 9 119 9 8 119 9 8 116 9 9 109 5 7
|
||||
106 7 8 106 7 8 102 4 5 106 7 8 124 33 21 103 5 5
|
||||
93 4 6 93 4 6 106 7 8 106 7 8 102 4 5 106 7 8
|
||||
109 5 7 114 7 7 116 9 9 119 9 8 119 9 8 122 13 12
|
||||
122 13 12 119 9 8 119 9 8 119 9 8 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
|
||||
116 9 9 116 9 9 119 9 8
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,20 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.6.60 Kernel Configuration
|
||||
# Linux/arm64 6.6.15-ipfire Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=140200
|
||||
CONFIG_GCC_VERSION=130200
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=24300
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=24300
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
|
||||
CONFIG_TOOLS_SUPPORT_RELR=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
|
||||
CONFIG_PAHOLE_VERSION=0
|
||||
@@ -93,12 +92,9 @@ CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
|
||||
#
|
||||
# BPF subsystem
|
||||
#
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_BPF_SYSCALL is not set
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_BPF_JIT_DEFAULT_ON=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
# CONFIG_BPF_PRELOAD is not set
|
||||
# end of BPF subsystem
|
||||
|
||||
CONFIG_PREEMPT_BUILD=y
|
||||
@@ -139,7 +135,6 @@ CONFIG_TREE_SRCU=y
|
||||
CONFIG_TASKS_RCU_GENERIC=y
|
||||
CONFIG_TASKS_RCU=y
|
||||
CONFIG_TASKS_RUDE_RCU=y
|
||||
CONFIG_TASKS_TRACE_RCU=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
# end of RCU Subsystem
|
||||
@@ -160,7 +155,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
|
||||
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
|
||||
CONFIG_CC_HAS_INT128=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
CONFIG_CGROUPS=y
|
||||
@@ -183,7 +178,6 @@ CONFIG_PROC_PID_CPUSET=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
# CONFIG_CGROUP_BPF is not set
|
||||
# CONFIG_CGROUP_MISC is not set
|
||||
# CONFIG_CGROUP_DEBUG is not set
|
||||
CONFIG_SOCK_CGROUP_DATA=y
|
||||
@@ -234,7 +228,7 @@ CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_IO_URING=y
|
||||
# CONFIG_IO_URING is not set
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
CONFIG_MEMBARRIER=y
|
||||
CONFIG_KALLSYMS=y
|
||||
@@ -387,7 +381,6 @@ CONFIG_ARM64_ERRATUM_2645198=y
|
||||
CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y
|
||||
CONFIG_ARM64_ERRATUM_2966298=y
|
||||
CONFIG_ARM64_ERRATUM_3117295=y
|
||||
CONFIG_ARM64_ERRATUM_3194386=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
@@ -598,7 +591,6 @@ CONFIG_ARM_ARMADA_37XX_CPUFREQ=m
|
||||
CONFIG_ARM_ARMADA_8K_CPUFREQ=m
|
||||
CONFIG_ARM_IMX6Q_CPUFREQ=m
|
||||
CONFIG_ARM_IMX_CPUFREQ_DT=m
|
||||
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
|
||||
CONFIG_ARM_SCMI_CPUFREQ=m
|
||||
CONFIG_QORIQ_CPUFREQ=m
|
||||
# end of CPU Frequency scaling
|
||||
@@ -671,7 +663,6 @@ CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
CONFIG_KVM=y
|
||||
# CONFIG_NVHE_EL2_DEBUG is not set
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
|
||||
#
|
||||
# General architecture-dependent options
|
||||
@@ -772,7 +763,6 @@ CONFIG_HAVE_ARCH_COMPILER_H=y
|
||||
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
|
||||
CONFIG_ARCH_USE_MEMREMAP_PROT=y
|
||||
CONFIG_ARCH_HAS_RELR=y
|
||||
CONFIG_RELR=y
|
||||
CONFIG_HAVE_PREEMPT_DYNAMIC=y
|
||||
CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y
|
||||
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
|
||||
@@ -963,7 +953,6 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_PAGE_REPORTING=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_PCP_BATCH_SCALE_MAX=5
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_MMU_NOTIFIER=y
|
||||
CONFIG_KSM=y
|
||||
@@ -1045,8 +1034,6 @@ CONFIG_XFRM_ESP=m
|
||||
CONFIG_XFRM_IPCOMP=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
CONFIG_XDP_SOCKETS_DIAG=m
|
||||
CONFIG_NET_HANDSHAKE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
@@ -1155,7 +1142,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
|
||||
CONFIG_NETFILTER_NETLINK=m
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y
|
||||
CONFIG_NETFILTER_FAMILY_ARP=y
|
||||
CONFIG_NETFILTER_BPF_LINK=y
|
||||
# CONFIG_NETFILTER_NETLINK_HOOK is not set
|
||||
CONFIG_NETFILTER_NETLINK_ACCT=m
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE=m
|
||||
@@ -3666,7 +3652,7 @@ CONFIG_SERIAL_NONSTANDARD=y
|
||||
# CONFIG_MOXA_INTELLIO is not set
|
||||
# CONFIG_MOXA_SMARTIO is not set
|
||||
CONFIG_N_HDLC=m
|
||||
# CONFIG_N_GSM is not set
|
||||
CONFIG_N_GSM=m
|
||||
# CONFIG_NOZOMI is not set
|
||||
# CONFIG_NULL_TTY is not set
|
||||
CONFIG_HVC_DRIVER=y
|
||||
@@ -4570,6 +4556,7 @@ CONFIG_MFD_SM501_GPIO=y
|
||||
# CONFIG_MFD_STMPE is not set
|
||||
CONFIG_MFD_SUN6I_PRCM=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
# CONFIG_MFD_TI_AM335X_TSCADC is not set
|
||||
# CONFIG_MFD_LP3943 is not set
|
||||
# CONFIG_MFD_LP8788 is not set
|
||||
# CONFIG_MFD_TI_LMU is not set
|
||||
@@ -5548,7 +5535,6 @@ CONFIG_DVB_SP2=m
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_SCREEN_INFO=y
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
@@ -5836,7 +5822,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_DMAMEM_HELPERS=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
|
||||
@@ -6474,14 +6459,12 @@ CONFIG_HID_THINGM=m
|
||||
CONFIG_HID_ZYDACRON=m
|
||||
# CONFIG_HID_SENSOR_HUB is not set
|
||||
# CONFIG_HID_ALPS is not set
|
||||
# CONFIG_HID_MCP2200 is not set
|
||||
# CONFIG_HID_MCP2221 is not set
|
||||
# end of Special HID drivers
|
||||
|
||||
#
|
||||
# HID-BPF support
|
||||
#
|
||||
# CONFIG_HID_BPF is not set
|
||||
# end of HID-BPF support
|
||||
|
||||
#
|
||||
@@ -7288,7 +7271,7 @@ CONFIG_COMMON_CLK_XGENE=y
|
||||
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
|
||||
CONFIG_CLK_BCM2711_DVP=y
|
||||
CONFIG_CLK_BCM2835=y
|
||||
CONFIG_CLK_RASPBERRYPI=y
|
||||
# CONFIG_CLK_RASPBERRYPI is not set
|
||||
CONFIG_MXC_CLK=m
|
||||
CONFIG_MXC_CLK_SCU=m
|
||||
CONFIG_CLK_IMX8MM=m
|
||||
@@ -7541,7 +7524,6 @@ CONFIG_EXTCON=y
|
||||
# CONFIG_EXTCON_USB_GPIO is not set
|
||||
CONFIG_MEMORY=y
|
||||
# CONFIG_ARM_PL172_MPMC is not set
|
||||
CONFIG_FSL_IFC=y
|
||||
# CONFIG_IIO is not set
|
||||
# CONFIG_NTB is not set
|
||||
CONFIG_PWM=y
|
||||
@@ -8046,7 +8028,6 @@ CONFIG_NLS_UTF8=m
|
||||
CONFIG_NLS_UCS2_UTILS=m
|
||||
# CONFIG_DLM is not set
|
||||
# CONFIG_UNICODE is not set
|
||||
CONFIG_IO_WQ=y
|
||||
# end of File systems
|
||||
|
||||
#
|
||||
@@ -8059,9 +8040,6 @@ CONFIG_KEYS=y
|
||||
# CONFIG_ENCRYPTED_KEYS is not set
|
||||
# CONFIG_KEY_DH_OPERATIONS is not set
|
||||
CONFIG_SECURITY_DMESG_RESTRICT=y
|
||||
CONFIG_PROC_MEM_ALWAYS_FORCE=y
|
||||
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
|
||||
# CONFIG_PROC_MEM_NO_FORCE is not set
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITYFS=y
|
||||
# CONFIG_SECURITY_NETWORK is not set
|
||||
@@ -8087,7 +8065,7 @@ CONFIG_INTEGRITY=y
|
||||
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
|
||||
# CONFIG_EVM is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
|
||||
#
|
||||
# Kernel hardening options
|
||||
@@ -8138,7 +8116,6 @@ CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_SIG=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_SKCIPHER=y
|
||||
CONFIG_CRYPTO_SKCIPHER2=y
|
||||
@@ -8562,6 +8539,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
CONFIG_CMA_ALIGNMENT=8
|
||||
# CONFIG_DMA_API_DEBUG is not set
|
||||
CONFIG_SGL_ALLOC=y
|
||||
# CONFIG_FORCE_NR_CPUS is not set
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_DQL=y
|
||||
CONFIG_GLOB=y
|
||||
|
||||
12
config/kernel/kernel.config.bpf
Normal file
12
config/kernel/kernel.config.bpf
Normal file
@@ -0,0 +1,12 @@
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_INFO_BTF=y
|
||||
CONFIG_DEBUG_INFO_DWARF4=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_KPROBE_EVENTS=y
|
||||
CONFIG_BPF_EVENTS=y
|
||||
CONFIG_UPROBES=y
|
||||
CONFIG_UPROBE_EVENTS=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_MODULE_SIG_FORCE=n
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,15 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/riscv 6.6.60 Kernel Configuration
|
||||
# Linux/riscv 6.6.15-ipfire Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=140200
|
||||
CONFIG_GCC_VERSION=130200
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=24300
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=24300
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
@@ -102,13 +102,8 @@ CONFIG_HAVE_EBPF_JIT=y
|
||||
#
|
||||
# BPF subsystem
|
||||
#
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_BPF_SYSCALL is not set
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_BPF_JIT_DEFAULT_ON=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
# CONFIG_BPF_PRELOAD is not set
|
||||
# CONFIG_BPF_LSM is not set
|
||||
# end of BPF subsystem
|
||||
|
||||
CONFIG_PREEMPT_VOLUNTARY_BUILD=y
|
||||
@@ -143,7 +138,6 @@ CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_TASKS_RCU_GENERIC=y
|
||||
CONFIG_TASKS_RUDE_RCU=y
|
||||
CONFIG_TASKS_TRACE_RCU=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
# end of RCU Subsystem
|
||||
@@ -162,7 +156,7 @@ CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
|
||||
CONFIG_CC_HAS_INT128=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
CONFIG_CGROUPS=y
|
||||
@@ -185,7 +179,6 @@ CONFIG_PROC_PID_CPUSET=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
# CONFIG_CGROUP_BPF is not set
|
||||
# CONFIG_CGROUP_MISC is not set
|
||||
# CONFIG_CGROUP_DEBUG is not set
|
||||
CONFIG_SOCK_CGROUP_DATA=y
|
||||
@@ -243,7 +236,6 @@ CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_SELFTEST is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
CONFIG_KALLSYMS_BASE_RELATIVE=y
|
||||
CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS=y
|
||||
CONFIG_KCMP=y
|
||||
CONFIG_RSEQ=y
|
||||
CONFIG_CACHESTAT_SYSCALL=y
|
||||
@@ -294,7 +286,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_CSUM=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
|
||||
CONFIG_PGTABLE_LEVELS=5
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_RISCV_DMA_NONCOHERENT=y
|
||||
@@ -498,7 +489,6 @@ CONFIG_ACPI_WATCHDOG=y
|
||||
# CONFIG_ACPI_PFRUT is not set
|
||||
# CONFIG_ACPI_FFH is not set
|
||||
# CONFIG_PMIC_OPREGION is not set
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
|
||||
#
|
||||
# General architecture-dependent options
|
||||
@@ -763,7 +753,6 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_PAGE_REPORTING=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
|
||||
CONFIG_PCP_BATCH_SCALE_MAX=5
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_MMU_NOTIFIER=y
|
||||
CONFIG_KSM=y
|
||||
@@ -836,8 +825,6 @@ CONFIG_XFRM_ESP=m
|
||||
CONFIG_XFRM_IPCOMP=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
CONFIG_XDP_SOCKETS_DIAG=m
|
||||
CONFIG_NET_HANDSHAKE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
@@ -946,7 +933,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
|
||||
CONFIG_NETFILTER_NETLINK=y
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y
|
||||
CONFIG_NETFILTER_FAMILY_ARP=y
|
||||
CONFIG_NETFILTER_BPF_LINK=y
|
||||
# CONFIG_NETFILTER_NETLINK_HOOK is not set
|
||||
CONFIG_NETFILTER_NETLINK_ACCT=m
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE=m
|
||||
@@ -3332,7 +3318,7 @@ CONFIG_SERIAL_NONSTANDARD=y
|
||||
CONFIG_N_HDLC=m
|
||||
# CONFIG_GOLDFISH_TTY is not set
|
||||
# CONFIG_IPWIRELESS is not set
|
||||
# CONFIG_N_GSM is not set
|
||||
CONFIG_N_GSM=m
|
||||
CONFIG_NOZOMI=m
|
||||
# CONFIG_NULL_TTY is not set
|
||||
CONFIG_HVC_DRIVER=y
|
||||
@@ -4091,6 +4077,7 @@ CONFIG_MFD_SM501=m
|
||||
CONFIG_MFD_SM501_GPIO=y
|
||||
# CONFIG_MFD_SKY81452 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
# CONFIG_MFD_TI_AM335X_TSCADC is not set
|
||||
# CONFIG_MFD_LP3943 is not set
|
||||
# CONFIG_MFD_TI_LMU is not set
|
||||
# CONFIG_TPS6105X is not set
|
||||
@@ -4933,7 +4920,6 @@ CONFIG_DVB_SP2=m
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_SCREEN_INFO=y
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
@@ -5161,7 +5147,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
# CONFIG_FB_FOREIGN_ENDIAN is not set
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
|
||||
@@ -5507,7 +5492,6 @@ CONFIG_HID_ZYDACRON=m
|
||||
CONFIG_HID_SENSOR_HUB=m
|
||||
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set
|
||||
# CONFIG_HID_ALPS is not set
|
||||
# CONFIG_HID_MCP2200 is not set
|
||||
# CONFIG_HID_MCP2221 is not set
|
||||
# end of Special HID drivers
|
||||
|
||||
@@ -6737,9 +6721,6 @@ CONFIG_KEYS=y
|
||||
# CONFIG_ENCRYPTED_KEYS is not set
|
||||
# CONFIG_KEY_DH_OPERATIONS is not set
|
||||
CONFIG_SECURITY_DMESG_RESTRICT=y
|
||||
CONFIG_PROC_MEM_ALWAYS_FORCE=y
|
||||
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
|
||||
# CONFIG_PROC_MEM_NO_FORCE is not set
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITYFS=y
|
||||
# CONFIG_SECURITY_NETWORK is not set
|
||||
@@ -6764,7 +6745,7 @@ CONFIG_INTEGRITY=y
|
||||
# CONFIG_IMA is not set
|
||||
# CONFIG_EVM is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
|
||||
#
|
||||
# Kernel hardening options
|
||||
@@ -6814,7 +6795,6 @@ CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_SIG=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_SKCIPHER=y
|
||||
CONFIG_CRYPTO_SKCIPHER2=y
|
||||
@@ -7141,6 +7121,7 @@ CONFIG_DMA_DIRECT_REMAP=y
|
||||
# CONFIG_DMA_API_DEBUG is not set
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_CHECK_SIGNATURE=y
|
||||
# CONFIG_FORCE_NR_CPUS is not set
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_DQL=y
|
||||
CONFIG_GLOB=y
|
||||
@@ -7402,7 +7383,6 @@ CONFIG_BRANCH_PROFILE_NONE=y
|
||||
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
CONFIG_UPROBE_EVENTS=y
|
||||
CONFIG_BPF_EVENTS=y
|
||||
CONFIG_DYNAMIC_EVENTS=y
|
||||
CONFIG_PROBE_EVENTS=y
|
||||
CONFIG_FTRACE_MCOUNT_RECORD=y
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 6.6.63 Kernel Configuration
|
||||
# Linux/x86 6.6.15-ipfire Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
|
||||
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=140200
|
||||
CONFIG_GCC_VERSION=130200
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=24300
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=24300
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
@@ -112,12 +112,9 @@ CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
|
||||
#
|
||||
# BPF subsystem
|
||||
#
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_BPF_SYSCALL is not set
|
||||
CONFIG_BPF_JIT=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_BPF_JIT_DEFAULT_ON=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
# CONFIG_BPF_PRELOAD is not set
|
||||
# end of BPF subsystem
|
||||
|
||||
CONFIG_PREEMPT_BUILD=y
|
||||
@@ -158,7 +155,6 @@ CONFIG_TREE_SRCU=y
|
||||
CONFIG_TASKS_RCU_GENERIC=y
|
||||
CONFIG_TASKS_RCU=y
|
||||
CONFIG_TASKS_RUDE_RCU=y
|
||||
CONFIG_TASKS_TRACE_RCU=y
|
||||
CONFIG_RCU_STALL_COMMON=y
|
||||
CONFIG_RCU_NEED_SEGCBLIST=y
|
||||
# end of RCU Subsystem
|
||||
@@ -179,7 +175,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
|
||||
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
|
||||
CONFIG_CC_HAS_INT128=y
|
||||
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
|
||||
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_CC_NO_ARRAY_BOUNDS=y
|
||||
CONFIG_ARCH_SUPPORTS_INT128=y
|
||||
CONFIG_CGROUPS=y
|
||||
@@ -202,7 +198,6 @@ CONFIG_PROC_PID_CPUSET=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
# CONFIG_CGROUP_BPF is not set
|
||||
# CONFIG_CGROUP_MISC is not set
|
||||
# CONFIG_CGROUP_DEBUG is not set
|
||||
CONFIG_SOCK_CGROUP_DATA=y
|
||||
@@ -253,7 +248,7 @@ CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_IO_URING=y
|
||||
# CONFIG_IO_URING is not set
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
CONFIG_MEMBARRIER=y
|
||||
CONFIG_KALLSYMS=y
|
||||
@@ -391,10 +386,10 @@ CONFIG_DMI=y
|
||||
# CONFIG_GART_IOMMU is not set
|
||||
CONFIG_BOOT_VESA_SUPPORT=y
|
||||
# CONFIG_MAXSMP is not set
|
||||
CONFIG_NR_CPUS_RANGE_BEGIN=2
|
||||
CONFIG_NR_CPUS_RANGE_BEGIN=512
|
||||
CONFIG_NR_CPUS_RANGE_END=512
|
||||
CONFIG_NR_CPUS_DEFAULT=64
|
||||
CONFIG_NR_CPUS=64
|
||||
CONFIG_NR_CPUS_DEFAULT=512
|
||||
CONFIG_NR_CPUS=512
|
||||
CONFIG_SCHED_CLUSTER=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_SCHED_MC=y
|
||||
@@ -481,6 +476,7 @@ CONFIG_PHYSICAL_ALIGN=0x400000
|
||||
CONFIG_DYNAMIC_MEMORY_LAYOUT=y
|
||||
CONFIG_RANDOMIZE_MEMORY=y
|
||||
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
|
||||
# CONFIG_ADDRESS_MASKING is not set
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
# CONFIG_LEGACY_VSYSCALL_XONLY is not set
|
||||
CONFIG_LEGACY_VSYSCALL_NONE=y
|
||||
@@ -500,7 +496,7 @@ CONFIG_CALL_PADDING=y
|
||||
CONFIG_HAVE_CALL_THUNKS=y
|
||||
CONFIG_CALL_THUNKS=y
|
||||
CONFIG_PREFIX_SYMBOLS=y
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
CONFIG_SPECULATION_MITIGATIONS=y
|
||||
CONFIG_PAGE_TABLE_ISOLATION=y
|
||||
CONFIG_RETPOLINE=y
|
||||
CONFIG_RETHUNK=y
|
||||
@@ -512,8 +508,6 @@ CONFIG_CPU_IBRS_ENTRY=y
|
||||
CONFIG_CPU_SRSO=y
|
||||
CONFIG_SLS=y
|
||||
# CONFIG_GDS_FORCE_MITIGATION is not set
|
||||
CONFIG_MITIGATION_RFDS=y
|
||||
CONFIG_MITIGATION_SPECTRE_BHI=y
|
||||
CONFIG_ARCH_HAS_ADD_PAGES=y
|
||||
|
||||
#
|
||||
@@ -702,7 +696,6 @@ CONFIG_AS_SHA256_NI=y
|
||||
CONFIG_AS_TPAUSE=y
|
||||
CONFIG_AS_GFNI=y
|
||||
CONFIG_AS_WRUSS=y
|
||||
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y
|
||||
|
||||
#
|
||||
# General architecture-dependent options
|
||||
@@ -1016,7 +1009,6 @@ CONFIG_PAGE_REPORTING=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_PCP_BATCH_SCALE_MAX=5
|
||||
CONFIG_PHYS_ADDR_T_64BIT=y
|
||||
CONFIG_MMU_NOTIFIER=y
|
||||
CONFIG_KSM=y
|
||||
@@ -1104,8 +1096,6 @@ CONFIG_XFRM_ESP=m
|
||||
CONFIG_XFRM_IPCOMP=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_XDP_SOCKETS=y
|
||||
CONFIG_XDP_SOCKETS_DIAG=m
|
||||
CONFIG_NET_HANDSHAKE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
@@ -1214,7 +1204,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
|
||||
CONFIG_NETFILTER_NETLINK=y
|
||||
CONFIG_NETFILTER_FAMILY_BRIDGE=y
|
||||
CONFIG_NETFILTER_FAMILY_ARP=y
|
||||
CONFIG_NETFILTER_BPF_LINK=y
|
||||
# CONFIG_NETFILTER_NETLINK_HOOK is not set
|
||||
CONFIG_NETFILTER_NETLINK_ACCT=m
|
||||
CONFIG_NETFILTER_NETLINK_QUEUE=m
|
||||
@@ -3568,7 +3557,7 @@ CONFIG_SERIAL_NONSTANDARD=y
|
||||
# CONFIG_MOXA_INTELLIO is not set
|
||||
# CONFIG_MOXA_SMARTIO is not set
|
||||
CONFIG_N_HDLC=m
|
||||
# CONFIG_N_GSM is not set
|
||||
CONFIG_N_GSM=m
|
||||
CONFIG_NOZOMI=m
|
||||
# CONFIG_NULL_TTY is not set
|
||||
CONFIG_HVC_DRIVER=y
|
||||
@@ -4413,6 +4402,7 @@ CONFIG_MFD_SM501=m
|
||||
CONFIG_MFD_SM501_GPIO=y
|
||||
# CONFIG_MFD_SKY81452 is not set
|
||||
CONFIG_MFD_SYSCON=y
|
||||
# CONFIG_MFD_TI_AM335X_TSCADC is not set
|
||||
# CONFIG_MFD_LP3943 is not set
|
||||
# CONFIG_MFD_TI_LMU is not set
|
||||
# CONFIG_TPS6105X is not set
|
||||
@@ -5243,7 +5233,6 @@ CONFIG_DVB_SP2=m
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_SCREEN_INFO=y
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
# CONFIG_AUXDISPLAY is not set
|
||||
@@ -5491,7 +5480,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
|
||||
# CONFIG_FB_FOREIGN_ENDIAN is not set
|
||||
CONFIG_FB_SYS_FOPS=y
|
||||
CONFIG_FB_DEFERRED_IO=y
|
||||
CONFIG_FB_IOMEM_FOPS=y
|
||||
CONFIG_FB_IOMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS=y
|
||||
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
|
||||
@@ -5865,14 +5853,12 @@ CONFIG_HID_ZYDACRON=m
|
||||
CONFIG_HID_SENSOR_HUB=m
|
||||
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set
|
||||
# CONFIG_HID_ALPS is not set
|
||||
# CONFIG_HID_MCP2200 is not set
|
||||
# CONFIG_HID_MCP2221 is not set
|
||||
# end of Special HID drivers
|
||||
|
||||
#
|
||||
# HID-BPF support
|
||||
#
|
||||
# CONFIG_HID_BPF is not set
|
||||
# end of HID-BPF support
|
||||
|
||||
#
|
||||
@@ -7064,8 +7050,8 @@ CONFIG_NTFS3_FS_POSIX_ACL=y
|
||||
# Pseudo filesystems
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
# CONFIG_PROC_KCORE is not set
|
||||
# CONFIG_PROC_VMCORE is not set
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_PROC_VMCORE=y
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_PROC_PAGE_MONITOR=y
|
||||
# CONFIG_PROC_CHILDREN is not set
|
||||
@@ -7226,7 +7212,6 @@ CONFIG_NLS_UCS2_UTILS=m
|
||||
CONFIG_DLM=m
|
||||
# CONFIG_DLM_DEBUG is not set
|
||||
# CONFIG_UNICODE is not set
|
||||
CONFIG_IO_WQ=y
|
||||
# end of File systems
|
||||
|
||||
#
|
||||
@@ -7239,9 +7224,6 @@ CONFIG_KEYS=y
|
||||
# CONFIG_ENCRYPTED_KEYS is not set
|
||||
# CONFIG_KEY_DH_OPERATIONS is not set
|
||||
CONFIG_SECURITY_DMESG_RESTRICT=y
|
||||
CONFIG_PROC_MEM_ALWAYS_FORCE=y
|
||||
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
|
||||
# CONFIG_PROC_MEM_NO_FORCE is not set
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_SECURITYFS=y
|
||||
# CONFIG_SECURITY_NETWORK is not set
|
||||
@@ -7268,7 +7250,7 @@ CONFIG_INTEGRITY=y
|
||||
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
|
||||
# CONFIG_EVM is not set
|
||||
CONFIG_DEFAULT_SECURITY_DAC=y
|
||||
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
|
||||
|
||||
#
|
||||
# Kernel hardening options
|
||||
@@ -7319,7 +7301,6 @@ CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_ALGAPI2=y
|
||||
CONFIG_CRYPTO_AEAD=y
|
||||
CONFIG_CRYPTO_AEAD2=y
|
||||
CONFIG_CRYPTO_SIG=y
|
||||
CONFIG_CRYPTO_SIG2=y
|
||||
CONFIG_CRYPTO_SKCIPHER=y
|
||||
CONFIG_CRYPTO_SKCIPHER2=y
|
||||
@@ -7696,6 +7677,7 @@ CONFIG_SWIOTLB=y
|
||||
# CONFIG_DMA_API_DEBUG is not set
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_CHECK_SIGNATURE=y
|
||||
# CONFIG_FORCE_NR_CPUS is not set
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_DQL=y
|
||||
CONFIG_GLOB=y
|
||||
@@ -7777,7 +7759,10 @@ CONFIG_OBJTOOL=y
|
||||
#
|
||||
# Generic Kernel Debugging Instruments
|
||||
#
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
|
||||
CONFIG_MAGIC_SYSRQ_SERIAL=y
|
||||
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_KGDB is not set
|
||||
@@ -7830,7 +7815,6 @@ CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
|
||||
CONFIG_HAVE_ARCH_KASAN=y
|
||||
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_CC_HAS_KASAN_SW_TAGS=y
|
||||
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
|
||||
# CONFIG_KASAN is not set
|
||||
CONFIG_HAVE_ARCH_KFENCE=y
|
||||
@@ -7853,7 +7837,7 @@ CONFIG_PANIC_ON_OOPS_VALUE=0
|
||||
CONFIG_PANIC_TIMEOUT=0
|
||||
CONFIG_LOCKUP_DETECTOR=y
|
||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
|
||||
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
|
||||
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
|
||||
CONFIG_HARDLOCKUP_DETECTOR=y
|
||||
# CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set
|
||||
@@ -7862,8 +7846,8 @@ CONFIG_HARDLOCKUP_DETECTOR_PERF=y
|
||||
# CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set
|
||||
CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
|
||||
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
|
||||
# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
|
||||
# CONFIG_DETECT_HUNG_TASK is not set
|
||||
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
# CONFIG_WQ_WATCHDOG is not set
|
||||
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
|
||||
# CONFIG_TEST_LOCKUP is not set
|
||||
@@ -8051,3 +8035,16 @@ CONFIG_ARCH_USE_MEMTEST=y
|
||||
#
|
||||
# end of Rust hacking
|
||||
# end of Kernel hacking
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_INFO_BTF=y
|
||||
CONFIG_DEBUG_INFO_DWARF4=y
|
||||
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
|
||||
CONFIG_KPROBES=y
|
||||
CONFIG_KPROBE_EVENTS=y
|
||||
CONFIG_BPF_EVENTS=y
|
||||
CONFIG_UPROBES=y
|
||||
CONFIG_UPROBE_EVENTS=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_MODULE_SIG_FORCE=y
|
||||
CONFIG_FPROBE=y
|
||||
|
||||
1189
config/lcdproc/LCDd.conf
Normal file
1189
config/lcdproc/LCDd.conf
Normal file
File diff suppressed because it is too large
Load Diff
129
config/lcdproc/lcdproc.conf
Normal file
129
config/lcdproc/lcdproc.conf
Normal file
@@ -0,0 +1,129 @@
|
||||
# LCDproc client configuration file
|
||||
|
||||
## general options ##
|
||||
[lcdproc]
|
||||
# address of the LCDd server to connect to
|
||||
Server=localhost
|
||||
|
||||
# Port of the server to connect to
|
||||
Port=13666
|
||||
|
||||
# set reporting level
|
||||
ReportLevel=2
|
||||
|
||||
# report to to syslog ?
|
||||
ReportToSyslog=false
|
||||
|
||||
# run in foreground [default: false; legal: true, false]
|
||||
#Foreground=true
|
||||
|
||||
# PidFile location when running as daemon [default: /var/run/lcdproc.pid]
|
||||
#PidFile=/var/run/lcdproc.pid
|
||||
|
||||
# slow down initial announcement of modes (in 1/100s)
|
||||
#delay=2
|
||||
|
||||
# display name for the main menu [default: LCDproc HOST]
|
||||
#DisplayName=lcdproc
|
||||
|
||||
## screen specific configuration options ##
|
||||
|
||||
[CPU]
|
||||
# Show screen
|
||||
Active=True
|
||||
OnTime=1
|
||||
OffTime=2
|
||||
ShowInvisible=false
|
||||
|
||||
[Iface]
|
||||
# Show screen
|
||||
Active=True
|
||||
|
||||
# Show stats for Interface0
|
||||
Interface0=green0
|
||||
# Interface alias name to display [default: <interface name>]
|
||||
Alias0=LAN
|
||||
|
||||
# Show stats for Interface1
|
||||
Interface1=red0
|
||||
Alias1=WAN
|
||||
|
||||
# Show stats for Interface2
|
||||
Interface2=blue0
|
||||
Alias2=WIFI
|
||||
|
||||
# for more than 3 interfaces change MAX_INTERFACES in iface.h and rebuild
|
||||
|
||||
# Units to display [default: byte; legal: byte, bit, packet]
|
||||
unit=bit
|
||||
|
||||
# add screen with transferred traffic
|
||||
#transfer=TRUE
|
||||
|
||||
[Memory]
|
||||
# Show screen
|
||||
Active=True
|
||||
|
||||
[Load]
|
||||
# Show screen
|
||||
Active=True
|
||||
# Min Load Avg at which the backlight will be turned off [default: 0.05]
|
||||
LowLoad=0.00
|
||||
# Max Load Avg at which the backlight will start blinking [default: 1.3]
|
||||
HighLoad=2.5
|
||||
|
||||
[TimeDate]
|
||||
# Show screen
|
||||
Active=True
|
||||
# time format [default: %H:%M:%S; legal: see strftime(3)]
|
||||
TimeFormat="%H:%M:%S"
|
||||
# date format [default: %x; legal: see strftime(3)]
|
||||
DateFormat="%x"
|
||||
|
||||
[About]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[SMP-CPU]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[OldTime]
|
||||
# Show screen
|
||||
Active=false
|
||||
# time format [default: %H:%M:%S; legal: see strftime(3)]
|
||||
TimeFormat="%H:%M:%S"
|
||||
# date format [default: %x; legal: see strftime(3)]
|
||||
DateFormat="%x"
|
||||
|
||||
[BigClock]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[Uptime]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[Battery]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[CPUGraph]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[ProcSize]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[Disk]
|
||||
# Show screen
|
||||
Active=false
|
||||
|
||||
[MiniClock]
|
||||
# Show screen
|
||||
Active=True
|
||||
# time format [default: %H:%M; legal: see strftime(3)]
|
||||
TimeFormat="%H:%M"
|
||||
|
||||
# EOF
|
||||
@@ -22,7 +22,7 @@
|
||||
'enabled' => 1,
|
||||
'subMenu' => $subproxy
|
||||
};
|
||||
$menu->{'07.ipfire'} = {'caption' => 'IPFire',
|
||||
$menu->{'07.ipfire'} = {'caption' => 'BPFire',
|
||||
'enabled' => 1,
|
||||
'subMenu' => $subipfire
|
||||
};
|
||||
|
||||
@@ -26,12 +26,6 @@
|
||||
'title' => "$Lang::tr{'ipblocklist'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subfirewall->{'60.locationblock'} = {
|
||||
'caption' => $Lang::tr{'locationblock'},
|
||||
'uri' => '/cgi-bin/location-block.cgi',
|
||||
'title' => $Lang::tr{'locationblock'},
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subfirewall->{'70.wireless'} = {
|
||||
'caption' => $Lang::tr{'blue access'},
|
||||
'uri' => '/cgi-bin/wireless.cgi',
|
||||
|
||||
@@ -1,13 +1,48 @@
|
||||
$subipfire->{'10.pakfire'} = {'caption' => 'Pakfire',
|
||||
'uri' => '/cgi-bin/pakfire.cgi',
|
||||
'title' => "Pakfire",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'20.xdptcpddos'} = {'caption' => 'XDP TCP DDoS',
|
||||
'uri' => '/cgi-bin/tcp-ddos.cgi',
|
||||
'title' => "XDP TCP DDoS",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'10.ddos'} = {'caption' => $Lang::tr{'ebpf xdp ddos'},
|
||||
'uri' => '/cgi-bin/ddos.cgi',
|
||||
'title' => "$Lang::tr{'ebpf xdp ddos system'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'15.xdpdns'} = {'caption' => $Lang::tr{'xdpdns domain'},
|
||||
'uri' => '/cgi-bin/xdpdns.cgi',
|
||||
'title' => "$Lang::tr{'xdpdns domain'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'16.xdpsni'} = {'caption' => $Lang::tr{'xdpsni domain'},
|
||||
'uri' => '/cgi-bin/xdpsni.cgi',
|
||||
'title' => "$Lang::tr{'xdpsni domain'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'17.locationblock'} = {
|
||||
'caption' => $Lang::tr{'locationblock'},
|
||||
'uri' => '/cgi-bin/location-block.cgi',
|
||||
'title' => $Lang::tr{'locationblock'},
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'20.loxilb'} = {
|
||||
'caption' => $Lang::tr{'loxilb enable'},
|
||||
'uri' => '/cgi-bin/loxilb.cgi',
|
||||
'title' => "$Lang::tr{'loxilb enable'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'30.loxilbconfig'} = {
|
||||
'caption' => $Lang::tr{'loxilb config'},
|
||||
'uri' => '/cgi-bin/loxilbconfig.cgi',
|
||||
'title' => "$Lang::tr{'loxilb config'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'40.loxilbfw'} = {
|
||||
'caption' => $Lang::tr{'loxilb fw'},
|
||||
'uri' => '/cgi-bin/loxilbfw.cgi',
|
||||
'title' => "$Lang::tr{'loxilb fw'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'50.keepalived'} = {
|
||||
'caption' => $Lang::tr{'keepalived'},
|
||||
'uri' => '/cgi-bin/keepalived.cgi',
|
||||
'title' => "$Lang::tr{'keepalived'}",
|
||||
'enabled' => 1,
|
||||
};
|
||||
$subipfire->{'99.help'} = {'caption' => $Lang::tr{'help'},
|
||||
'uri' => '/cgi-bin/help.cgi',
|
||||
'title' => "$Lang::tr{'help'}",
|
||||
|
||||
@@ -9,15 +9,20 @@
|
||||
'enabled' => 1
|
||||
};
|
||||
$sublogs->{'21.xdpdns'} = {'caption' => $Lang::tr{'xdpdns log'},
|
||||
'uri' => '/cgi-bin/logs.cgi/xdpdnslog.dat',
|
||||
'title' => "$Lang::tr{'xdpdns log'}",
|
||||
'enabled' => 1
|
||||
};
|
||||
'uri' => '/cgi-bin/logs.cgi/xdpdnslog.dat',
|
||||
'title' => "$Lang::tr{'xdpdns log'}",
|
||||
'enabled' => 1
|
||||
};
|
||||
$sublogs->{'22.xdpsni'} = {'caption' => $Lang::tr{'xdpsni log'},
|
||||
'uri' => '/cgi-bin/logs.cgi/xdpsnilog.dat',
|
||||
'title' => "$Lang::tr{'xdpsni log'}",
|
||||
'enabled' => 1
|
||||
};
|
||||
'uri' => '/cgi-bin/logs.cgi/xdpsnilog.dat',
|
||||
'title' => "$Lang::tr{'xdpsni log'}",
|
||||
'enabled' => 1
|
||||
};
|
||||
$sublogs->{'23.wireguard'} = {'caption' => $Lang::tr{'wg log'},
|
||||
'uri' => '/cgi-bin/logs.cgi/wireguardlog.dat',
|
||||
'title' => "$Lang::tr{'wg log'}",
|
||||
'enabled' => 1
|
||||
};
|
||||
$sublogs->{'30.proxy'} = {'caption' => $Lang::tr{'proxy logs'},
|
||||
'uri' => '/cgi-bin/logs.cgi/proxylog.dat',
|
||||
'title' => "$Lang::tr{'proxy logs'}",
|
||||
|
||||
5
config/menu/EX-mpfire.menu
Normal file
5
config/menu/EX-mpfire.menu
Normal file
@@ -0,0 +1,5 @@
|
||||
$subipfire->{'40.mpfire'} = {'caption' => $Lang::tr{'mpfire'},
|
||||
'uri' => '/cgi-bin/mpfire.cgi',
|
||||
'title' => $Lang::tr{'mpfire'},
|
||||
'enabled' => 1,
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
$subipfire->{'41.mympd'} = {'caption' => myMPD,
|
||||
'uri' => '/cgi-bin/mympd.cgi',
|
||||
'title' => myMPD,
|
||||
'enabled' => 1,
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
$subipfire->{'42.transmission'} = {'caption' => TransmissionBT,
|
||||
'uri' => '/cgi-bin/transmission.cgi',
|
||||
'title' => TransmissionBT,
|
||||
'enabled' => 1,
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
$subipfire->{'60.vdr'} = {'caption' => VDR,
|
||||
'uri' => '/cgi-bin/vdr.cgi',
|
||||
'title' => VDR,
|
||||
'enabled' => 1,
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
$subipfire->{'54.wlanap'} = {'caption' => $Lang::tr{'wlanap'},
|
||||
$subipfire->{'54.wlanap'} = {'caption' => WLanAP,
|
||||
'uri' => '/cgi-bin/wlanap.cgi',
|
||||
'title' => $Lang::tr{'wlanap'},
|
||||
'title' => WLanAP,
|
||||
'enabled' => 1,
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
##################### REQUIRED ###########################
|
||||
port "6600"
|
||||
music_directory "/var/mp3"
|
||||
playlist_directory "/var/ipfire/mpd"
|
||||
playlist_directory "/var/ipfire/mpfire"
|
||||
log_file "/var/log/mpd.log"
|
||||
pid_file "/var/run/mpd.pid"
|
||||
##########################################################
|
||||
@@ -18,7 +18,7 @@ pid_file "/var/run/mpd.pid"
|
||||
#
|
||||
# Location of DB file
|
||||
#
|
||||
db_file "/var/ipfire/mpd/db/mpd.db"
|
||||
db_file "/var/ipfire/mpfire/db/mpd.db"
|
||||
#
|
||||
# The state file (if set) will be a file
|
||||
# for storing all current information
|
||||
@@ -27,7 +27,7 @@ db_file "/var/ipfire/mpd/db/mpd.db"
|
||||
# to recreate your last MPD session after
|
||||
# restart.
|
||||
#
|
||||
state_file "/var/ipfire/mpd/mpd_state"
|
||||
state_file "/var/ipfire/mpfire/mpd_state"
|
||||
#
|
||||
##########################################################
|
||||
|
||||
@@ -104,6 +104,12 @@ audio_output {
|
||||
#
|
||||
audio_buffer_size "2048"
|
||||
#
|
||||
# This means exactly what it says, it will
|
||||
# buffer your file up to the percentage of
|
||||
# the buffer before it begins playing.
|
||||
#
|
||||
buffer_before_play "25%"
|
||||
#
|
||||
##########################################################
|
||||
|
||||
|
||||
@@ -183,6 +189,9 @@ connection_timeout "60"
|
||||
#
|
||||
filesystem_charset "UTF-8"
|
||||
#
|
||||
# The encoding that ID3v1 tags should be converted from.
|
||||
#
|
||||
id3v1_encoding "UTF-8"
|
||||
metadata_to_use "artist,album,title,track,name,comment,date,genre"
|
||||
#
|
||||
################################################################
|
||||
108
config/mpfire/mpfire.pl
Normal file
108
config/mpfire/mpfire.pl
Normal file
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/lang.pl";
|
||||
require "${General::swroot}/header.pl";
|
||||
|
||||
my $filename = "";
|
||||
my $debug = 0;
|
||||
|
||||
if ( `/etc/init.d/mpd status` =~/not running/ ){
|
||||
system("/etc/init.d/mpd start >/dev/null");
|
||||
}
|
||||
|
||||
if ($ARGV[0] eq 'scan') {
|
||||
if ($debug){print "Creating Database\n";}
|
||||
system("mpd --create-db >/dev/null");
|
||||
system("/etc/init.d/mpd restart >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'play') {
|
||||
&checkmute();
|
||||
&clearplaylist();
|
||||
if ($debug){print "Yes we are called and we will play $ARGV[1]\n";}
|
||||
system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'playadd') {
|
||||
if ($debug){print "Yes we are called and we will add $ARGV[1]\n";}
|
||||
system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'clearplaylist') {
|
||||
if ($debug){print "Deleting playlist\n";}
|
||||
&clearplaylist();
|
||||
}
|
||||
elsif ($ARGV[0] eq 'stop') {
|
||||
my $PID = 'cat /var/run/mpd.pid';
|
||||
if ($debug){print "Killing Process $PID\n";}
|
||||
system("mpc stop >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'volup') {
|
||||
if ($debug){print "Increasing Volume\n";}
|
||||
system("/usr/bin/amixer set Master $ARGV[1]%+ 2>/dev/null >/dev/null");
|
||||
system("/usr/bin/amixer set PCM $ARGV[1]%+ 2>/dev/null >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'voldown') {
|
||||
if ($debug){print "Decreasing Volume\n";}
|
||||
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
|
||||
system("/usr/bin/amixer set PCM $ARGV[1]%- 2>/dev/null >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'toggle') {
|
||||
system("mpc toggle >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'next') {
|
||||
if ($debug){print "Next Song\n";}
|
||||
system("mpc next >/dev/null[");
|
||||
}
|
||||
elsif ( $ARGV[0] eq 'prev' ) {
|
||||
if ($debug){print "Previous Song\n";}
|
||||
system("mpc prev >/dev/null");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'song') {
|
||||
my $song = `mpc \| head -2 | grep -v volume`;
|
||||
print $song;
|
||||
}
|
||||
elsif ($ARGV[0] eq 'stats') {
|
||||
my $song = `mpc stats | grep Songs`;
|
||||
print $song;
|
||||
}
|
||||
elsif ($ARGV[0] eq 'playweb') {
|
||||
&checkmute();
|
||||
&clearplaylist();
|
||||
if ($debug){print "Playing webstream $ARGV[1] \n";}
|
||||
system("mpc add http://$ARGV[1] >/dev/null && mpc play >/dev/null && sleep 1");
|
||||
}
|
||||
elsif ($ARGV[0] eq 'volume') {
|
||||
$temp = "Master - ";
|
||||
$temp .= `amixer get Master \| tail -2 \| awk '{ print \$2" "\$5 }'`;
|
||||
$temp .= "<break>PCM -";
|
||||
$temp .= `amixer get PCM \| tail -2 \| awk '{ print \$2" "\$5 }'`;
|
||||
print $temp;
|
||||
}
|
||||
|
||||
sub clearplaylist(){
|
||||
system("mpc clear >/dev/null");
|
||||
}
|
||||
|
||||
sub shuffle(){
|
||||
system("mpc random >/dev/null");
|
||||
}
|
||||
|
||||
sub checkplaylist(){
|
||||
my $Datei = "/var/ipfire/mpfire/playlist.m3u";
|
||||
my @Info = stat($Datei);
|
||||
if ( $Info[7] eq '' || $Info[7] eq '0' ){print "There is no playlist";exit(1);}
|
||||
}
|
||||
|
||||
sub checkmute(){
|
||||
$temp = `amixer get Master \| tail -2`;
|
||||
my @Master = split(/ /,$temp);
|
||||
$temp = `amixer get PCM \| tail -2`;
|
||||
my @PCM = split(/ /,$temp);
|
||||
if ( $PCM[7] =~ /off/ ){
|
||||
if ($debug){print "PCM was muted - umuting.\n";}
|
||||
system("amixer set PCM toggle >/dev/null");
|
||||
}
|
||||
if ( $Master[7] =~ /off/ ){
|
||||
if ($debug){print "Master was muted - umuting.\n";}
|
||||
system("amixer set Master toggle >/dev/null");
|
||||
}
|
||||
}
|
||||
675
config/mpfire/perl/Accessor.pm
Executable file
675
config/mpfire/perl/Accessor.pm
Executable file
@@ -0,0 +1,675 @@
|
||||
package Class::Accessor;
|
||||
require 5.00502;
|
||||
use strict;
|
||||
$Class::Accessor::VERSION = '0.31';
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Class::Accessor - Automated accessor generation
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
package Employee;
|
||||
use base qw(Class::Accessor);
|
||||
Employee->mk_accessors(qw(name role salary));
|
||||
|
||||
# Meanwhile, in a nearby piece of code!
|
||||
# Class::Accessor provides new().
|
||||
my $mp = Foo->new({ name => "Marty", role => "JAPH" });
|
||||
|
||||
my $job = $mp->role; # gets $mp->{role}
|
||||
$mp->salary(400000); # sets $mp->{salary} = 400000 (I wish)
|
||||
|
||||
# like my @info = @{$mp}{qw(name role)}
|
||||
my @info = $mp->get(qw(name role));
|
||||
|
||||
# $mp->{salary} = 400000
|
||||
$mp->set('salary', 400000);
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This module automagically generates accessors/mutators for your class.
|
||||
|
||||
Most of the time, writing accessors is an exercise in cutting and
|
||||
pasting. You usually wind up with a series of methods like this:
|
||||
|
||||
sub name {
|
||||
my $self = shift;
|
||||
if(@_) {
|
||||
$self->{name} = $_[0];
|
||||
}
|
||||
return $self->{name};
|
||||
}
|
||||
|
||||
sub salary {
|
||||
my $self = shift;
|
||||
if(@_) {
|
||||
$self->{salary} = $_[0];
|
||||
}
|
||||
return $self->{salary};
|
||||
}
|
||||
|
||||
# etc...
|
||||
|
||||
One for each piece of data in your object. While some will be unique,
|
||||
doing value checks and special storage tricks, most will simply be
|
||||
exercises in repetition. Not only is it Bad Style to have a bunch of
|
||||
repetitious code, but its also simply not lazy, which is the real
|
||||
tragedy.
|
||||
|
||||
If you make your module a subclass of Class::Accessor and declare your
|
||||
accessor fields with mk_accessors() then you'll find yourself with a
|
||||
set of automatically generated accessors which can even be
|
||||
customized!
|
||||
|
||||
The basic set up is very simple:
|
||||
|
||||
package My::Class;
|
||||
use base qw(Class::Accessor);
|
||||
My::Class->mk_accessors( qw(foo bar car) );
|
||||
|
||||
Done. My::Class now has simple foo(), bar() and car() accessors
|
||||
defined.
|
||||
|
||||
=head2 What Makes This Different?
|
||||
|
||||
What makes this module special compared to all the other method
|
||||
generating modules (L<"SEE ALSO">)? By overriding the get() and set()
|
||||
methods you can alter the behavior of the accessors class-wide. Also,
|
||||
the accessors are implemented as closures which should cost a bit less
|
||||
memory than most other solutions which generate a new method for each
|
||||
accessor.
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
my $obj = Class->new;
|
||||
my $obj = $other_obj->new;
|
||||
|
||||
my $obj = Class->new(\%fields);
|
||||
my $obj = $other_obj->new(\%fields);
|
||||
|
||||
Class::Accessor provides a basic constructor. It generates a
|
||||
hash-based object and can be called as either a class method or an
|
||||
object method.
|
||||
|
||||
It takes an optional %fields hash which is used to initialize the
|
||||
object (handy if you use read-only accessors). The fields of the hash
|
||||
correspond to the names of your accessors, so...
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Foo->mk_accessors('foo');
|
||||
|
||||
my $obj = Class->new({ foo => 42 });
|
||||
print $obj->foo; # 42
|
||||
|
||||
however %fields can contain anything, new() will shove them all into
|
||||
your object. Don't like it? Override it.
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my($proto, $fields) = @_;
|
||||
my($class) = ref $proto || $proto;
|
||||
|
||||
$fields = {} unless defined $fields;
|
||||
|
||||
# make a copy of $fields.
|
||||
bless {%$fields}, $class;
|
||||
}
|
||||
|
||||
=head2 mk_accessors
|
||||
|
||||
Class->mk_accessors(@fields);
|
||||
|
||||
This creates accessor/mutator methods for each named field given in
|
||||
@fields. Foreach field in @fields it will generate two accessors.
|
||||
One called "field()" and the other called "_field_accessor()". For
|
||||
example:
|
||||
|
||||
# Generates foo(), _foo_accessor(), bar() and _bar_accessor().
|
||||
Class->mk_accessors(qw(foo bar));
|
||||
|
||||
See L<CAVEATS AND TRICKS/"Overriding autogenerated accessors">
|
||||
for details.
|
||||
|
||||
=cut
|
||||
|
||||
sub mk_accessors {
|
||||
my($self, @fields) = @_;
|
||||
|
||||
$self->_mk_accessors('rw', @fields);
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
no strict 'refs';
|
||||
|
||||
sub _mk_accessors {
|
||||
my($self, $access, @fields) = @_;
|
||||
my $class = ref $self || $self;
|
||||
my $ra = $access eq 'rw' || $access eq 'ro';
|
||||
my $wa = $access eq 'rw' || $access eq 'wo';
|
||||
|
||||
foreach my $field (@fields) {
|
||||
my $accessor_name = $self->accessor_name_for($field);
|
||||
my $mutator_name = $self->mutator_name_for($field);
|
||||
if( $accessor_name eq 'DESTROY' or $mutator_name eq 'DESTROY' ) {
|
||||
$self->_carp("Having a data accessor named DESTROY in '$class' is unwise.");
|
||||
}
|
||||
if ($accessor_name eq $mutator_name) {
|
||||
my $accessor;
|
||||
if ($ra && $wa) {
|
||||
$accessor = $self->make_accessor($field);
|
||||
} elsif ($ra) {
|
||||
$accessor = $self->make_ro_accessor($field);
|
||||
} else {
|
||||
$accessor = $self->make_wo_accessor($field);
|
||||
}
|
||||
unless (defined &{"${class}::$accessor_name"}) {
|
||||
*{"${class}::$accessor_name"} = $accessor;
|
||||
}
|
||||
if ($accessor_name eq $field) {
|
||||
# the old behaviour
|
||||
my $alias = "_${field}_accessor";
|
||||
*{"${class}::$alias"} = $accessor unless defined &{"${class}::$alias"};
|
||||
}
|
||||
} else {
|
||||
if ($ra and not defined &{"${class}::$accessor_name"}) {
|
||||
*{"${class}::$accessor_name"} = $self->make_ro_accessor($field);
|
||||
}
|
||||
if ($wa and not defined &{"${class}::$mutator_name"}) {
|
||||
*{"${class}::$mutator_name"} = $self->make_wo_accessor($field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub follow_best_practice {
|
||||
my($self) = @_;
|
||||
my $class = ref $self || $self;
|
||||
*{"${class}::accessor_name_for"} = \&best_practice_accessor_name_for;
|
||||
*{"${class}::mutator_name_for"} = \&best_practice_mutator_name_for;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
=head2 mk_ro_accessors
|
||||
|
||||
Class->mk_ro_accessors(@read_only_fields);
|
||||
|
||||
Same as mk_accessors() except it will generate read-only accessors
|
||||
(ie. true accessors). If you attempt to set a value with these
|
||||
accessors it will throw an exception. It only uses get() and not
|
||||
set().
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Class->mk_ro_accessors(qw(foo bar));
|
||||
|
||||
# Let's assume we have an object $foo of class Foo...
|
||||
print $foo->foo; # ok, prints whatever the value of $foo->{foo} is
|
||||
$foo->foo(42); # BOOM! Naughty you.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
sub mk_ro_accessors {
|
||||
my($self, @fields) = @_;
|
||||
|
||||
$self->_mk_accessors('ro', @fields);
|
||||
}
|
||||
|
||||
=head2 mk_wo_accessors
|
||||
|
||||
Class->mk_wo_accessors(@write_only_fields);
|
||||
|
||||
Same as mk_accessors() except it will generate write-only accessors
|
||||
(ie. mutators). If you attempt to read a value with these accessors
|
||||
it will throw an exception. It only uses set() and not get().
|
||||
|
||||
B<NOTE> I'm not entirely sure why this is useful, but I'm sure someone
|
||||
will need it. If you've found a use, let me know. Right now its here
|
||||
for orthoginality and because its easy to implement.
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Class->mk_wo_accessors(qw(foo bar));
|
||||
|
||||
# Let's assume we have an object $foo of class Foo...
|
||||
$foo->foo(42); # OK. Sets $self->{foo} = 42
|
||||
print $foo->foo; # BOOM! Can't read from this accessor.
|
||||
|
||||
=cut
|
||||
|
||||
sub mk_wo_accessors {
|
||||
my($self, @fields) = @_;
|
||||
|
||||
$self->_mk_accessors('wo', @fields);
|
||||
}
|
||||
|
||||
=head1 DETAILS
|
||||
|
||||
An accessor generated by Class::Accessor looks something like
|
||||
this:
|
||||
|
||||
# Your foo may vary.
|
||||
sub foo {
|
||||
my($self) = shift;
|
||||
if(@_) { # set
|
||||
return $self->set('foo', @_);
|
||||
}
|
||||
else {
|
||||
return $self->get('foo');
|
||||
}
|
||||
}
|
||||
|
||||
Very simple. All it does is determine if you're wanting to set a
|
||||
value or get a value and calls the appropriate method.
|
||||
Class::Accessor provides default get() and set() methods which
|
||||
your class can override. They're detailed later.
|
||||
|
||||
=head2 follow_best_practice
|
||||
|
||||
In Damian's Perl Best Practices book he recommends separate get and set methods
|
||||
with the prefix set_ and get_ to make it explicit what you intend to do. If you
|
||||
want to create those accessor methods instead of the default ones, call:
|
||||
|
||||
__PACKAGE__->follow_best_practice
|
||||
|
||||
=head2 accessor_name_for / mutator_name_for
|
||||
|
||||
You may have your own crazy ideas for the names of the accessors, so you can
|
||||
make those happen by overriding C<accessor_name_for> and C<mutator_name_for> in
|
||||
your subclass. (I copied that idea from Class::DBI.)
|
||||
|
||||
=cut
|
||||
|
||||
sub best_practice_accessor_name_for {
|
||||
my ($class, $field) = @_;
|
||||
return "get_$field";
|
||||
}
|
||||
|
||||
sub best_practice_mutator_name_for {
|
||||
my ($class, $field) = @_;
|
||||
return "set_$field";
|
||||
}
|
||||
|
||||
sub accessor_name_for {
|
||||
my ($class, $field) = @_;
|
||||
return $field;
|
||||
}
|
||||
|
||||
sub mutator_name_for {
|
||||
my ($class, $field) = @_;
|
||||
return $field;
|
||||
}
|
||||
|
||||
=head2 Modifying the behavior of the accessor
|
||||
|
||||
Rather than actually modifying the accessor itself, it is much more
|
||||
sensible to simply override the two key methods which the accessor
|
||||
calls. Namely set() and get().
|
||||
|
||||
If you -really- want to, you can override make_accessor().
|
||||
|
||||
=head2 set
|
||||
|
||||
$obj->set($key, $value);
|
||||
$obj->set($key, @values);
|
||||
|
||||
set() defines how generally one stores data in the object.
|
||||
|
||||
override this method to change how data is stored by your accessors.
|
||||
|
||||
=cut
|
||||
|
||||
sub set {
|
||||
my($self, $key) = splice(@_, 0, 2);
|
||||
|
||||
if(@_ == 1) {
|
||||
$self->{$key} = $_[0];
|
||||
}
|
||||
elsif(@_ > 1) {
|
||||
$self->{$key} = [@_];
|
||||
}
|
||||
else {
|
||||
$self->_croak("Wrong number of arguments received");
|
||||
}
|
||||
}
|
||||
|
||||
=head2 get
|
||||
|
||||
$value = $obj->get($key);
|
||||
@values = $obj->get(@keys);
|
||||
|
||||
get() defines how data is retreived from your objects.
|
||||
|
||||
override this method to change how it is retreived.
|
||||
|
||||
=cut
|
||||
|
||||
sub get {
|
||||
my $self = shift;
|
||||
|
||||
if(@_ == 1) {
|
||||
return $self->{$_[0]};
|
||||
}
|
||||
elsif( @_ > 1 ) {
|
||||
return @{$self}{@_};
|
||||
}
|
||||
else {
|
||||
$self->_croak("Wrong number of arguments received");
|
||||
}
|
||||
}
|
||||
|
||||
=head2 make_accessor
|
||||
|
||||
$accessor = Class->make_accessor($field);
|
||||
|
||||
Generates a subroutine reference which acts as an accessor for the given
|
||||
$field. It calls get() and set().
|
||||
|
||||
If you wish to change the behavior of your accessors, try overriding
|
||||
get() and set() before you start mucking with make_accessor().
|
||||
|
||||
=cut
|
||||
|
||||
sub make_accessor {
|
||||
my ($class, $field) = @_;
|
||||
|
||||
# Build a closure around $field.
|
||||
return sub {
|
||||
my $self = shift;
|
||||
|
||||
if(@_) {
|
||||
return $self->set($field, @_);
|
||||
}
|
||||
else {
|
||||
return $self->get($field);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
=head2 make_ro_accessor
|
||||
|
||||
$read_only_accessor = Class->make_ro_accessor($field);
|
||||
|
||||
Generates a subroutine refrence which acts as a read-only accessor for
|
||||
the given $field. It only calls get().
|
||||
|
||||
Override get() to change the behavior of your accessors.
|
||||
|
||||
=cut
|
||||
|
||||
sub make_ro_accessor {
|
||||
my($class, $field) = @_;
|
||||
|
||||
return sub {
|
||||
my $self = shift;
|
||||
|
||||
if (@_) {
|
||||
my $caller = caller;
|
||||
$self->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
|
||||
}
|
||||
else {
|
||||
return $self->get($field);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
=head2 make_wo_accessor
|
||||
|
||||
$read_only_accessor = Class->make_wo_accessor($field);
|
||||
|
||||
Generates a subroutine refrence which acts as a write-only accessor
|
||||
(mutator) for the given $field. It only calls set().
|
||||
|
||||
Override set() to change the behavior of your accessors.
|
||||
|
||||
=cut
|
||||
|
||||
sub make_wo_accessor {
|
||||
my($class, $field) = @_;
|
||||
|
||||
return sub {
|
||||
my $self = shift;
|
||||
|
||||
unless (@_) {
|
||||
my $caller = caller;
|
||||
$self->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
|
||||
}
|
||||
else {
|
||||
return $self->set($field, @_);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
=head1 EXCEPTIONS
|
||||
|
||||
If something goes wrong Class::Accessor will warn or die by calling Carp::carp
|
||||
or Carp::croak. If you don't like this you can override _carp() and _croak() in
|
||||
your subclass and do whatever else you want.
|
||||
|
||||
=cut
|
||||
|
||||
use Carp ();
|
||||
|
||||
sub _carp {
|
||||
my ($self, $msg) = @_;
|
||||
Carp::carp($msg || $self);
|
||||
return;
|
||||
}
|
||||
|
||||
sub _croak {
|
||||
my ($self, $msg) = @_;
|
||||
Carp::croak($msg || $self);
|
||||
return;
|
||||
}
|
||||
|
||||
=head1 EFFICIENCY
|
||||
|
||||
Class::Accessor does not employ an autoloader, thus it is much faster
|
||||
than you'd think. Its generated methods incur no special penalty over
|
||||
ones you'd write yourself.
|
||||
|
||||
accessors:
|
||||
Rate Basic Average Fast Faster Direct
|
||||
Basic 189150/s -- -42% -51% -55% -89%
|
||||
Average 327679/s 73% -- -16% -22% -82%
|
||||
Fast 389212/s 106% 19% -- -8% -78%
|
||||
Faster 421646/s 123% 29% 8% -- -76%
|
||||
Direct 1771243/s 836% 441% 355% 320% --
|
||||
|
||||
mutators:
|
||||
Rate Basic Average Fast Faster Direct
|
||||
Basic 173769/s -- -34% -53% -59% -90%
|
||||
Average 263046/s 51% -- -29% -38% -85%
|
||||
Fast 371158/s 114% 41% -- -13% -78%
|
||||
Faster 425821/s 145% 62% 15% -- -75%
|
||||
Direct 1699081/s 878% 546% 358% 299% --
|
||||
|
||||
Class::Accessor::Fast is faster than methods written by an average programmer
|
||||
(where "average" is based on Schwern's example code).
|
||||
|
||||
Class::Accessor is slower than average, but more flexible.
|
||||
|
||||
Class::Accessor::Faster is even faster than Class::Accessor::Fast. It uses an
|
||||
array internally, not a hash. This could be a good or bad feature depending on
|
||||
your point of view.
|
||||
|
||||
Direct hash access is, of course, much faster than all of these, but it
|
||||
provides no encapsulation.
|
||||
|
||||
Of course, its not as simple as saying "Class::Accessor is slower than
|
||||
average". These are benchmarks for a simple accessor. If your accessors do
|
||||
any sort of complicated work (such as talking to a database or writing to a
|
||||
file) the time spent doing that work will quickly swamp the time spend just
|
||||
calling the accessor. In that case, Class::Accessor and the ones you write
|
||||
will be roughly the same speed.
|
||||
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Here's an example of generating an accessor for every public field of
|
||||
your class.
|
||||
|
||||
package Altoids;
|
||||
|
||||
use base qw(Class::Accessor Class::Fields);
|
||||
use fields qw(curiously strong mints);
|
||||
Altoids->mk_accessors( Altoids->show_fields('Public') );
|
||||
|
||||
sub new {
|
||||
my $proto = shift;
|
||||
my $class = ref $proto || $proto;
|
||||
return fields::new($class);
|
||||
}
|
||||
|
||||
my Altoids $tin = Altoids->new;
|
||||
|
||||
$tin->curiously('Curiouser and curiouser');
|
||||
print $tin->{curiously}; # prints 'Curiouser and curiouser'
|
||||
|
||||
|
||||
# Subclassing works, too.
|
||||
package Mint::Snuff;
|
||||
use base qw(Altoids);
|
||||
|
||||
my Mint::Snuff $pouch = Mint::Snuff->new;
|
||||
$pouch->strong('Blow your head off!');
|
||||
print $pouch->{strong}; # prints 'Blow your head off!'
|
||||
|
||||
|
||||
Here's a simple example of altering the behavior of your accessors.
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Foo->mk_accessor(qw(this that up down));
|
||||
|
||||
sub get {
|
||||
my $self = shift;
|
||||
|
||||
# Note every time someone gets some data.
|
||||
print STDERR "Getting @_\n";
|
||||
|
||||
$self->SUPER::get(@_);
|
||||
}
|
||||
|
||||
sub set {
|
||||
my ($self, $key) = splice(@_, 0, 2);
|
||||
|
||||
# Note every time someone sets some data.
|
||||
print STDERR "Setting $key to @_\n";
|
||||
|
||||
$self->SUPER::set($key, @_);
|
||||
}
|
||||
|
||||
|
||||
=head1 CAVEATS AND TRICKS
|
||||
|
||||
Class::Accessor has to do some internal wackiness to get its
|
||||
job done quickly and efficiently. Because of this, there's a few
|
||||
tricks and traps one must know about.
|
||||
|
||||
Hey, nothing's perfect.
|
||||
|
||||
=head2 Don't make a field called DESTROY
|
||||
|
||||
This is bad. Since DESTROY is a magical method it would be bad for us
|
||||
to define an accessor using that name. Class::Accessor will
|
||||
carp if you try to use it with a field named "DESTROY".
|
||||
|
||||
=head2 Overriding autogenerated accessors
|
||||
|
||||
You may want to override the autogenerated accessor with your own, yet
|
||||
have your custom accessor call the default one. For instance, maybe
|
||||
you want to have an accessor which checks its input. Normally, one
|
||||
would expect this to work:
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Foo->mk_accessors(qw(email this that whatever));
|
||||
|
||||
# Only accept addresses which look valid.
|
||||
sub email {
|
||||
my($self) = shift;
|
||||
my($email) = @_;
|
||||
|
||||
if( @_ ) { # Setting
|
||||
require Email::Valid;
|
||||
unless( Email::Valid->address($email) ) {
|
||||
carp("$email doesn't look like a valid address.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return $self->SUPER::email(@_);
|
||||
}
|
||||
|
||||
There's a subtle problem in the last example, and its in this line:
|
||||
|
||||
return $self->SUPER::email(@_);
|
||||
|
||||
If we look at how Foo was defined, it called mk_accessors() which
|
||||
stuck email() right into Foo's namespace. There *is* no
|
||||
SUPER::email() to delegate to! Two ways around this... first is to
|
||||
make a "pure" base class for Foo. This pure class will generate the
|
||||
accessors and provide the necessary super class for Foo to use:
|
||||
|
||||
package Pure::Organic::Foo;
|
||||
use base qw(Class::Accessor);
|
||||
Pure::Organic::Foo->mk_accessors(qw(email this that whatever));
|
||||
|
||||
package Foo;
|
||||
use base qw(Pure::Organic::Foo);
|
||||
|
||||
And now Foo::email() can override the generated
|
||||
Pure::Organic::Foo::email() and use it as SUPER::email().
|
||||
|
||||
This is probably the most obvious solution to everyone but me.
|
||||
Instead, what first made sense to me was for mk_accessors() to define
|
||||
an alias of email(), _email_accessor(). Using this solution,
|
||||
Foo::email() would be written with:
|
||||
|
||||
return $self->_email_accessor(@_);
|
||||
|
||||
instead of the expected SUPER::email().
|
||||
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself. That means either (a) the GNU General Public
|
||||
License or (b) the Artistic License.
|
||||
|
||||
=head2 ORIGINAL AUTHOR
|
||||
|
||||
Michael G Schwern <schwern@pobox.com>
|
||||
|
||||
=head2 THANKS
|
||||
|
||||
Liz and RUZ for performance tweaks.
|
||||
|
||||
Tels, for his big feature request/bug report.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Class::Accessor::Fast>
|
||||
|
||||
These are some modules which do similar things in different ways
|
||||
L<Class::Struct>, L<Class::Methodmaker>, L<Class::Generate>,
|
||||
L<Class::Class>, L<Class::Contract>
|
||||
|
||||
L<Class::DBI> for an example of this module in use.
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
94
config/mpfire/perl/Accessor/Fast.pm
Executable file
94
config/mpfire/perl/Accessor/Fast.pm
Executable file
@@ -0,0 +1,94 @@
|
||||
package Class::Accessor::Fast;
|
||||
use base 'Class::Accessor';
|
||||
use strict;
|
||||
$Class::Accessor::Fast::VERSION = '0.31';
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Class::Accessor::Fast - Faster, but less expandable, accessors
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor::Fast);
|
||||
|
||||
# The rest is the same as Class::Accessor but without set() and get().
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a faster but less expandable version of Class::Accessor.
|
||||
Class::Accessor's generated accessors require two method calls to accompish
|
||||
their task (one for the accessor, another for get() or set()).
|
||||
Class::Accessor::Fast eliminates calling set()/get() and does the access itself,
|
||||
resulting in a somewhat faster accessor.
|
||||
|
||||
The downside is that you can't easily alter the behavior of your
|
||||
accessors, nor can your subclasses. Of course, should you need this
|
||||
later, you can always swap out Class::Accessor::Fast for
|
||||
Class::Accessor.
|
||||
|
||||
Read the documentation for Class::Accessor for more info.
|
||||
|
||||
=cut
|
||||
|
||||
sub make_accessor {
|
||||
my($class, $field) = @_;
|
||||
|
||||
return sub {
|
||||
return $_[0]->{$field} if @_ == 1;
|
||||
return $_[0]->{$field} = $_[1] if @_ == 2;
|
||||
return (shift)->{$field} = \@_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub make_ro_accessor {
|
||||
my($class, $field) = @_;
|
||||
|
||||
return sub {
|
||||
return $_[0]->{$field} if @_ == 1;
|
||||
my $caller = caller;
|
||||
$_[0]->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub make_wo_accessor {
|
||||
my($class, $field) = @_;
|
||||
|
||||
return sub {
|
||||
if (@_ == 1) {
|
||||
my $caller = caller;
|
||||
$_[0]->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
|
||||
}
|
||||
else {
|
||||
return $_[0]->{$field} = $_[1] if @_ == 2;
|
||||
return (shift)->{$field} = \@_;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
=head1 EFFICIENCY
|
||||
|
||||
L<Class::Accessor/EFFICIENCY> for an efficiency comparison.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself. That means either (a) the GNU General Public
|
||||
License or (b) the Artistic License.
|
||||
|
||||
=head2 ORIGINAL AUTHOR
|
||||
|
||||
Michael G Schwern <schwern@pobox.com>
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Class::Accessor>
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
105
config/mpfire/perl/Accessor/Faster.pm
Executable file
105
config/mpfire/perl/Accessor/Faster.pm
Executable file
@@ -0,0 +1,105 @@
|
||||
package Class::Accessor::Faster;
|
||||
use base 'Class::Accessor';
|
||||
use strict;
|
||||
$Class::Accessor::Faster::VERSION = '0.31';
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Class::Accessor::Faster - Even faster, but less expandable, accessors
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
package Foo;
|
||||
use base qw(Class::Accessor::Faster);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a faster but less expandable version of Class::Accessor::Fast.
|
||||
|
||||
Class::Accessor's generated accessors require two method calls to accompish
|
||||
their task (one for the accessor, another for get() or set()).
|
||||
|
||||
Class::Accessor::Fast eliminates calling set()/get() and does the access itself,
|
||||
resulting in a somewhat faster accessor.
|
||||
|
||||
Class::Accessor::Faster uses an array reference underneath to be faster.
|
||||
|
||||
Read the documentation for Class::Accessor for more info.
|
||||
|
||||
=cut
|
||||
|
||||
my %slot;
|
||||
sub _slot {
|
||||
my($class, $field) = @_;
|
||||
my $n = $slot{$class}->{$field};
|
||||
return $n if defined $n;
|
||||
$n = keys %{$slot{$class}};
|
||||
$slot{$class}->{$field} = $n;
|
||||
return $n;
|
||||
}
|
||||
|
||||
sub new {
|
||||
my($proto, $fields) = @_;
|
||||
my($class) = ref $proto || $proto;
|
||||
my $self = bless [], $class;
|
||||
|
||||
$fields = {} unless defined $fields;
|
||||
for my $k (keys %$fields) {
|
||||
my $n = $class->_slot($k);
|
||||
$self->[$n] = $fields->{$k};
|
||||
}
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub make_accessor {
|
||||
my($class, $field) = @_;
|
||||
my $n = $class->_slot($field);
|
||||
return sub {
|
||||
return $_[0]->[$n] if @_ == 1;
|
||||
return $_[0]->[$n] = $_[1] if @_ == 2;
|
||||
return (shift)->[$n] = \@_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub make_ro_accessor {
|
||||
my($class, $field) = @_;
|
||||
my $n = $class->_slot($field);
|
||||
return sub {
|
||||
return $_[0]->[$n] if @_ == 1;
|
||||
my $caller = caller;
|
||||
$_[0]->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
sub make_wo_accessor {
|
||||
my($class, $field) = @_;
|
||||
my $n = $class->_slot($field);
|
||||
return sub {
|
||||
if (@_ == 1) {
|
||||
my $caller = caller;
|
||||
$_[0]->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
|
||||
} else {
|
||||
return $_[0]->[$n] = $_[1] if @_ == 2;
|
||||
return (shift)->[$n] = \@_;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself. That means either (a) the GNU General Public
|
||||
License or (b) the Artistic License.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Class::Accessor>
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
897
config/mpfire/perl/Audio/MPD.pm
Normal file
897
config/mpfire/perl/Audio/MPD.pm
Normal file
@@ -0,0 +1,897 @@
|
||||
#
|
||||
# This file is part of Audio::MPD
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Audio::MPD::Collection;
|
||||
use Audio::MPD::Common::Item;
|
||||
use Audio::MPD::Common::Stats;
|
||||
use Audio::MPD::Common::Status;
|
||||
use Audio::MPD::Playlist;
|
||||
use Encode;
|
||||
use IO::Socket;
|
||||
use Readonly;
|
||||
|
||||
|
||||
use base qw[ Class::Accessor::Fast Exporter ];
|
||||
__PACKAGE__->mk_accessors(
|
||||
qw[ _conntype _host _password _port _socket
|
||||
collection playlist version ] );
|
||||
|
||||
|
||||
our $VERSION = '0.19.1';
|
||||
|
||||
Readonly our $REUSE => 0;
|
||||
Readonly our $ONCE => 1;
|
||||
|
||||
our @EXPORT = qw[ $REUSE $ONCE ];
|
||||
|
||||
|
||||
#--
|
||||
# Constructor
|
||||
|
||||
#
|
||||
# my $mpd = Audio::MPD->new( [%opts] )
|
||||
#
|
||||
# This is the constructor for Audio::MPD. One can specify the following
|
||||
# options:
|
||||
# - hostname => $hostname : defaults to environment var MPD_HOST, then to 'localhost'
|
||||
# - port => $port : defaults to env var MPD_PORT, then to 6600
|
||||
# - password => $password : defaults to env var MPD_PASSWORD, then to ''
|
||||
# - conntype => $type : how the connection to mpd server is handled. it can be
|
||||
# either $REUSE: reuse the same connection
|
||||
# or $ONCE: open a new connection per command (default)
|
||||
#
|
||||
sub new {
|
||||
my ($class, %opts) = @_;
|
||||
|
||||
# use mpd defaults.
|
||||
my ($default_password, $default_host) = split( '@', $ENV{MPD_HOST} )
|
||||
if exists $ENV{MPD_HOST} && $ENV{MPD_HOST} =~ /@/;
|
||||
my $host = $opts{host} || $default_host || $ENV{MPD_HOST} || 'localhost';
|
||||
my $port = $opts{port} || $ENV{MPD_PORT} || '6600';
|
||||
my $password = $opts{password} || $ENV{MPD_PASSWORD} || $default_password || '';
|
||||
|
||||
# create & bless the object.
|
||||
my $self = {
|
||||
_host => $host,
|
||||
_port => $port,
|
||||
_password => $password,
|
||||
_conntype => exists $opts{conntype} ? $opts{conntype} : $REUSE,
|
||||
};
|
||||
bless $self, $class;
|
||||
|
||||
# create the connection if conntype is set to $REUSE
|
||||
$self->_connect_to_mpd_server if $self->_conntype == $REUSE;
|
||||
|
||||
|
||||
# create the helper objects and store them.
|
||||
$self->collection( Audio::MPD::Collection->new($self) );
|
||||
$self->playlist ( Audio::MPD::Playlist->new($self) );
|
||||
|
||||
# try to issue a ping to test connection - this can die.
|
||||
$self->ping;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# Private methods
|
||||
|
||||
|
||||
#
|
||||
# $mpd->_connect_to_mpd_server;
|
||||
#
|
||||
# This method connects to the mpd server. It can die on several conditions:
|
||||
# - if the server cannot be reached,
|
||||
# - if it's not an mpd server,
|
||||
# - or if the password is incorrect,
|
||||
#
|
||||
sub _connect_to_mpd_server {
|
||||
my ($self) = @_;
|
||||
|
||||
# try to connect to mpd.
|
||||
my $socket = IO::Socket::INET->new(
|
||||
PeerAddr => $self->_host,
|
||||
PeerPort => $self->_port,
|
||||
)
|
||||
or die "Could not create socket: $!\n";
|
||||
|
||||
# parse version information.
|
||||
my $line = $socket->getline;
|
||||
chomp $line;
|
||||
die "Not a mpd server - welcome string was: [$line]\n"
|
||||
if $line !~ /^OK MPD (.+)$/;
|
||||
$self->version($1);
|
||||
|
||||
# send password.
|
||||
if ( $self->_password ) {
|
||||
$socket->print( 'password ' . encode('utf-8', $self->_password) . "\n" );
|
||||
$line = $socket->getline;
|
||||
die $line if $line =~ s/^ACK //;
|
||||
}
|
||||
|
||||
# save socket
|
||||
$self->_socket($socket);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @result = $mpd->_send_command( $command );
|
||||
#
|
||||
# This method is central to the module. It is responsible for interacting with
|
||||
# mpd by sending the $command and reading output - that will be returned as an
|
||||
# array of chomped lines (status line will not be returned).
|
||||
#
|
||||
# This method can die on several conditions:
|
||||
# - if the server cannot be reached,
|
||||
# - if it's not an mpd server,
|
||||
# - if the password is incorrect,
|
||||
# - or if the command is an invalid mpd command.
|
||||
# In the latter case, the mpd error message will be returned.
|
||||
#
|
||||
sub _send_command {
|
||||
my ($self, $command) = @_;
|
||||
|
||||
$self->_connect_to_mpd_server if $self->_conntype == $ONCE;
|
||||
my $socket = $self->_socket;
|
||||
|
||||
# ok, now we're connected - let's issue the command.
|
||||
$socket->print( encode('utf-8', $command) );
|
||||
my @output;
|
||||
while (defined ( my $line = $socket->getline ) ) {
|
||||
chomp $line;
|
||||
die $line if $line =~ s/^ACK //; # oops - error.
|
||||
last if $line =~ /^OK/; # end of output.
|
||||
push @output, decode('utf-8', $line);
|
||||
}
|
||||
|
||||
# close the socket.
|
||||
$socket->close if $self->_conntype == $ONCE;
|
||||
|
||||
return @output;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @items = $mpd->_cooked_command_as_items( $command );
|
||||
#
|
||||
# Lots of Audio::MPD methods are using _send_command() and then parse the
|
||||
# output as a collection of AMC::Item. This method is meant to factorize
|
||||
# this code, and will parse the raw output of _send_command() in a cooked
|
||||
# list of items.
|
||||
#
|
||||
sub _cooked_command_as_items {
|
||||
my ($self, $command) = @_;
|
||||
|
||||
my @lines = $self->_send_command($command);
|
||||
my (@items, %param);
|
||||
|
||||
# parse lines in reverse order since "file:" or "directory:" lines
|
||||
# come first. therefore, let's first store every other parameter,
|
||||
# and the last line will trigger the object creation.
|
||||
# of course, since we want to preserve the playlist order, this means
|
||||
# that we're going to unshift the objects instead of push.
|
||||
foreach my $line (reverse @lines) {
|
||||
my ($k,$v) = split /:\s/, $line, 2;
|
||||
$param{$k} = $v;
|
||||
next unless $k eq 'file' || $k eq 'directory' || $k eq 'playlist'; # last param of item
|
||||
unshift @items, Audio::MPD::Common::Item->new(%param);
|
||||
%param = ();
|
||||
}
|
||||
|
||||
return @items;
|
||||
}
|
||||
|
||||
|
||||
sub _cooked_command_as_filename {
|
||||
my ($self, $command) = @_;
|
||||
|
||||
my @lines = $self->_send_command($command);
|
||||
my (@items, %param);
|
||||
|
||||
# parse lines in reverse order since "file:" or "directory:" lines
|
||||
# come first. therefore, let's first store every other parameter,
|
||||
# and the last line will trigger the object creation.
|
||||
# of course, since we want to preserve the playlist order, this means
|
||||
# that we're going to unshift the objects instead of push.
|
||||
foreach my $line (@lines) {
|
||||
my ($k,$v) = split /:\s/, $line, 2;
|
||||
if ( $k eq 'file'){$param{$k} = $v;}
|
||||
unshift @items, $param{'file'};
|
||||
%param = ();
|
||||
}
|
||||
|
||||
return @items;
|
||||
}
|
||||
|
||||
#
|
||||
# my %hash = $mpd->_cooked_command_as_kv( $command );
|
||||
#
|
||||
# Lots of Audio::MPD methods are using _send_command() and then parse the
|
||||
# output to get a list of key / value (with the colon ":" acting as separator).
|
||||
# This method is meant to factorize this code, and will parse the raw output
|
||||
# of _send_command() in a cooked hash.
|
||||
#
|
||||
sub _cooked_command_as_kv {
|
||||
my ($self, $command) = @_;
|
||||
my %hash =
|
||||
map { split(/:\s/, $_, 2) }
|
||||
$self->_send_command($command);
|
||||
return %hash;
|
||||
}
|
||||
|
||||
#
|
||||
# my @list = $mpd->_cooked_command_strip_first_field( $command );
|
||||
#
|
||||
# Lots of Audio::MPD methods are using _send_command() and then parse the
|
||||
# output to remove the first field (with the colon ":" acting as separator).
|
||||
# This method is meant to factorize this code, and will parse the raw output
|
||||
# of _send_command() in a cooked list of strings.
|
||||
#
|
||||
sub _cooked_command_strip_first_field {
|
||||
my ($self, $command) = @_;
|
||||
|
||||
my @list =
|
||||
map { ( split(/:\s+/, $_, 2) )[1] }
|
||||
$self->_send_command($command);
|
||||
return @list;
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# Public methods
|
||||
|
||||
# -- MPD interaction: general commands
|
||||
|
||||
#
|
||||
# $mpd->ping;
|
||||
#
|
||||
# Sends a ping command to the mpd server.
|
||||
#
|
||||
sub ping {
|
||||
my ($self) = @_;
|
||||
$self->_send_command( "ping\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $version = $mpd->version;
|
||||
#
|
||||
# Return version of MPD server's connected.
|
||||
#
|
||||
# sub version {} # implemented as an accessor.
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# $mpd->kill;
|
||||
#
|
||||
# Send a message to the MPD server telling it to shut down.
|
||||
#
|
||||
sub kill {
|
||||
my ($self) = @_;
|
||||
$self->_send_command("kill\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->password( [$password] )
|
||||
#
|
||||
# Change password used to communicate with MPD server to $password.
|
||||
# Empty string is assumed if $password is not supplied.
|
||||
#
|
||||
sub password {
|
||||
my ($self, $passwd) = @_;
|
||||
$passwd ||= '';
|
||||
$self->_password($passwd);
|
||||
$self->ping; # ping sends a command, and thus the password is sent
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->updatedb( [$path] );
|
||||
#
|
||||
# Force mpd to rescan its collection. If $path (relative to MPD's music
|
||||
# directory) is supplied, MPD will only scan it - otherwise, MPD will rescan
|
||||
# its whole collection.
|
||||
#
|
||||
sub updatedb {
|
||||
my ($self, $path) = @_;
|
||||
$path ||= '';
|
||||
$self->_send_command("update $path\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @handlers = $mpd->urlhandlers;
|
||||
#
|
||||
# Return an array of supported URL schemes.
|
||||
#
|
||||
sub urlhandlers {
|
||||
my ($self) = @_;
|
||||
return $self->_cooked_command_strip_first_field("urlhandlers\n");
|
||||
}
|
||||
|
||||
|
||||
# -- MPD interaction: handling volume & output
|
||||
|
||||
#
|
||||
# $mpd->volume( [+][-]$volume );
|
||||
#
|
||||
# Sets the audio output volume percentage to absolute $volume.
|
||||
# If $volume is prefixed by '+' or '-' then the volume is changed relatively
|
||||
# by that value.
|
||||
#
|
||||
sub volume {
|
||||
my ($self, $volume) = @_;
|
||||
|
||||
if ($volume =~ /^(-|\+)(\d+)/ ) {
|
||||
my $current = $self->status->volume;
|
||||
$volume = $1 eq '+' ? $current + $2 : $current - $2;
|
||||
}
|
||||
$self->_send_command("setvol $volume\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->output_enable( $output );
|
||||
#
|
||||
# Enable the specified audio output. $output is the ID of the audio output.
|
||||
#
|
||||
sub output_enable {
|
||||
my ($self, $output) = @_;
|
||||
$self->_send_command("enableoutput $output\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->output_disable( $output );
|
||||
#
|
||||
# Disable the specified audio output. $output is the ID of the audio output.
|
||||
#
|
||||
sub output_disable {
|
||||
my ($self, $output) = @_;
|
||||
$self->_send_command("disableoutput $output\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
# -- MPD interaction: retrieving info from current state
|
||||
|
||||
#
|
||||
# $mpd->stats;
|
||||
#
|
||||
# Return an AMC::Stats object with the current statistics of MPD.
|
||||
#
|
||||
sub stats {
|
||||
my ($self) = @_;
|
||||
my %kv = $self->_cooked_command_as_kv( "stats\n" );
|
||||
return Audio::MPD::Common::Stats->new(\%kv);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $status = $mpd->status;
|
||||
#
|
||||
# Return an AMC::Status object with various information on current
|
||||
# MPD server settings. Check the embedded pod for more information on the
|
||||
# available accessors.
|
||||
#
|
||||
sub status {
|
||||
my ($self) = @_;
|
||||
my %kv = $self->_cooked_command_as_kv( "status\n" );
|
||||
my $status = Audio::MPD::Common::Status->new( \%kv );
|
||||
return $status;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $song = $mpd->current;
|
||||
#
|
||||
# Return an AMC::Item::Song representing the song currently playing.
|
||||
#
|
||||
sub current {
|
||||
my ($self) = @_;
|
||||
my ($item) = $self->_cooked_command_as_items("currentsong\n");
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $song = $mpd->song( [$song] )
|
||||
#
|
||||
# Return an AMC::Item::Song representing the song number $song.
|
||||
# If $song is not supplied, returns the current song.
|
||||
#
|
||||
sub song {
|
||||
my ($self, $song) = @_;
|
||||
return $self->current unless defined $song;
|
||||
my ($item) = $self->_cooked_command_as_items("playlistinfo $song\n");
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $song = $mpd->songid( [$songid] )
|
||||
#
|
||||
# Return an AMC::Item::Song representing the song with id $songid.
|
||||
# If $songid is not supplied, returns the current song.
|
||||
#
|
||||
sub songid {
|
||||
my ($self, $songid) = @_;
|
||||
return $self->current unless defined $songid;
|
||||
my ($item) = $self->_cooked_command_as_items("playlistid $songid\n");
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
||||
# -- MPD interaction: altering settings
|
||||
|
||||
#
|
||||
# $mpd->repeat( [$repeat] );
|
||||
#
|
||||
# Set the repeat mode to $repeat (1 or 0). If $repeat is not specified then
|
||||
# the repeat mode is toggled.
|
||||
#
|
||||
sub repeat {
|
||||
my ($self, $mode) = @_;
|
||||
|
||||
$mode = not $self->status->repeat
|
||||
unless defined $mode; # toggle if no param
|
||||
$mode = $mode ? 1 : 0; # force integer
|
||||
$self->_send_command("repeat $mode\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->random( [$random] );
|
||||
#
|
||||
# Set the random mode to $random (1 or 0). If $random is not specified then
|
||||
# the random mode is toggled.
|
||||
#
|
||||
sub random {
|
||||
my ($self, $mode) = @_;
|
||||
|
||||
$mode = not $self->status->random
|
||||
unless defined $mode; # toggle if no param
|
||||
$mode = $mode ? 1 : 0; # force integer
|
||||
$self->_send_command("random $mode\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->fade( [$seconds] );
|
||||
#
|
||||
# Enable crossfading and set the duration of crossfade between songs. If
|
||||
# $seconds is not specified or $seconds is 0, then crossfading is disabled.
|
||||
#
|
||||
sub fade {
|
||||
my ($self, $value) = @_;
|
||||
$value ||= 0;
|
||||
$self->_send_command("crossfade $value\n");
|
||||
}
|
||||
|
||||
|
||||
# -- MPD interaction: controlling playback
|
||||
|
||||
#
|
||||
# $mpd->play( [$song] );
|
||||
#
|
||||
# Begin playing playlist at song number $song. If no argument supplied,
|
||||
# resume playing.
|
||||
#
|
||||
sub play {
|
||||
my ($self, $number) = @_;
|
||||
$number = '' unless defined $number;
|
||||
$self->_send_command("play $number\n");
|
||||
}
|
||||
|
||||
#
|
||||
# $mpd->playid( [$songid] );
|
||||
#
|
||||
# Begin playing playlist at song ID $songid. If no argument supplied,
|
||||
# resume playing.
|
||||
#
|
||||
sub playid {
|
||||
my ($self, $number) = @_;
|
||||
$number ||= '';
|
||||
$self->_send_command("playid $number\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->pause( [$sate] );
|
||||
#
|
||||
# Pause playback. If $state is 0 then the current track is unpaused, if
|
||||
# $state is 1 then the current track is paused.
|
||||
#
|
||||
# Note that if $state is not given, pause state will be toggled.
|
||||
#
|
||||
sub pause {
|
||||
my ($self, $state) = @_;
|
||||
$state ||= ''; # default is to toggle
|
||||
$self->_send_command("pause $state\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->stop;
|
||||
#
|
||||
# Stop playback.
|
||||
#
|
||||
sub stop {
|
||||
my ($self) = @_;
|
||||
$self->_send_command("stop\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->next;
|
||||
#
|
||||
# Play next song in playlist.
|
||||
#
|
||||
sub next {
|
||||
my ($self) = @_;
|
||||
$self->_send_command("next\n");
|
||||
}
|
||||
|
||||
#
|
||||
# $mpd->prev;
|
||||
#
|
||||
# Play previous song in playlist.
|
||||
#
|
||||
sub prev {
|
||||
my($self) = shift;
|
||||
$self->_send_command("previous\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->seek( $time, [$song] );
|
||||
#
|
||||
# Seek to $time seconds in song number $song. If $song number is not specified
|
||||
# then the perl module will try and seek to $time in the current song.
|
||||
#
|
||||
sub seek {
|
||||
my ($self, $time, $song) = @_;
|
||||
$time ||= 0; $time = int $time;
|
||||
$song = $self->status->song if not defined $song; # seek in current song
|
||||
$self->_send_command( "seek $song $time\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $mpd->seekid( $time, [$songid] );
|
||||
#
|
||||
# Seek to $time seconds in song ID $songid. If $songid number is not specified
|
||||
# then the perl module will try and seek to $time in the current song.
|
||||
#
|
||||
sub seekid {
|
||||
my ($self, $time, $song) = @_;
|
||||
$time ||= 0; $time = int $time;
|
||||
$song = $self->status->songid if not defined $song; # seek in current song
|
||||
$self->_send_command( "seekid $song $time\n" );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
||||
__END__
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD - class to talk to MPD (Music Player Daemon) servers
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Audio::MPD;
|
||||
|
||||
my $mpd = Audio::MPD->new();
|
||||
$mpd->play();
|
||||
sleep 10;
|
||||
$mpd->next();
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Audio::MPD gives a clear object-oriented interface for talking to and
|
||||
controlling MPD (Music Player Daemon) servers. A connection to the MPD
|
||||
server is established as soon as a new Audio::MPD object is created.
|
||||
|
||||
Note that the module will by default connect to mpd before sending any
|
||||
command, and will disconnect after the command has been issued. This scheme
|
||||
is far from optimal, but allows us not to care about timeout disconnections.
|
||||
|
||||
B</!\> Note that Audio::MPD is using high-level, blocking sockets. This
|
||||
means that if the mpd server is slow, or hangs for whatever reason, or
|
||||
even crash abruptly, the program will be hung forever in this sub. The
|
||||
POE::Component::Client::MPD module is way safer - you're advised to use
|
||||
it instead of Audio::MPD. Or you can try to set C<conntype> to C<$REUSE>
|
||||
(see Audio::MPD constructor for more details), but you would be then on
|
||||
your own to deal with disconnections.
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( [%opts] )
|
||||
|
||||
This is the constructor for Audio::MPD. One can specify the following
|
||||
options:
|
||||
|
||||
=over 4
|
||||
|
||||
=item hostname => C<$hostname>
|
||||
|
||||
defaults to environment var MPD_HOST, then to 'localhost'. Note that
|
||||
MPD_HOST can be of the form password@host.
|
||||
|
||||
=item port => C<$port>
|
||||
|
||||
defaults to environment var MPD_PORT, then to 6600.
|
||||
|
||||
=item password => $password
|
||||
|
||||
defaults to environment var MPD_PASSWORD, then to ''.
|
||||
|
||||
=item conntype => $type
|
||||
|
||||
change how the connection to mpd server is handled. It can be either
|
||||
C<$REUSE> to reuse the same connection or C<$ONCE> to open a new
|
||||
connection per command (default)
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Controlling the server
|
||||
|
||||
=over 4
|
||||
|
||||
=item $mpd->ping()
|
||||
|
||||
Sends a ping command to the mpd server.
|
||||
|
||||
|
||||
=item $mpd->version()
|
||||
|
||||
Return the version number for the server we are connected to.
|
||||
|
||||
|
||||
=item $mpd->kill()
|
||||
|
||||
Send a message to the MPD server telling it to shut down.
|
||||
|
||||
|
||||
=item $mpd->password( [$password] )
|
||||
|
||||
Change password used to communicate with MPD server to $password.
|
||||
Empty string is assumed if $password is not supplied.
|
||||
|
||||
|
||||
=item $mpd->updatedb( [$path] )
|
||||
|
||||
Force mpd to recan its collection. If $path (relative to MPD's music directory)
|
||||
is supplied, MPD will only scan it - otherwise, MPD will rescan its whole
|
||||
collection.
|
||||
|
||||
|
||||
=item $mpd->urlhandlers()
|
||||
|
||||
Return an array of supported URL schemes.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Handling volume & output
|
||||
|
||||
=over 4
|
||||
|
||||
=item $mpd->volume( [+][-]$volume )
|
||||
|
||||
Sets the audio output volume percentage to absolute $volume.
|
||||
If $volume is prefixed by '+' or '-' then the volume is changed relatively
|
||||
by that value.
|
||||
|
||||
|
||||
=item $mpd->output_enable( $output )
|
||||
|
||||
Enable the specified audio output. $output is the ID of the audio output.
|
||||
|
||||
|
||||
=item $mpd->output_disable( $output )
|
||||
|
||||
Disable the specified audio output. $output is the ID of the audio output.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Retrieving info from current state
|
||||
|
||||
=over 4
|
||||
|
||||
=item $mpd->stats()
|
||||
|
||||
Return an C<Audio::MPD::Common::Stats> object with the current statistics
|
||||
of MPD. See the associated pod for more information.
|
||||
|
||||
|
||||
=item $mpd->status()
|
||||
|
||||
Return an C<Audio::MPD::Common::Status> object with various information on
|
||||
current MPD server settings. Check the embedded pod for more information on
|
||||
the available accessors.
|
||||
|
||||
|
||||
=item $mpd->current()
|
||||
|
||||
Return an C<Audio::MPD::Common::Item::Song> representing the song currently
|
||||
playing.
|
||||
|
||||
|
||||
=item $mpd->song( [$song] )
|
||||
|
||||
Return an C<Audio::MPD::Common::Item::Song> representing the song number
|
||||
C<$song>. If C<$song> is not supplied, returns the current song.
|
||||
|
||||
|
||||
=item $mpd->songid( [$songid] )
|
||||
|
||||
Return an C<Audio::MPD::Common::Item::Song> representing the song with id
|
||||
C<$songid>. If C<$songid> is not supplied, returns the current song.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Altering MPD settings
|
||||
|
||||
=over 4
|
||||
|
||||
=item $mpd->repeat( [$repeat] )
|
||||
|
||||
Set the repeat mode to $repeat (1 or 0). If $repeat is not specified then
|
||||
the repeat mode is toggled.
|
||||
|
||||
|
||||
=item $mpd->random( [$random] )
|
||||
|
||||
Set the random mode to $random (1 or 0). If $random is not specified then
|
||||
the random mode is toggled.
|
||||
|
||||
|
||||
=item $mpd->fade( [$seconds] )
|
||||
|
||||
Enable crossfading and set the duration of crossfade between songs.
|
||||
If $seconds is not specified or $seconds is 0, then crossfading is disabled.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Controlling playback
|
||||
|
||||
=over 4
|
||||
|
||||
=item $mpd->play( [$song] )
|
||||
|
||||
Begin playing playlist at song number $song. If no argument supplied,
|
||||
resume playing.
|
||||
|
||||
|
||||
=item $mpd->playid( [$songid] )
|
||||
|
||||
Begin playing playlist at song ID $songid. If no argument supplied,
|
||||
resume playing.
|
||||
|
||||
|
||||
=item $mpd->pause( [$state] )
|
||||
|
||||
Pause playback. If C<$state> is 0 then the current track is unpaused,
|
||||
if $state is 1 then the current track is paused.
|
||||
|
||||
Note that if C<$state> is not given, pause state will be toggled.
|
||||
|
||||
|
||||
=item $mpd->stop()
|
||||
|
||||
Stop playback.
|
||||
|
||||
|
||||
=item $mpd->next()
|
||||
|
||||
Play next song in playlist.
|
||||
|
||||
|
||||
=item $mpd->prev()
|
||||
|
||||
Play previous song in playlist.
|
||||
|
||||
|
||||
=item $mpd->seek( $time, [$song])
|
||||
|
||||
Seek to $time seconds in song number $song. If $song number is not specified
|
||||
then the perl module will try and seek to $time in the current song.
|
||||
|
||||
|
||||
=item $mpd->seekid( $time, $songid )
|
||||
|
||||
Seek to $time seconds in song ID $songid. If $song number is not specified
|
||||
then the perl module will try and seek to $time in the current song.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Searching the collection
|
||||
|
||||
To search the collection, use the C<collection()> accessor, returning the
|
||||
associated C<Audio::MPD::Collection> object. You will then be able to call:
|
||||
|
||||
$mpd->collection->random_song();
|
||||
|
||||
See C<Audio::MPD::Collection> documentation for more details on available
|
||||
methods.
|
||||
|
||||
|
||||
=head2 Handling the playlist
|
||||
|
||||
To update the playlist, use the C<playlist()> accessor, returning the
|
||||
associated C<Audio::MPD::Playlist> object. You will then be able to call:
|
||||
|
||||
$mpd->playlist->clear;
|
||||
|
||||
See C<Audio::MPD::Playlist> documentation for more details on available
|
||||
methods.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
You can find more information on the mpd project on its homepage at
|
||||
L<http://www.musicpd.org>, or its wiki L<http://mpd.wikia.com>.
|
||||
|
||||
Regarding this Perl module, you can report bugs on CPAN via
|
||||
L<http://rt.cpan.org/Public/Bug/Report.html?Queue=Audio-MPD>.
|
||||
|
||||
Audio::MPD development takes place on <audio-mpd@googlegroups.com>: feel free
|
||||
to join us. (use L<http://groups.google.com/group/audio-mpd> to sign in). Our
|
||||
subversion repository is located at L<https://svn.musicpd.org>.
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
Original code by Tue Abrahamsen C<< <tue.abrahamsen at gmail.com> >>,
|
||||
documented by Nicholas J. Humfrey C<< <njh at aelius.com> >>.
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2005 Tue Abrahamsen, all rights reserved.
|
||||
Copyright (c) 2006 Nicolas J. Humfrey, all rights reserved.
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
594
config/mpfire/perl/Audio/MPD/Collection.pm
Normal file
594
config/mpfire/perl/Audio/MPD/Collection.pm
Normal file
@@ -0,0 +1,594 @@
|
||||
#
|
||||
# This file is part of Audio::MPD
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Collection;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Scalar::Util qw[ weaken ];
|
||||
|
||||
use base qw[ Class::Accessor::Fast ];
|
||||
__PACKAGE__->mk_accessors( qw[ _mpd ] );
|
||||
|
||||
|
||||
#our ($VERSION) = '$Rev: 5284 $' =~ /(\d+)/;
|
||||
|
||||
|
||||
#--
|
||||
# Constructor
|
||||
|
||||
#
|
||||
# my $collection = Audio::MPD::Collection->new( $mpd );
|
||||
#
|
||||
# This will create the object, holding a back-reference to the Audio::MPD
|
||||
# object itself (for communication purposes). But in order to play safe and
|
||||
# to free the memory in time, this reference is weakened.
|
||||
#
|
||||
# Note that you're not supposed to call this constructor yourself, an
|
||||
# Audio::MPD::Collection is automatically created for you during the creation
|
||||
# of an Audio::MPD object.
|
||||
#
|
||||
sub new {
|
||||
my ($pkg, $mpd) = @_;
|
||||
|
||||
my $self = { _mpd => $mpd };
|
||||
weaken( $self->{_mpd} );
|
||||
bless $self, $pkg;
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# Public methods
|
||||
|
||||
# -- Collection: retrieving songs & directories
|
||||
|
||||
#
|
||||
# my @items = $collection->all_items( [$path] );
|
||||
#
|
||||
# Return *all* AMC::Items (both songs & directories) currently known
|
||||
# by mpd.
|
||||
#
|
||||
# If $path is supplied (relative to mpd root), restrict the retrieval to
|
||||
# songs and dirs in this directory.
|
||||
#
|
||||
sub all_items {
|
||||
my ($self, $path) = @_;
|
||||
$path ||= '';
|
||||
$path =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[listallinfo "$path"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @items = $collection->all_items_simple( [$path] );
|
||||
#
|
||||
# Return *all* AMC::Items (both songs & directories) currently known
|
||||
# by mpd.
|
||||
#
|
||||
# If $path is supplied (relative to mpd root), restrict the retrieval to
|
||||
# songs and dirs in this directory.
|
||||
#
|
||||
# /!\ Warning: the AMC::Item::Song objects will only have their tag
|
||||
# file filled. Any other tag will be empty, so don't use this sub for any
|
||||
# other thing than a quick scan!
|
||||
#
|
||||
sub all_items_simple {
|
||||
my ($self, $path) = @_;
|
||||
$path ||= '';
|
||||
$path =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[listall "$path"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @items = $collection->items_in_dir( [$path] );
|
||||
#
|
||||
# Return the items in the given $path. If no $path supplied, do it on mpd's
|
||||
# root directory.
|
||||
#
|
||||
# Note that this sub does not work recusrively on all directories.
|
||||
#
|
||||
sub items_in_dir {
|
||||
my ($self, $path) = @_;
|
||||
$path ||= '';
|
||||
$path =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[lsinfo "$path"\n] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
# -- Collection: retrieving the whole collection
|
||||
|
||||
#
|
||||
# my @songs = $collection->all_songs( [$path] );
|
||||
#
|
||||
# Return *all* AMC::Item::Songs currently known by mpd.
|
||||
#
|
||||
# If $path is supplied (relative to mpd root), restrict the retrieval to
|
||||
# songs and dirs in this directory.
|
||||
#
|
||||
sub all_songs {
|
||||
my ($self, $path) = @_;
|
||||
return grep { $_->isa('Audio::MPD::Common::Item::Song') } $self->all_items($path);
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @albums = $collection->all_albums;
|
||||
#
|
||||
# Return the list of all albums (strings) currently known by mpd.
|
||||
#
|
||||
sub all_albums {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list album\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @artists = $collection->all_artists;
|
||||
#
|
||||
# Return the list of all artists (strings) currently known by mpd.
|
||||
#
|
||||
sub all_artists {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list artist\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @titles = $collection->all_titles;
|
||||
#
|
||||
# Return the list of all titles (strings) currently known by mpd.
|
||||
#
|
||||
sub all_titles {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list title\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @genre = $collection->all_genre;
|
||||
#
|
||||
# Return the list of all genres (strings) currently known by mpd.
|
||||
#
|
||||
sub all_genre {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list genre\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @yers = $collection->all_years;
|
||||
#
|
||||
# Return the list of all years (strings) currently known by mpd.
|
||||
#
|
||||
sub all_years {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list date\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @pathes = $collection->all_pathes;
|
||||
#
|
||||
# Return the list of all pathes (strings) currently known by mpd.
|
||||
#
|
||||
sub all_pathes {
|
||||
my ($self) = @_;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( "list filename\n" );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @items = $collection->all_playlists;
|
||||
#
|
||||
# Return the list of playlists (strings) currently known by mpd.
|
||||
#
|
||||
sub all_playlists {
|
||||
my ($self) = @_;
|
||||
|
||||
return
|
||||
map { /^playlist: (.*)$/ ? ($1) : () }
|
||||
$self->_mpd->_send_command( "lsinfo\n" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
# -- Collection: picking songs
|
||||
|
||||
#
|
||||
# my $song = $collection->song( $path );
|
||||
#
|
||||
# Return the AMC::Item::Song which correspond to $path.
|
||||
#
|
||||
sub song {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
my ($item) = $self->_mpd->_cooked_command_as_items( qq[find filename "$what"\n] );
|
||||
return $item;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my $song = $collection->songs_with_filename_partial( $path );
|
||||
#
|
||||
# Return the AMC::Item::Songs containing $string in their path.
|
||||
#
|
||||
sub songs_with_filename_partial {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[search filename "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
# -- Collection: songs, albums & artists relations
|
||||
|
||||
#
|
||||
# my @albums = $collection->albums_by_artist($artist);
|
||||
#
|
||||
# Return all albums (strings) performed by $artist or where $artist
|
||||
# participated.
|
||||
#
|
||||
sub albums_by_artist {
|
||||
my ($self, $artist) = @_;
|
||||
$artist =~ s/"/\\"/g;
|
||||
return $self->_mpd->_cooked_command_strip_first_field( qq[list album "$artist"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_by_artist( $genre );
|
||||
#
|
||||
# Return all AMC::Item::Songs performed in $genre.
|
||||
#
|
||||
|
||||
sub songs_by_genre {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[find genre "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
sub filenames_by_artist {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[find artist "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
sub filenames_by_year {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[find date "$what"\n] );
|
||||
}
|
||||
|
||||
sub filenames_by_genre {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[find genre "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
sub filenames_by_album {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[find album "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_by_artist_partial( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs performed by an artist with $string
|
||||
# in her name.
|
||||
#
|
||||
sub songs_by_artist_partial {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[search artist "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_from_album( $album );
|
||||
#
|
||||
# Return all AMC::Item::Songs appearing in $album.
|
||||
#
|
||||
sub songs_from_album {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[find album "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_from_album_partial( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs appearing in album containing $string.
|
||||
#
|
||||
sub songs_from_album_partial {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[search album "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_with_title( $title );
|
||||
#
|
||||
# Return all AMC::Item::Songs which title is exactly $title.
|
||||
#
|
||||
sub songs_with_title {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[find title "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @songs = $collection->songs_with_title_partial( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs where $string is part of the title.
|
||||
#
|
||||
sub songs_with_title_partial {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_items( qq[search title "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
# my @songs = $collection->songs_with_title_partial_filename( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs where $string is part of the title.
|
||||
#
|
||||
sub songs_with_title_partial_filename {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[search title "$what"\n] );
|
||||
}
|
||||
|
||||
# my @songs = $collection->songs_with_artist_partial_filename( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs where $string is part of the artist.
|
||||
#
|
||||
sub songs_with_artist_partial_filename {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[search artist "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
# my @songs = $collection->songs_with_album_partial_filename( $string );
|
||||
#
|
||||
# Return all AMC::Item::Songs where $string is part of the album.
|
||||
#
|
||||
sub songs_with_album_partial_filename {
|
||||
my ($self, $what) = @_;
|
||||
$what =~ s/"/\\"/g;
|
||||
|
||||
return $self->_mpd->_cooked_command_as_filename( qq[search album "$what"\n] );
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Collection - an object to query MPD's collection
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $song = $mpd->collection->random_song;
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Collection> is a class meant to access & query MPD's
|
||||
collection. You will be able to use those high-level methods instead
|
||||
of using the low-level methods provided by mpd itself.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( $mpd )
|
||||
|
||||
This will create the object, holding a back-reference to the C<Audio::MPD>
|
||||
object itself (for communication purposes). But in order to play safe and
|
||||
to free the memory in time, this reference is weakened.
|
||||
|
||||
Note that you're not supposed to call this constructor yourself, an
|
||||
C<Audio::MPD::Collection> is automatically created for you during the creation
|
||||
of an C<Audio::MPD> object.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Retrieving songs & directories
|
||||
|
||||
=over 4
|
||||
|
||||
=item $coll->all_items( [$path] )
|
||||
|
||||
Return B<all> C<Audio::MPD::Common::Item>s (both songs & directories)
|
||||
currently known by mpd.
|
||||
|
||||
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
|
||||
songs and dirs in this directory.
|
||||
|
||||
|
||||
=item $coll->all_items_simple( [$path] )
|
||||
|
||||
Return B<all> C<Audio::MPD::Common::Item>s (both songs & directories)
|
||||
currently known by mpd.
|
||||
|
||||
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
|
||||
songs and dirs in this directory.
|
||||
|
||||
B</!\ Warning>: the C<Audio::MPD::Common::Item::Song> objects will only have
|
||||
their tag file filled. Any other tag will be empty, so don't use this sub for
|
||||
any other thing than a quick scan!
|
||||
|
||||
|
||||
=item $coll->items_in_dir( [$path] )
|
||||
|
||||
Return the items in the given C<$path>. If no C<$path> supplied, do it on
|
||||
mpd's root directory.
|
||||
|
||||
Note that this sub does not work recusrively on all directories.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Retrieving the whole collection
|
||||
|
||||
=over 4
|
||||
|
||||
=item $coll->all_songs( [$path] )
|
||||
|
||||
Return B<all> C<Audio::MPD::Common::Item::Song>s currently known by mpd.
|
||||
|
||||
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
|
||||
songs and dirs in this directory.
|
||||
|
||||
|
||||
=item $coll->all_albums()
|
||||
|
||||
Return the list of all albums (strings) currently known by mpd.
|
||||
|
||||
|
||||
=item $coll->all_artists()
|
||||
|
||||
Return the list of all artists (strings) currently known by mpd.
|
||||
|
||||
|
||||
=item $coll->all_titles()
|
||||
|
||||
Return the list of all song titles (strings) currently known by mpd.
|
||||
|
||||
|
||||
=item $coll->all_pathes()
|
||||
|
||||
Return the list of all pathes (strings) currently known by mpd.
|
||||
|
||||
|
||||
=item $coll->all_playlists()
|
||||
|
||||
Return the list of all playlists (strings) currently known by mpd.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Picking a song
|
||||
|
||||
=over 4
|
||||
|
||||
=item $coll->song( $path )
|
||||
|
||||
Return the C<Audio::MPD::Common::Item::Song> which correspond to C<$path>.
|
||||
|
||||
|
||||
=item $coll->songs_with_filename_partial( $path )
|
||||
|
||||
Return the C<Audio::MPD::Common::Item::Song>s containing $string in their path.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Songs, albums & artists relations
|
||||
|
||||
=over 4
|
||||
|
||||
=item $coll->albums_by_artist( $artist )
|
||||
|
||||
Return all albums (strings) performed by C<$artist> or where C<$artist>
|
||||
participated.
|
||||
|
||||
|
||||
=item $coll->songs_by_artist( $artist )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s performed by C<$artist>.
|
||||
|
||||
|
||||
=item $coll->songs_by_artist_partial( $string )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s performed by an artist with
|
||||
C<$string> in her name.
|
||||
|
||||
|
||||
=item $coll->songs_from_album( $album )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s appearing in C<$album>.
|
||||
|
||||
|
||||
=item $coll->songs_from_album_partial( $string )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s appearing in album containing C<$string>.
|
||||
|
||||
|
||||
=item $coll->songs_with_title( $title )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s which title is exactly C<$title>.
|
||||
|
||||
|
||||
=item $coll->songs_with_title_partial( $string )
|
||||
|
||||
Return all C<Audio::MPD::Common::Item::Song>s where C<$string> is part of the title.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Audio::MPD>
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
88
config/mpfire/perl/Audio/MPD/Common.pm
Normal file
88
config/mpfire/perl/Audio/MPD/Common.pm
Normal file
@@ -0,0 +1,88 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
our $VERSION = '0.1.2';
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common - a bunch of common helper classes for mpd
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Depending on whether you're using a POE-aware environment or not, people
|
||||
wanting to tinker with mpd (Music Player Daemon) will use either
|
||||
L<POE::Component::Client::MPD> or L<Audio::MPD>.
|
||||
|
||||
But even if the run-cores of those two modules differ completely, they
|
||||
are using the exact same common classes to represent the various mpd
|
||||
states and information.
|
||||
|
||||
Therefore, those common classes have been outsourced to
|
||||
L<Audio::MPD::Common>.
|
||||
|
||||
This module does not export any methods, but the dist provides the
|
||||
following classes that you can query with perldoc:
|
||||
|
||||
=over 4
|
||||
|
||||
=item o L<Audio::MPD::Common::Item>
|
||||
|
||||
=item o L<Audio::MPD::Common::Item::Directory>
|
||||
|
||||
=item o L<Audio::MPD::Common::Item::Playlist>
|
||||
|
||||
=item o L<Audio::MPD::Common::Item::Song>
|
||||
|
||||
=item o L<Audio::MPD::Common::Stats>
|
||||
|
||||
=item o L<Audio::MPD::Common::Status>
|
||||
|
||||
=item o L<Audio::MPD::Common::Time>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
Note that those modules should not be of any use outside the two mpd
|
||||
modules afore-mentioned.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
100
config/mpfire/perl/Audio/MPD/Common/Item.pm
Normal file
100
config/mpfire/perl/Audio/MPD/Common/Item.pm
Normal file
@@ -0,0 +1,100 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Item;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Audio::MPD::Common::Item::Directory;
|
||||
use Audio::MPD::Common::Item::Playlist;
|
||||
use Audio::MPD::Common::Item::Song;
|
||||
|
||||
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
|
||||
|
||||
#
|
||||
# constructor.
|
||||
#
|
||||
sub new {
|
||||
my ($pkg, %params) = @_;
|
||||
|
||||
# transform keys in lowercase.
|
||||
my %lowcase;
|
||||
@lowcase{ keys %params } = values %params;
|
||||
|
||||
return Audio::MPD::Common::Item::Song->new(\%lowcase) if exists $params{file};
|
||||
return Audio::MPD::Common::Item::Directory->new(\%lowcase) if exists $params{directory};
|
||||
return Audio::MPD::Common::Item::Playlist->new(\%lowcase) if exists $params{playlist};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Item - a generic collection item
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $item = Audio::MPD::Common::Item->new( %params );
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Common::Item> is a virtual class representing a generic
|
||||
item of mpd's collection. It can be either a song, a directory or a playlist.
|
||||
|
||||
Depending on the params given to C<new>, it will create and return an
|
||||
C<Audio::MPD::Common::Item::Song>, an C<Audio::MPD::Common::Item::Directory>
|
||||
or an C<Audio::MPD::Common::Playlist> object. Currently, the
|
||||
discrimination is done on the existence of the C<file> key of C<%params>.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
Note that the only sub worth it in this class is the constructor:
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( key => val [, key => val [, ...] ] )
|
||||
|
||||
Create and return either an C<Audio::MPD::Common::Item::Song>, an
|
||||
C<Audio::MPD::Common::Item::Directory> or an C<Audio::MPD::Common::Playlist>
|
||||
object, depending on the existence of a key C<file>, C<directory> or
|
||||
C<playlist> (respectively).
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
72
config/mpfire/perl/Audio/MPD/Common/Item/Directory.pm
Normal file
72
config/mpfire/perl/Audio/MPD/Common/Item/Directory.pm
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Item::Directory;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
|
||||
__PACKAGE__->mk_accessors( qw[ directory ] );
|
||||
|
||||
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Item::Directory - a directory object
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
print $item->directory . "\n";
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Common::Item::Directory> is more a placeholder for a
|
||||
hash ref with one pre-defined key, namely the directory name.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
This module only has a C<new()> constructor, which should only be called by
|
||||
C<Audio::MPD::Common::Item>'s constructor.
|
||||
|
||||
The only other public method is an accessor: directory().
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
72
config/mpfire/perl/Audio/MPD/Common/Item/Playlist.pm
Normal file
72
config/mpfire/perl/Audio/MPD/Common/Item/Playlist.pm
Normal file
@@ -0,0 +1,72 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Item::Playlist;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
|
||||
__PACKAGE__->mk_accessors( qw[ playlist ] );
|
||||
|
||||
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Item::Playlist - a playlist object
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
print $item->playlist . "\n";
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Common::Item::Playlist> is more a placeholder for a hash ref
|
||||
with one pre-defined key, namely the playlist name.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
This module only has a C<new()> constructor, which should only be called by
|
||||
C<Audio::MPD::Common::Item>'s constructor.
|
||||
|
||||
The only other public method is an accessor: playlist().
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
133
config/mpfire/perl/Audio/MPD/Common/Item/Song.pm
Normal file
133
config/mpfire/perl/Audio/MPD/Common/Item/Song.pm
Normal file
@@ -0,0 +1,133 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Item::Song;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use overload '""' => \&as_string;
|
||||
use Readonly;
|
||||
|
||||
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
|
||||
__PACKAGE__->mk_accessors( qw[ Album Artist file id pos Title Track time ] );
|
||||
|
||||
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
|
||||
|
||||
Readonly my $SEP => ' = ';
|
||||
|
||||
|
||||
#
|
||||
# my $str = $song->as_string;
|
||||
#
|
||||
# Return a string representing $song. This string will be;
|
||||
# - either "Album = Track = Artist = Title"
|
||||
# - or "Artist = Title"
|
||||
# - or "Title"
|
||||
# - or "file"
|
||||
# (in this order), depending on the existing tags of the song. The last
|
||||
# possibility always exist of course, since it's a path.
|
||||
#
|
||||
sub as_string {
|
||||
my ($self) = @_;
|
||||
|
||||
return $self->file unless defined $self->Title;
|
||||
my $str = $self->Title;
|
||||
return $str unless defined $self->Artist;
|
||||
$str = $self->Artist . $SEP . $str;
|
||||
return $str unless defined $self->Album && defined $self->Track;
|
||||
return join $SEP,
|
||||
$self->Album,
|
||||
$self->Track,
|
||||
$str;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Item::Song - a song object with some audio tags
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Common::Item::Song> is more a placeholder for a
|
||||
hash ref with some pre-defined keys, namely some audio tags.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
This module has a C<new()> constructor, which should only be called by
|
||||
C<Audio::MPD::Common::Item>'s constructor.
|
||||
|
||||
The only other public methods are the accessors - see below.
|
||||
|
||||
|
||||
=head2 Accessors
|
||||
|
||||
The following methods are the accessors to their respective named fields:
|
||||
C<Album()>, C<Artist()>, C<file()>, C<id>, C<pos>, C<Title()>, CTTrack()>,
|
||||
C<time()>. You can call them either with no arg to get the value, or with
|
||||
an arg to replace the current value.
|
||||
|
||||
|
||||
=head2 Methods
|
||||
|
||||
|
||||
=over 4
|
||||
|
||||
=item $song->as_string()
|
||||
|
||||
Return a string representing $song. This string will be:
|
||||
|
||||
=over 4
|
||||
|
||||
=item either "Album = Track = Artist = Title"
|
||||
|
||||
=item or "Artist = Title"
|
||||
|
||||
=item or "Title"
|
||||
|
||||
=item or "file"
|
||||
|
||||
=back
|
||||
|
||||
(in this order), depending on the existing tags of the song. The last
|
||||
possibility always exist of course, since it's a path.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
135
config/mpfire/perl/Audio/MPD/Common/Stats.pm
Normal file
135
config/mpfire/perl/Audio/MPD/Common/Stats.pm
Normal file
@@ -0,0 +1,135 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Stats;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use base qw[ Class::Accessor::Fast ];
|
||||
__PACKAGE__->mk_accessors
|
||||
( qw[ artists albums songs uptime playtime db_playtime db_update ] );
|
||||
|
||||
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Stats - class representing MPD stats
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
print $stats->artists;
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The MPD server maintains some general information. Those information can be
|
||||
queried with the mpd modules. Some of those information are served to you as
|
||||
an C<Audio::MPD::Common::Status> object.
|
||||
|
||||
Note that an C<Audio::MPD::Common::Stats> object does B<not> update itself
|
||||
regularly, and thus should be used immediately.
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( %kv )
|
||||
|
||||
The C<new()> method is the constructor for the C<Audio::MPD::Common::Stats>
|
||||
class.
|
||||
|
||||
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Stats>
|
||||
object directly - use the mpd modules instead.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Accessors
|
||||
|
||||
Once created, one can access to the following members of the object:
|
||||
|
||||
=over 4
|
||||
|
||||
=item $stats->artists()
|
||||
|
||||
Number of artists in the music database.
|
||||
|
||||
|
||||
=item $stats->albums()
|
||||
|
||||
Number of albums in the music database.
|
||||
|
||||
|
||||
=item $stats->songs()
|
||||
|
||||
Number of songs in the music database.
|
||||
|
||||
|
||||
=item $stats->uptime()
|
||||
|
||||
Daemon uptime (time since last startup) in seconds.
|
||||
|
||||
|
||||
=item $stats->playtime()
|
||||
|
||||
Time length of music played.
|
||||
|
||||
|
||||
=item $stats->db_playtime()
|
||||
|
||||
Sum of all song times in the music database.
|
||||
|
||||
|
||||
=item $stats->db_update()
|
||||
|
||||
Last database update in UNIX time.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
Please note that those accessors are read-only: changing a value will B<not>
|
||||
change the current settings of MPD server. Use the mpd modules to alter the
|
||||
settings.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
192
config/mpfire/perl/Audio/MPD/Common/Status.pm
Normal file
192
config/mpfire/perl/Audio/MPD/Common/Status.pm
Normal file
@@ -0,0 +1,192 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Status;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Audio::MPD::Common::Time;
|
||||
|
||||
use base qw[ Class::Accessor::Fast ];
|
||||
__PACKAGE__->mk_accessors
|
||||
( qw[ audio bitrate error playlist playlistlength random
|
||||
repeat song songid state time volume updating_db xfade ] );
|
||||
|
||||
#our ($VERSION) = '$Rev: 5865 $' =~ /(\d+)/;
|
||||
|
||||
|
||||
#--
|
||||
# Constructor
|
||||
|
||||
#
|
||||
# my $status = Audio::MPD::Common::Status->new( \%kv )
|
||||
#
|
||||
# The constructor for the class Audio::MPD::Common::Status. %kv is
|
||||
# a cooked output of what MPD server returns to the status command.
|
||||
#
|
||||
sub new {
|
||||
my ($class, $kv) = @_;
|
||||
my %kv = %$kv;
|
||||
$kv{time} = Audio::MPD::Common::Time->new( delete $kv{time} );
|
||||
bless \%kv, $class;
|
||||
return \%kv;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Status - class representing MPD status
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
print $status->bitrate;
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
The MPD server maintains some information on its current state. Those
|
||||
information can be queried with mpd modules. Some of those information
|
||||
are served to you as an C<Audio::MPD::Common::Status> object.
|
||||
|
||||
Note that an C<Audio::MPD::Common::Status> object does B<not> update
|
||||
itself regularly, and thus should be used immediately.
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( \%kv )
|
||||
|
||||
The C<new()> method is the constructor for the C<Audio::MPD::Common::Status>
|
||||
class.
|
||||
|
||||
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Status>
|
||||
object directly - use the mpd modules instead.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Accessors
|
||||
|
||||
Once created, one can access to the following members of the object:
|
||||
|
||||
=over 4
|
||||
|
||||
=item $status->audio()
|
||||
|
||||
A string with the sample rate of the song currently playing, number of bits
|
||||
of the output and number of channels (2 for stereo) - separated by a colon.
|
||||
|
||||
|
||||
=item $status->bitrate()
|
||||
|
||||
The instantaneous bitrate in kbps.
|
||||
|
||||
|
||||
=item $status->error()
|
||||
|
||||
May appear in special error cases, such as when disabling output.
|
||||
|
||||
|
||||
=item $status->playlist()
|
||||
|
||||
The playlist version number, that changes every time the playlist is updated.
|
||||
|
||||
|
||||
=item $status->playlistlength()
|
||||
|
||||
The number of songs in the playlist.
|
||||
|
||||
|
||||
=item $status->random()
|
||||
|
||||
Whether the playlist is read randomly or not.
|
||||
|
||||
|
||||
=item $status->repeat()
|
||||
|
||||
Whether the song is repeated or not.
|
||||
|
||||
|
||||
=item $status->song()
|
||||
|
||||
The offset of the song currently played in the playlist.
|
||||
|
||||
|
||||
=item $status->songid()
|
||||
|
||||
The song id (MPD id) of the song currently played.
|
||||
|
||||
|
||||
=item $status->state()
|
||||
|
||||
The state of MPD server. Either C<play>, C<stop> or C<pause>.
|
||||
|
||||
|
||||
=item $status->time()
|
||||
|
||||
An C<Audio::MPD::Common::Time> object, representing the time elapsed /
|
||||
remainging and total. See the associated pod for more details.
|
||||
|
||||
|
||||
=item $status->updating_db()
|
||||
|
||||
An integer, representing the current update job.
|
||||
|
||||
|
||||
=item $status->volume()
|
||||
|
||||
The current MPD volume - an integer between 0 and 100.
|
||||
|
||||
|
||||
=item $status->xfade()
|
||||
|
||||
The crossfade in seconds.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
Please note that those accessors are read-only: changing a value will B<not>
|
||||
change the current settings of MPD server. Use the mpd modules to alter the
|
||||
settings.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
186
config/mpfire/perl/Audio/MPD/Common/Time.pm
Normal file
186
config/mpfire/perl/Audio/MPD/Common/Time.pm
Normal file
@@ -0,0 +1,186 @@
|
||||
#
|
||||
# This file is part of Audio::MPD::Common
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Common::Time;
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use base qw[ Class::Accessor::Fast ];
|
||||
__PACKAGE__->mk_accessors
|
||||
( qw[ percent sofar left total
|
||||
sofar_secs sofar_mins seconds_sofar
|
||||
total_secs total_mins seconds_total
|
||||
left_secs left_mins seconds_left
|
||||
] );
|
||||
|
||||
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
|
||||
|
||||
|
||||
#--
|
||||
# Constructor
|
||||
|
||||
#
|
||||
# my $status = Audio::MPD::Common::Time->new( $time )
|
||||
#
|
||||
# The constructor for the class Audio::MPD::Common::Time. $time is
|
||||
# the time value (on the "time" line) of what the output MPD server
|
||||
# returns to the status command.
|
||||
#
|
||||
sub new {
|
||||
my ($class, $time) = @_;
|
||||
$time ||= '0:0';
|
||||
my ($seconds_sofar, $seconds_total) = split /:/, $time;
|
||||
my $seconds_left = $seconds_total - $seconds_sofar;
|
||||
my $percent = $seconds_total ? 100*$seconds_sofar/$seconds_total : 0;
|
||||
|
||||
# Parse the time so far
|
||||
my $sofar_mins = int( $seconds_sofar / 60 );
|
||||
my $sofar_secs = $seconds_sofar % 60;
|
||||
my $sofar = sprintf "%d:%02d", $sofar_mins, $sofar_secs;
|
||||
|
||||
# Parse the total time
|
||||
my $total_mins = int( $seconds_total / 60 );
|
||||
my $total_secs = $seconds_total % 60;
|
||||
my $total = sprintf "%d:%02d", $total_mins, $total_secs;
|
||||
|
||||
# Parse the time left
|
||||
my $left_mins = int( $seconds_left / 60 );
|
||||
my $left_secs = $seconds_left % 60;
|
||||
my $left = sprintf "%d:%02d", $left_mins, $left_secs;
|
||||
|
||||
|
||||
# create object
|
||||
my $self = {
|
||||
# time elapsed in seconds
|
||||
seconds_sofar => $seconds_sofar,
|
||||
seconds_left => $seconds_left,
|
||||
seconds_total => $seconds_total,
|
||||
|
||||
# cooked values
|
||||
sofar => $sofar,
|
||||
left => $left,
|
||||
total => $total,
|
||||
percent => sprintf("%.1f", $percent), # 1 decimal
|
||||
|
||||
# details
|
||||
sofar_secs => $sofar_secs,
|
||||
sofar_mins => $sofar_mins,
|
||||
total_secs => $total_secs,
|
||||
total_mins => $total_mins,
|
||||
left_secs => $left_secs,
|
||||
left_mins => $left_mins,
|
||||
};
|
||||
bless $self, $class;
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Common::Time - class representing time of current song
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $time = $status->time;
|
||||
print $time->sofar;
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Common::Status> returns some time information with the C<time()>
|
||||
accessor. This information relates to the elapsed time of the current song,
|
||||
as well as the remaining and total time. This information is encapsulated
|
||||
in an C<Audio::MPD::Common::Time> object.
|
||||
|
||||
Note that an C<Audio::MPD::Common::Time> object does B<not> update itself
|
||||
regularly, and thus should be used immediately.
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( $time )
|
||||
|
||||
The C<new()> method is the constructor for the C<Audio::MPD::Common::Time>
|
||||
class.
|
||||
|
||||
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Time>
|
||||
object directly - use the mpd modules instead.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Accessors
|
||||
|
||||
Once created, one can access the following members of the object:
|
||||
|
||||
=over 4
|
||||
|
||||
=item cooked values:
|
||||
|
||||
The C<sofar()>, C<left()> and C<total()> methods return the according values
|
||||
under the form C<minutes:seconds>. Note the existence of a C<percent()>
|
||||
method returning a percentage complete. (one decimal)
|
||||
|
||||
|
||||
=item values in seconds:
|
||||
|
||||
The C<seconds_sofar()>, C<seconds_left()> and C<seconds_total()> return the
|
||||
according values in seconds.
|
||||
|
||||
|
||||
=item detailled values:
|
||||
|
||||
If you want to cook your own value, then the following methods can help:
|
||||
C<sofar_secs()> and C<sofar_mins()> return the seconds and minutes elapsed.
|
||||
Same for C<left_secs()> and C<left_mins()> (time remaining), C<total_secs()>
|
||||
and C<total_mins()>. (total song length)
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
Please note that those accessors are read-only: changing a value will B<not>
|
||||
change the current settings of MPD server. Use the mpd modules to alter the
|
||||
settings.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
=over 4
|
||||
|
||||
=item L<Audio::MPD>
|
||||
|
||||
=item L<POE::Component::Client::MPD>
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
427
config/mpfire/perl/Audio/MPD/Playlist.pm
Normal file
427
config/mpfire/perl/Audio/MPD/Playlist.pm
Normal file
@@ -0,0 +1,427 @@
|
||||
#
|
||||
# This file is part of Audio::MPD
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Playlist;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Scalar::Util qw[ weaken ];
|
||||
|
||||
use base qw[ Class::Accessor::Fast ];
|
||||
__PACKAGE__->mk_accessors( qw[ _mpd ] );
|
||||
|
||||
|
||||
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
|
||||
|
||||
|
||||
#--
|
||||
# Constructor
|
||||
|
||||
#
|
||||
# my $collection = Audio::MPD::Playlist->new( $mpd );
|
||||
#
|
||||
# This will create the object, holding a back-reference to the Audio::MPD
|
||||
# object itself (for communication purposes). But in order to play safe and
|
||||
# to free the memory in time, this reference is weakened.
|
||||
#
|
||||
# Note that you're not supposed to call this constructor yourself, an
|
||||
# Audio::MPD::Playlist is automatically created for you during the creation
|
||||
# of an Audio::MPD object.
|
||||
#
|
||||
sub new {
|
||||
my ($pkg, $mpd) = @_;
|
||||
|
||||
my $self = { _mpd => $mpd };
|
||||
weaken( $self->{_mpd} );
|
||||
bless $self, $pkg;
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# Public methods
|
||||
|
||||
# -- Playlist: retrieving information
|
||||
|
||||
#
|
||||
# my @items = $pl->as_items;
|
||||
#
|
||||
# Return an array of AMC::Item::Songs, one for each of the
|
||||
# songs in the current playlist.
|
||||
#
|
||||
sub as_items {
|
||||
my ($self) = @_;
|
||||
|
||||
my @list = $self->_mpd->_cooked_command_as_items("playlistinfo\n");
|
||||
return @list;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# my @items = $pl->items_changed_since( $plversion );
|
||||
#
|
||||
# Return a list with all the songs (as API::Song objects) added to
|
||||
# the playlist since playlist $plversion.
|
||||
#
|
||||
sub items_changed_since {
|
||||
my ($self, $plid) = @_;
|
||||
return $self->_mpd->_cooked_command_as_items("plchanges $plid\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
# -- Playlist: adding / removing songs
|
||||
|
||||
#
|
||||
# $pl->add( $path [, $path [...] ] );
|
||||
#
|
||||
# Add the songs identified by $path (relative to MPD's music directory) to
|
||||
# the current playlist. No return value.
|
||||
#
|
||||
sub add {
|
||||
my ($self, @pathes) = @_;
|
||||
my $command =
|
||||
"command_list_begin\n"
|
||||
. join( '', map { s/"/\\"/g; qq[add "$_"\n] } @pathes )
|
||||
. "command_list_end\n";
|
||||
$self->_mpd->_send_command( $command );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->delete( $song [, $song [...] ] );
|
||||
#
|
||||
# Remove song number $song (starting from 0) from the current playlist. No
|
||||
# return value.
|
||||
#
|
||||
sub delete {
|
||||
my ($self, @songs) = @_;
|
||||
my $command =
|
||||
"command_list_begin\n"
|
||||
. join( '', map { s/"/\\"/g; "delete $_\n" } @songs )
|
||||
. "command_list_end\n";
|
||||
$self->_mpd->_send_command( $command );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->deleteid( $songid [, $songid [...] ]);
|
||||
#
|
||||
# Remove the specified $songid (as assigned by mpd when inserted in playlist)
|
||||
# from the current playlist. No return value.
|
||||
#
|
||||
sub deleteid {
|
||||
my ($self, @songs) = @_;
|
||||
my $command =
|
||||
"command_list_begin\n"
|
||||
. join( '', map { "deleteid $_\n" } @songs )
|
||||
. "command_list_end\n";
|
||||
$self->_mpd->_send_command( $command );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->clear;
|
||||
#
|
||||
# Remove all the songs from the current playlist. No return value.
|
||||
#
|
||||
sub clear {
|
||||
my ($self) = @_;
|
||||
$self->_mpd->_send_command("clear\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->crop;
|
||||
#
|
||||
# Remove all of the songs from the current playlist *except* the current one.
|
||||
#
|
||||
sub crop {
|
||||
my ($self) = @_;
|
||||
|
||||
my $status = $self->_mpd->status;
|
||||
my $cur = $status->song;
|
||||
my $len = $status->playlistlength - 1;
|
||||
|
||||
my $command =
|
||||
"command_list_begin\n"
|
||||
. join( '', map { $_ != $cur ? "delete $_\n" : '' } reverse 0..$len )
|
||||
. "command_list_end\n";
|
||||
$self->_mpd->_send_command( $command );
|
||||
}
|
||||
|
||||
|
||||
# -- Playlist: changing playlist order
|
||||
|
||||
#
|
||||
# $pl->shuffle();
|
||||
#
|
||||
# Shuffle the current playlist. No return value.
|
||||
#
|
||||
sub shuffle {
|
||||
my ($self) = @_;
|
||||
$self->_mpd->_send_command("shuffle\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->swap( $song1, $song2 );
|
||||
#
|
||||
# Swap positions of song number $song1 and $song2 in the current playlist.
|
||||
# No return value.
|
||||
#
|
||||
sub swap {
|
||||
my ($self, $from, $to) = @_;
|
||||
$self->_mpd->_send_command("swap $from $to\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->swapid( $songid1, $songid2 );
|
||||
#
|
||||
# Swap the postions of song ID $songid1 with song ID $songid2 in the
|
||||
# current playlist. No return value.
|
||||
#
|
||||
sub swapid {
|
||||
my ($self, $from, $to) = @_;
|
||||
$self->_mpd->_send_command("swapid $from $to\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->move( $song, $newpos );
|
||||
#
|
||||
# Move song number $song to the position $newpos. No return value.
|
||||
#
|
||||
sub move {
|
||||
my ($self, $song, $pos) = @_;
|
||||
$self->_mpd->_send_command("move $song $pos\n");
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->moveid( $songid, $newpos );
|
||||
#
|
||||
# Move song ID $songid to the position $newpos. No return value.
|
||||
#
|
||||
sub moveid {
|
||||
my ($self, $song, $pos) = @_;
|
||||
$self->_mpd->_send_command("moveid $song $pos\n");
|
||||
}
|
||||
|
||||
|
||||
# -- Playlist: managing playlists
|
||||
|
||||
#
|
||||
# $pl->load( $playlist );
|
||||
#
|
||||
# Load list of songs from specified $playlist file. No return value.
|
||||
#
|
||||
sub load {
|
||||
my ($self, $playlist) = @_;
|
||||
$self->_mpd->_send_command( qq[load "$playlist"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->save( $playlist );
|
||||
#
|
||||
# Save the current playlist to a file called $playlist in MPD's playlist
|
||||
# directory. No return value.
|
||||
#
|
||||
sub save {
|
||||
my ($self, $playlist) = @_;
|
||||
$self->_mpd->_send_command( qq[save "$playlist"\n] );
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# $pl->rm( $playlist )
|
||||
#
|
||||
# Delete playlist named $playlist from MPD's playlist directory. No
|
||||
# return value.
|
||||
#
|
||||
sub rm {
|
||||
my ($self, $playlist) = @_;
|
||||
$self->_mpd->_send_command( qq[rm "$playlist"\n] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Playlist - an object to mess MPD's playlist
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
my $song = $mpd->playlist->randomize;
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
C<Audio::MPD::Playlist> is a class meant to access & update MPD's
|
||||
playlist.
|
||||
|
||||
|
||||
=head1 PUBLIC METHODS
|
||||
|
||||
=head2 Constructor
|
||||
|
||||
=over 4
|
||||
|
||||
=item new( $mpd )
|
||||
|
||||
This will create the object, holding a back-reference to the C<Audio::MPD>
|
||||
object itself (for communication purposes). But in order to play safe and
|
||||
to free the memory in time, this reference is weakened.
|
||||
|
||||
Note that you're not supposed to call this constructor yourself, an
|
||||
C<Audio::MPD::Playlist> is automatically created for you during the creation
|
||||
of an C<Audio::MPD> object.
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Retrieving information
|
||||
|
||||
=over 4
|
||||
|
||||
=item $pl->as_items()
|
||||
|
||||
Return an array of C<Audio::MPD::Common::Item::Song>s, one for each of the
|
||||
songs in the current playlist.
|
||||
|
||||
|
||||
=item $pl->items_changed_since( $plversion )
|
||||
|
||||
Return a list with all the songs (as AMC::Item::Song objects) added to
|
||||
the playlist since playlist $plversion.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Adding / removing songs
|
||||
|
||||
=over 4
|
||||
|
||||
=item $pl->add( $path [, $path [...] ] )
|
||||
|
||||
Add the songs identified by C<$path> (relative to MPD's music directory) to the
|
||||
current playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->delete( $song [, $song [...] ] )
|
||||
|
||||
Remove song number C<$song>s (starting from 0) from the current playlist. No
|
||||
return value.
|
||||
|
||||
|
||||
=item $pl->deleteid( $songid [, $songid [...] ] )
|
||||
|
||||
Remove the specified C<$songid>s (as assigned by mpd when inserted in playlist)
|
||||
from the current playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->clear()
|
||||
|
||||
Remove all the songs from the current playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->crop()
|
||||
|
||||
Remove all of the songs from the current playlist *except* the
|
||||
song currently playing.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Changing playlist order
|
||||
|
||||
=over 4
|
||||
|
||||
=item $pl->shuffle()
|
||||
|
||||
Shuffle the current playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->swap( $song1, $song2 )
|
||||
|
||||
Swap positions of song number C<$song1> and C<$song2> in the current
|
||||
playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->swapid( $songid1, $songid2 )
|
||||
|
||||
Swap the postions of song ID C<$songid1> with song ID C<$songid2> in the
|
||||
current playlist. No return value.
|
||||
|
||||
|
||||
=item $pl->move( $song, $newpos )
|
||||
|
||||
Move song number C<$song> to the position C<$newpos>. No return value.
|
||||
|
||||
|
||||
=item $pl->moveid( $songid, $newpos )
|
||||
|
||||
Move song ID C<$songid> to the position C<$newpos>. No return value.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head2 Managing playlists
|
||||
|
||||
=over 4
|
||||
|
||||
=item $pl->load( $playlist )
|
||||
|
||||
Load list of songs from specified C<$playlist> file. No return value.
|
||||
|
||||
|
||||
=item $pl->save( $playlist )
|
||||
|
||||
Save the current playlist to a file called C<$playlist> in MPD's playlist
|
||||
directory. No return value.
|
||||
|
||||
|
||||
=item $pl->rm( $playlist )
|
||||
|
||||
Delete playlist named C<$playlist> from MPD's playlist directory. No
|
||||
return value.
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Audio::MPD>
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
217
config/mpfire/perl/Audio/MPD/Test.pm
Normal file
217
config/mpfire/perl/Audio/MPD/Test.pm
Normal file
@@ -0,0 +1,217 @@
|
||||
#
|
||||
# This file is part of Audio::MPD
|
||||
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the same terms as Perl itself.
|
||||
#
|
||||
#
|
||||
|
||||
package Audio::MPD::Test;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Exporter;
|
||||
use FindBin qw[ $Bin ];
|
||||
use Readonly;
|
||||
|
||||
|
||||
use base qw[ Exporter ];
|
||||
our @EXPORT = qw[ customize_test_mpd_configuration start_test_mpd stop_test_mpd ];
|
||||
#our ($VERSION) = '$Rev: 5284 $' =~ /(\d+)/;
|
||||
|
||||
|
||||
Readonly my $TEMPLATE => "$Bin/mpd-test/mpd.conf.template";
|
||||
Readonly my $CONFIG => "$Bin/mpd-test/mpd.conf";
|
||||
|
||||
{ # this will be run when Audio::MPD::Test will be use-d.
|
||||
my $restart = 0;
|
||||
my $stopit = 0;
|
||||
|
||||
customize_test_mpd_configuration();
|
||||
$restart = _stop_user_mpd_if_needed();
|
||||
$stopit = start_test_mpd();
|
||||
|
||||
END {
|
||||
stop_test_mpd() if $stopit;
|
||||
return unless $restart; # no need to restart
|
||||
system 'mpd 2>/dev/null'; # restart user mpd
|
||||
sleep 1; # wait 1 second to let mpd start.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# public subs
|
||||
|
||||
#
|
||||
# customize_test_mpd_configuration( [$port] )
|
||||
#
|
||||
# Create a fake mpd configuration file, based on the file mpd.conf.template
|
||||
# located in t/mpd-test. The string PWD will be replaced by the real path -
|
||||
# ie, where the tarball has been untarred. The string PORT will be replaced
|
||||
# by $port if specified, 6600 otherwise (MPD default).
|
||||
#
|
||||
sub customize_test_mpd_configuration {
|
||||
my ($port) = @_;
|
||||
$port ||= 6600;
|
||||
|
||||
# open template and config.
|
||||
open my $in, '<', $TEMPLATE or die "can't open [$TEMPLATE]: $!\n";
|
||||
open my $out, '>', $CONFIG or die "can't open [$CONFIG]: $!\n";
|
||||
|
||||
# replace string and fill in config file.
|
||||
while ( defined( my $line = <$in> ) ) {
|
||||
$line =~ s!PWD!$Bin/mpd-test!;
|
||||
$line =~ s!PORT!$port!;
|
||||
print $out $line;
|
||||
}
|
||||
|
||||
# clean up.
|
||||
close $in;
|
||||
close $out;
|
||||
|
||||
# create a fake mpd db.
|
||||
system( "mpd --create-db $CONFIG >/dev/null 2>&1" ) == 0
|
||||
or die "could not create fake mpd database: $?\n";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# start_test_mpd()
|
||||
#
|
||||
# Start the fake mpd, and die if there were any error.
|
||||
#
|
||||
sub start_test_mpd {
|
||||
my $output = qx[mpd $CONFIG 2>&1];
|
||||
die "could not start fake mpd: $output\n" if $output;
|
||||
sleep 1; # wait 1 second to let mpd start.
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# stop_test_mpd()
|
||||
#
|
||||
# Kill the fake mpd.
|
||||
#
|
||||
sub stop_test_mpd {
|
||||
system "mpd --kill $CONFIG 2>/dev/null";
|
||||
sleep 1; # wait 1 second to free output device.
|
||||
unlink "$Bin/mpd-test/state", "$Bin/mpd-test/music.db";
|
||||
}
|
||||
|
||||
|
||||
#--
|
||||
# private subs
|
||||
|
||||
|
||||
#
|
||||
# my $was_running = _stop_user_mpd_if_needed()
|
||||
#
|
||||
# This sub will check if mpd is currently running. If it is, force it to
|
||||
# a full stop (unless MPD_TEST_OVERRIDE is not set).
|
||||
#
|
||||
# In any case, it will return a boolean stating whether mpd was running
|
||||
# before forcing stop.
|
||||
#
|
||||
sub _stop_user_mpd_if_needed {
|
||||
# check if mpd is running.
|
||||
my $is_running = grep { /mpd$/ } qx[ ps -e ];
|
||||
|
||||
return 0 unless $is_running; # mpd does not run - nothing to do.
|
||||
|
||||
# check force stop.
|
||||
die "mpd is running\n" unless $ENV{MPD_TEST_OVERRIDE};
|
||||
system( 'mpd --kill 2>/dev/null') == 0 or die "can't stop user mpd: $?\n";
|
||||
sleep 1; # wait 1 second to free output device
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Audio::MPD::Test - automate launching of fake mdp for testing purposes
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Audio::MPD::Test; # die if error
|
||||
[...]
|
||||
stop_fake_mpd();
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
=head2 General usage
|
||||
|
||||
This module will try to launch a new mpd server for testing purposes. This
|
||||
mpd server will then be used during Audio::MPD tests.
|
||||
|
||||
In order to achieve this, the module will create a fake mpd.conf file with
|
||||
the correct pathes (ie, where you untarred the module tarball). It will then
|
||||
check if some mpd server is already running, and stop it if the
|
||||
MPD_TEST_OVERRIDE environment variable is true (die otherwise). Last it will
|
||||
run the test mpd with its newly created configuration file.
|
||||
|
||||
Everything described above is done automatically when the module is C<use>-d.
|
||||
|
||||
|
||||
Once the tests are run, the mpd server will be shut down, and the original
|
||||
one will be relaunched (if there was one).
|
||||
|
||||
Note that the test mpd will listen to C<localhost>, so you are on the safe
|
||||
side. Note also that the test suite comes with its own ogg files - and yes,
|
||||
we can redistribute them since it's only some random voice recordings :-)
|
||||
|
||||
|
||||
=head2 Advanced usage
|
||||
|
||||
In case you want more control on the test mpd server, you can use the
|
||||
following public methods:
|
||||
|
||||
=over 4
|
||||
|
||||
=item start_test_mpd()
|
||||
|
||||
Start the fake mpd, and die if there were any error.
|
||||
|
||||
=item stop_test_mpd()
|
||||
|
||||
Kill the fake mpd.
|
||||
|
||||
=item customize_test_mpd_configuration( [$port] )
|
||||
|
||||
Create a fake mpd configuration file, based on the file mpd.conf.template
|
||||
located in t/mpd-test. The string PWD will be replaced by the real path -
|
||||
ie, where the tarball has been untarred. The string PORT will be replaced
|
||||
by $port if specified, 6600 otherwise (MPD default).
|
||||
|
||||
=back
|
||||
|
||||
This might be useful when trying to test connections with mpd server.
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<Audio::MPD>
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Jerome Quelin, C<< <jquelin at cpan.org> >>
|
||||
|
||||
|
||||
=head1 COPYRIGHT & LICENSE
|
||||
|
||||
Copyright (c) 2007 Jerome Quelin, all rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the same terms as Perl itself.
|
||||
|
||||
=cut
|
||||
803
config/mpfire/perl/Readonly.pm
Normal file
803
config/mpfire/perl/Readonly.pm
Normal file
@@ -0,0 +1,803 @@
|
||||
=for gpg
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA1
|
||||
|
||||
- -----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA1
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Readonly - Facility for creating read-only scalars, arrays, hashes.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
This documentation describes version 1.03 of Readonly.pm, April 20, 2004.
|
||||
|
||||
=cut
|
||||
|
||||
# Rest of documentation is after __END__.
|
||||
|
||||
use 5.005;
|
||||
use strict;
|
||||
#use warnings;
|
||||
#no warnings 'uninitialized';
|
||||
|
||||
package Readonly;
|
||||
$Readonly::VERSION = '1.03'; # Also change in the documentation!
|
||||
|
||||
# Autocroak (Thanks, MJD)
|
||||
# Only load Carp.pm if module is croaking.
|
||||
sub croak
|
||||
{
|
||||
require Carp;
|
||||
goto &Carp::croak;
|
||||
}
|
||||
|
||||
# These functions may be overridden by Readonly::XS, if installed.
|
||||
sub is_sv_readonly ($) { 0 }
|
||||
sub make_sv_readonly ($) { die "make_sv_readonly called but not overridden" }
|
||||
use vars qw/$XSokay/; # Set to true in Readonly::XS, if available
|
||||
|
||||
# Common error messages, or portions thereof
|
||||
use vars qw/$MODIFY $REASSIGN $ODDHASH/;
|
||||
$MODIFY = 'Modification of a read-only value attempted';
|
||||
$REASSIGN = 'Attempt to reassign a readonly';
|
||||
$ODDHASH = 'May not store an odd number of values in a hash';
|
||||
|
||||
# See if we can use the XS stuff.
|
||||
$Readonly::XS::MAGIC_COOKIE = "Do NOT use or require Readonly::XS unless you're me.";
|
||||
eval 'use Readonly::XS';
|
||||
|
||||
|
||||
# ----------------
|
||||
# Read-only scalars
|
||||
# ----------------
|
||||
package Readonly::Scalar;
|
||||
|
||||
sub TIESCALAR
|
||||
{
|
||||
my $whence = (caller 2)[3]; # Check if naughty user is trying to tie directly.
|
||||
Readonly::croak "Invalid tie" unless $whence && $whence =~ /^Readonly::(?:Scalar1?|Readonly)$/;
|
||||
my $class = shift;
|
||||
Readonly::croak "No value specified for readonly scalar" unless @_;
|
||||
Readonly::croak "Too many values specified for readonly scalar" unless @_ == 1;
|
||||
|
||||
my $value = shift;
|
||||
return bless \$value, $class;
|
||||
}
|
||||
|
||||
sub FETCH
|
||||
{
|
||||
my $self = shift;
|
||||
return $$self;
|
||||
}
|
||||
|
||||
*STORE = *UNTIE =
|
||||
sub {Readonly::croak $Readonly::MODIFY};
|
||||
|
||||
|
||||
# ----------------
|
||||
# Read-only arrays
|
||||
# ----------------
|
||||
package Readonly::Array;
|
||||
|
||||
sub TIEARRAY
|
||||
{
|
||||
my $whence = (caller 1)[3]; # Check if naughty user is trying to tie directly.
|
||||
Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Array1?$/;
|
||||
my $class = shift;
|
||||
my @self = @_;
|
||||
|
||||
return bless \@self, $class;
|
||||
}
|
||||
|
||||
sub FETCH
|
||||
{
|
||||
my $self = shift;
|
||||
my $index = shift;
|
||||
return $self->[$index];
|
||||
}
|
||||
|
||||
sub FETCHSIZE
|
||||
{
|
||||
my $self = shift;
|
||||
return scalar @$self;
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
eval q{
|
||||
sub EXISTS
|
||||
{
|
||||
my $self = shift;
|
||||
my $index = shift;
|
||||
return exists $self->[$index];
|
||||
}
|
||||
} if $] >= 5.006; # couldn't do "exists" on arrays before then
|
||||
}
|
||||
|
||||
*STORE = *STORESIZE = *EXTEND = *PUSH = *POP = *UNSHIFT = *SHIFT = *SPLICE = *CLEAR = *UNTIE =
|
||||
sub {Readonly::croak $Readonly::MODIFY};
|
||||
|
||||
|
||||
# ----------------
|
||||
# Read-only hashes
|
||||
# ----------------
|
||||
package Readonly::Hash;
|
||||
|
||||
sub TIEHASH
|
||||
{
|
||||
my $whence = (caller 1)[3]; # Check if naughty user is trying to tie directly.
|
||||
Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Hash1?$/;
|
||||
|
||||
my $class = shift;
|
||||
# must have an even number of values
|
||||
Readonly::croak $Readonly::ODDHASH unless (@_ %2 == 0);
|
||||
|
||||
my %self = @_;
|
||||
return bless \%self, $class;
|
||||
}
|
||||
|
||||
sub FETCH
|
||||
{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
|
||||
return $self->{$key};
|
||||
}
|
||||
|
||||
sub EXISTS
|
||||
{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
return exists $self->{$key};
|
||||
}
|
||||
|
||||
sub FIRSTKEY
|
||||
{
|
||||
my $self = shift;
|
||||
my $dummy = keys %$self;
|
||||
return scalar each %$self;
|
||||
}
|
||||
|
||||
sub NEXTKEY
|
||||
{
|
||||
my $self = shift;
|
||||
return scalar each %$self;
|
||||
}
|
||||
|
||||
*STORE = *DELETE = *CLEAR = *UNTIE =
|
||||
sub {Readonly::croak $Readonly::MODIFY};
|
||||
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Main package, containing convenience functions (so callers won't
|
||||
# have to explicitly tie the variables themselves).
|
||||
# ----------------------------------------------------------------
|
||||
package Readonly;
|
||||
use Exporter;
|
||||
use vars qw/@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS/;
|
||||
push @ISA, 'Exporter';
|
||||
push @EXPORT, qw/Readonly/;
|
||||
push @EXPORT_OK, qw/Scalar Array Hash Scalar1 Array1 Hash1/;
|
||||
|
||||
# Predeclare the following, so we can use them recursively
|
||||
sub Scalar ($$);
|
||||
sub Array (\@;@);
|
||||
sub Hash (\%;@);
|
||||
|
||||
# Returns true if a string begins with "Readonly::"
|
||||
# Used to prevent reassignment of Readonly variables.
|
||||
sub _is_badtype
|
||||
{
|
||||
my $type = $_[0];
|
||||
return lc $type if $type =~ s/^Readonly:://;
|
||||
return;
|
||||
}
|
||||
|
||||
# Shallow Readonly scalar
|
||||
sub Scalar1 ($$)
|
||||
{
|
||||
croak "$REASSIGN scalar" if is_sv_readonly $_[0];
|
||||
my $badtype = _is_badtype (ref tied $_[0]);
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
# xs method: flag scalar as readonly
|
||||
if ($XSokay)
|
||||
{
|
||||
$_[0] = $_[1];
|
||||
make_sv_readonly $_[0];
|
||||
return;
|
||||
}
|
||||
|
||||
# pure-perl method: tied scalar
|
||||
my $tieobj = eval {tie $_[0], 'Readonly::Scalar', $_[1]};
|
||||
if ($@)
|
||||
{
|
||||
croak "$REASSIGN scalar" if substr($@,0,43) eq $MODIFY;
|
||||
die $@; # some other error?
|
||||
}
|
||||
return $tieobj;
|
||||
}
|
||||
|
||||
# Shallow Readonly array
|
||||
sub Array1 (\@;@)
|
||||
{
|
||||
my $badtype = _is_badtype (ref tied $_[0]);
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
my $aref = shift;
|
||||
return tie @$aref, 'Readonly::Array', @_;
|
||||
}
|
||||
|
||||
# Shallow Readonly hash
|
||||
sub Hash1 (\%;@)
|
||||
{
|
||||
my $badtype = _is_badtype (ref tied $_[0]);
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
my $href = shift;
|
||||
|
||||
# If only one value, and it's a hashref, expand it
|
||||
if (@_ == 1 && ref $_[0] eq 'HASH')
|
||||
{
|
||||
return tie %$href, 'Readonly::Hash', %{$_[0]};
|
||||
}
|
||||
|
||||
# otherwise, must have an even number of values
|
||||
croak $ODDHASH unless (@_%2 == 0);
|
||||
|
||||
return tie %$href, 'Readonly::Hash', @_;
|
||||
}
|
||||
|
||||
# Deep Readonly scalar
|
||||
sub Scalar ($$)
|
||||
{
|
||||
croak "$REASSIGN scalar" if is_sv_readonly $_[0];
|
||||
my $badtype = _is_badtype (ref tied $_[0]);
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
my $value = $_[1];
|
||||
|
||||
# Recursively check passed element for references; if any, make them Readonly
|
||||
foreach ($value)
|
||||
{
|
||||
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
|
||||
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
|
||||
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
|
||||
}
|
||||
|
||||
# xs method: flag scalar as readonly
|
||||
if ($XSokay)
|
||||
{
|
||||
$_[0] = $value;
|
||||
make_sv_readonly $_[0];
|
||||
return;
|
||||
}
|
||||
|
||||
# pure-perl method: tied scalar
|
||||
my $tieobj = eval {tie $_[0], 'Readonly::Scalar', $value};
|
||||
if ($@)
|
||||
{
|
||||
croak "$REASSIGN scalar" if substr($@,0,43) eq $MODIFY;
|
||||
die $@; # some other error?
|
||||
}
|
||||
return $tieobj;
|
||||
}
|
||||
|
||||
# Deep Readonly array
|
||||
sub Array (\@;@)
|
||||
{
|
||||
my $badtype = _is_badtype (ref tied @{$_[0]});
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
my $aref = shift;
|
||||
my @values = @_;
|
||||
|
||||
# Recursively check passed elements for references; if any, make them Readonly
|
||||
foreach (@values)
|
||||
{
|
||||
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
|
||||
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
|
||||
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
|
||||
}
|
||||
# Lastly, tie the passed reference
|
||||
return tie @$aref, 'Readonly::Array', @values;
|
||||
}
|
||||
|
||||
# Deep Readonly hash
|
||||
sub Hash (\%;@)
|
||||
{
|
||||
my $badtype = _is_badtype (ref tied %{$_[0]});
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
|
||||
my $href = shift;
|
||||
my @values = @_;
|
||||
|
||||
# If only one value, and it's a hashref, expand it
|
||||
if (@_ == 1 && ref $_[0] eq 'HASH')
|
||||
{
|
||||
@values = %{$_[0]};
|
||||
}
|
||||
|
||||
# otherwise, must have an even number of values
|
||||
croak $ODDHASH unless (@values %2 == 0);
|
||||
|
||||
# Recursively check passed elements for references; if any, make them Readonly
|
||||
foreach (@values)
|
||||
{
|
||||
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
|
||||
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
|
||||
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
|
||||
}
|
||||
|
||||
return tie %$href, 'Readonly::Hash', @values;
|
||||
}
|
||||
|
||||
|
||||
# Common entry-point for all supported data types
|
||||
eval q{sub Readonly} . ( $] < 5.008 ? '' : '(\[$@%]@)' ) . <<'SUB_READONLY';
|
||||
{
|
||||
if (ref $_[0] eq 'SCALAR')
|
||||
{
|
||||
croak $MODIFY if is_sv_readonly ${$_[0]};
|
||||
my $badtype = _is_badtype (ref tied ${$_[0]});
|
||||
croak "$REASSIGN $badtype" if $badtype;
|
||||
croak "Readonly scalar must have only one value" if @_ > 2;
|
||||
|
||||
my $tieobj = eval {tie ${$_[0]}, 'Readonly::Scalar', $_[1]};
|
||||
# Tie may have failed because user tried to tie a constant, or we screwed up somehow.
|
||||
if ($@)
|
||||
{
|
||||
croak $MODIFY if $@ =~ /^$MODIFY at/; # Point the finger at the user.
|
||||
die "$@\n"; # Not a modify read-only message; must be our fault.
|
||||
}
|
||||
return $tieobj;
|
||||
}
|
||||
elsif (ref $_[0] eq 'ARRAY')
|
||||
{
|
||||
my $aref = shift;
|
||||
return Array @$aref, @_;
|
||||
}
|
||||
elsif (ref $_[0] eq 'HASH')
|
||||
{
|
||||
my $href = shift;
|
||||
croak $ODDHASH if @_%2 != 0 && !(@_ == 1 && ref $_[0] eq 'HASH');
|
||||
return Hash %$href, @_;
|
||||
}
|
||||
elsif (ref $_[0])
|
||||
{
|
||||
croak "Readonly only supports scalar, array, and hash variables.";
|
||||
}
|
||||
else
|
||||
{
|
||||
croak "First argument to Readonly must be a reference.";
|
||||
}
|
||||
}
|
||||
SUB_READONLY
|
||||
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Readonly;
|
||||
|
||||
# Read-only scalar
|
||||
Readonly::Scalar $sca => $initial_value;
|
||||
Readonly::Scalar my $sca => $initial_value;
|
||||
|
||||
# Read-only array
|
||||
Readonly::Array @arr => @values;
|
||||
Readonly::Array my @arr => @values;
|
||||
|
||||
# Read-only hash
|
||||
Readonly::Hash %has => (key => value, key => value, ...);
|
||||
Readonly::Hash my %has => (key => value, key => value, ...);
|
||||
# or:
|
||||
Readonly::Hash %has => {key => value, key => value, ...};
|
||||
|
||||
# You can use the read-only variables like any regular variables:
|
||||
print $sca;
|
||||
$something = $sca + $arr[2];
|
||||
next if $has{$some_key};
|
||||
|
||||
# But if you try to modify a value, your program will die:
|
||||
$sca = 7;
|
||||
push @arr, 'seven';
|
||||
delete $has{key};
|
||||
# The error message is "Modification of a read-only value
|
||||
attempted"
|
||||
|
||||
# Alternate form (Perl 5.8 and later)
|
||||
Readonly $sca => $initial_value;
|
||||
Readonly my $sca => $initial_value;
|
||||
Readonly @arr => @values;
|
||||
Readonly my @arr => @values;
|
||||
Readonly %has => (key => value, key => value, ...);
|
||||
Readonly my %has => (key => value, key => value, ...);
|
||||
# Alternate form (for Perls earlier than v5.8)
|
||||
Readonly \$sca => $initial_value;
|
||||
Readonly \my $sca => $initial_value;
|
||||
Readonly \@arr => @values;
|
||||
Readonly \my @arr => @values;
|
||||
Readonly \%has => (key => value, key => value, ...);
|
||||
Readonly \my %has => (key => value, key => value, ...);
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is a facility for creating non-modifiable variables. This is
|
||||
useful for configuration files, headers, etc. It can also be useful
|
||||
as a development and debugging tool, for catching updates to variables
|
||||
that should not be changed.
|
||||
|
||||
If any of the values you pass to C<Scalar>, C<Array>, or C<Hash> are
|
||||
references, then those functions recurse over the data structures,
|
||||
marking everything as Readonly. Usually, this is what you want: the
|
||||
entire structure nonmodifiable. If you want only the top level to be
|
||||
Readonly, use the alternate C<Scalar1>, C<Array1> and C<Hash1>
|
||||
functions.
|
||||
|
||||
Please note that most users of Readonly will also want to install a
|
||||
companion module Readonly::XS. See the L</CONS> section below for more
|
||||
details.
|
||||
|
||||
=head1 COMPARISON WITH "use constant"
|
||||
|
||||
Perl provides a facility for creating constant values, via the "use
|
||||
constant" pragma. There are several problems with this pragma.
|
||||
|
||||
=over 2
|
||||
|
||||
=item *
|
||||
|
||||
The constants created have no leading $ or @ character.
|
||||
|
||||
=item *
|
||||
|
||||
These constants cannot be interpolated into strings.
|
||||
|
||||
=item *
|
||||
|
||||
Syntax can get dicey sometimes. For example:
|
||||
|
||||
use constant CARRAY => (2, 3, 5, 7, 11, 13);
|
||||
$a_prime = CARRAY[2]; # wrong!
|
||||
$a_prime = (CARRAY)[2]; # right -- MUST use parentheses
|
||||
|
||||
=item *
|
||||
|
||||
You have to be very careful in places where barewords are allowed.
|
||||
For example:
|
||||
|
||||
use constant SOME_KEY => 'key';
|
||||
%hash = (key => 'value', other_key => 'other_value');
|
||||
$some_value = $hash{SOME_KEY}; # wrong!
|
||||
$some_value = $hash{+SOME_KEY}; # right
|
||||
|
||||
(who thinks to use a unary plus when using a hash?)
|
||||
|
||||
=item *
|
||||
|
||||
C<use constant> works for scalars and arrays, not hashes.
|
||||
|
||||
=item *
|
||||
|
||||
These constants are global ot the package in which they're declared;
|
||||
cannot be lexically scoped.
|
||||
|
||||
=item *
|
||||
|
||||
Works only at compile time.
|
||||
|
||||
=item *
|
||||
|
||||
Can be overridden:
|
||||
|
||||
use constant PI => 3.14159;
|
||||
...
|
||||
use constant PI => 2.71828;
|
||||
|
||||
(this does generate a warning, however, if you have warnings enabled).
|
||||
|
||||
=item *
|
||||
|
||||
It is very difficult to make and use deep structures (complex data
|
||||
structures) with C<use constant>.
|
||||
|
||||
=back
|
||||
|
||||
=head1 COMPARISON WITH TYPEGLOB CONSTANTS
|
||||
|
||||
Another popular way to create read-only scalars is to modify the symbol
|
||||
table entry for the variable by using a typeglob:
|
||||
|
||||
*a = \'value';
|
||||
|
||||
This works fine, but it only works for global variables ("my"
|
||||
variables have no symbol table entry). Also, the following similar
|
||||
constructs do B<not> work:
|
||||
|
||||
*a = [1, 2, 3]; # Does NOT create a read-only array
|
||||
*a = { a => 'A'}; # Does NOT create a read-only hash
|
||||
|
||||
=head1 PROS
|
||||
|
||||
Readonly.pm, on the other hand, will work with global variables and
|
||||
with lexical ("my") variables. It will create scalars, arrays, or
|
||||
hashes, all of which look and work like normal, read-write Perl
|
||||
variables. You can use them in scalar context, in list context; you
|
||||
can take references to them, pass them to functions, anything.
|
||||
|
||||
Readonly.pm also works well with complex data structures, allowing you
|
||||
to tag the whole structure as nonmodifiable, or just the top level.
|
||||
|
||||
Also, Readonly variables may not be reassigned. The following code
|
||||
will die:
|
||||
|
||||
Readonly::Scalar $pi => 3.14159;
|
||||
...
|
||||
Readonly::Scalar $pi => 2.71828;
|
||||
|
||||
=head1 CONS
|
||||
|
||||
Readonly.pm does impose a performance penalty. It's pretty slow. How
|
||||
slow? Run the C<benchmark.pl> script that comes with Readonly. On my
|
||||
test system, "use constant", typeglob constants, and regular
|
||||
read/write Perl variables were all about the same speed, and
|
||||
Readonly.pm constants were about 1/20 the speed.
|
||||
|
||||
However, there is relief. There is a companion module available,
|
||||
Readonly::XS. If it is installed on your system, Readonly.pm uses it
|
||||
to make read-only scalars much faster. With Readonly::XS, Readonly
|
||||
scalars are as fast as the other types of variables. Readonly arrays
|
||||
and hashes will still be relatively slow. But it's likely that most
|
||||
of your Readonly variables will be scalars.
|
||||
|
||||
If you can't use Readonly::XS (for example, if you don't have a C
|
||||
compiler, or your perl is statically linked and you don't want to
|
||||
re-link it), you have to decide whether the benefits of Readonly
|
||||
variables outweigh the speed issue. For most configuration variables
|
||||
(and other things that Readonly is likely to be useful for), the speed
|
||||
issue is probably not really a big problem. But benchmark your
|
||||
program if it might be. If it turns out to be a problem, you may
|
||||
still want to use Readonly.pm during development, to catch changes to
|
||||
variables that should not be changed, and then remove it for
|
||||
production:
|
||||
|
||||
# For testing:
|
||||
Readonly::Scalar $Foo_Directory => '/usr/local/foo';
|
||||
Readonly::Scalar $Bar_Directory => '/usr/local/bar';
|
||||
# $Foo_Directory = '/usr/local/foo';
|
||||
# $Bar_Directory = '/usr/local/bar';
|
||||
|
||||
# For production:
|
||||
# Readonly::Scalar $Foo_Directory => '/usr/local/foo';
|
||||
# Readonly::Scalar $Bar_Directory => '/usr/local/bar';
|
||||
$Foo_Directory = '/usr/local/foo';
|
||||
$Bar_Directory = '/usr/local/bar';
|
||||
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=over 4
|
||||
|
||||
=item Readonly::Scalar $var => $value;
|
||||
|
||||
Creates a nonmodifiable scalar, C<$var>, and assigns a value of
|
||||
C<$value> to it. Thereafter, its value may not be changed. Any
|
||||
attempt to modify the value will cause your program to die.
|
||||
|
||||
A value I<must> be supplied. If you want the variable to have
|
||||
C<undef> as its value, you must specify C<undef>.
|
||||
|
||||
If C<$value> is a reference to a scalar, array, or hash, then this
|
||||
function will mark the scalar, array, or hash it points to as being
|
||||
Readonly as well, and it will recursively traverse the structure,
|
||||
marking the whole thing as Readonly. Usually, this is what you want.
|
||||
However, if you want only the C<$value> marked as Readonly, use
|
||||
C<Scalar1>.
|
||||
|
||||
If $var is already a Readonly variable, the program will die with
|
||||
an error about reassigning Readonly variables.
|
||||
|
||||
=item Readonly::Array @arr => (value, value, ...);
|
||||
|
||||
Creates a nonmodifiable array, C<@arr>, and assigns the specified list
|
||||
of values to it. Thereafter, none of its values may be changed; the
|
||||
array may not be lengthened or shortened or spliced. Any attempt to
|
||||
do so will cause your program to die.
|
||||
|
||||
If any of the values passed is a reference to a scalar, array, or hash,
|
||||
then this function will mark the scalar, array, or hash it points to as
|
||||
being Readonly as well, and it will recursively traverse the structure,
|
||||
marking the whole thing as Readonly. Usually, this is what you want.
|
||||
However, if you want only the hash C<%@arr> itself marked as Readonly,
|
||||
use C<Array1>.
|
||||
|
||||
If @arr is already a Readonly variable, the program will die with
|
||||
an error about reassigning Readonly variables.
|
||||
|
||||
=item Readonly::Hash %h => (key => value, key => value, ...);
|
||||
|
||||
=item Readonly::Hash %h => {key => value, key => value, ...};
|
||||
|
||||
Creates a nonmodifiable hash, C<%h>, and assigns the specified keys
|
||||
and values to it. Thereafter, its keys or values may not be changed.
|
||||
Any attempt to do so will cause your program to die.
|
||||
|
||||
A list of keys and values may be specified (with parentheses in the
|
||||
synopsis above), or a hash reference may be specified (curly braces in
|
||||
the synopsis above). If a list is specified, it must have an even
|
||||
number of elements, or the function will die.
|
||||
|
||||
If any of the values is a reference to a scalar, array, or hash, then
|
||||
this function will mark the scalar, array, or hash it points to as
|
||||
being Readonly as well, and it will recursively traverse the
|
||||
structure, marking the whole thing as Readonly. Usually, this is what
|
||||
you want. However, if you want only the hash C<%h> itself marked as
|
||||
Readonly, use C<Hash1>.
|
||||
|
||||
If %h is already a Readonly variable, the program will die with
|
||||
an error about reassigning Readonly variables.
|
||||
|
||||
=item Readonly $var => $value;
|
||||
|
||||
=item Readonly @arr => (value, value, ...);
|
||||
|
||||
=item Readonly %h => (key => value, ...);
|
||||
|
||||
=item Readonly %h => {key => value, ...};
|
||||
|
||||
The C<Readonly> function is an alternate to the C<Scalar>, C<Array>,
|
||||
and C<Hash> functions. It has the advantage (if you consider it an
|
||||
advantage) of being one function. That may make your program look
|
||||
neater, if you're initializing a whole bunch of constants at once.
|
||||
You may or may not prefer this uniform style.
|
||||
|
||||
It has the disadvantage of having a slightly different syntax for
|
||||
versions of Perl prior to 5.8. For earlier versions, you must supply
|
||||
a backslash, because it requires a reference as the first parameter.
|
||||
|
||||
Readonly \$var => $value;
|
||||
Readonly \@arr => (value, value, ...);
|
||||
Readonly \%h => (key => value, ...);
|
||||
Readonly \%h => {key => value, ...};
|
||||
|
||||
You may or may not consider this ugly.
|
||||
|
||||
=item Readonly::Scalar1 $var => $value;
|
||||
|
||||
=item Readonly::Array1 @arr => (value, value, ...);
|
||||
|
||||
=item Readonly::Hash1 %h => (key => value, key => value, ...);
|
||||
|
||||
=item Readonly::Hash1 %h => {key => value, key => value, ...};
|
||||
|
||||
These alternate functions create shallow Readonly variables, instead
|
||||
of deep ones. For example:
|
||||
|
||||
Readonly::Array1 @shal => (1, 2, {perl=>'Rules', java=>'Bites'}, 4, 5);
|
||||
Readonly::Array @deep => (1, 2, {perl=>'Rules', java=>'Bites'}, 4, 5);
|
||||
|
||||
$shal[1] = 7; # error
|
||||
$shal[2]{APL}='Weird'; # Allowed! since the hash isn't Readonly
|
||||
$deep[1] = 7; # error
|
||||
$deep[2]{APL}='Weird'; # error, since the hash is Readonly
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
# SCALARS:
|
||||
|
||||
# A plain old read-only value
|
||||
Readonly::Scalar $a => "A string value";
|
||||
|
||||
# The value need not be a compile-time constant:
|
||||
Readonly::Scalar $a => $computed_value;
|
||||
|
||||
|
||||
# ARRAYS:
|
||||
|
||||
# A read-only array:
|
||||
Readonly::Array @a => (1, 2, 3, 4);
|
||||
|
||||
# The parentheses are optional:
|
||||
Readonly::Array @a => 1, 2, 3, 4;
|
||||
|
||||
# You can use Perl's built-in array quoting syntax:
|
||||
Readonly::Array @a => qw/1 2 3 4/;
|
||||
|
||||
# You can initialize a read-only array from a variable one:
|
||||
Readonly::Array @a => @computed_values;
|
||||
|
||||
# A read-only array can be empty, too:
|
||||
Readonly::Array @a => ();
|
||||
Readonly::Array @a; # equivalent
|
||||
|
||||
|
||||
# HASHES
|
||||
|
||||
# Typical usage:
|
||||
Readonly::Hash %a => (key1 => 'value1', key2 => 'value2');
|
||||
|
||||
# A read-only hash can be initialized from a variable one:
|
||||
Readonly::Hash %a => %computed_values;
|
||||
|
||||
# A read-only hash can be empty:
|
||||
Readonly::Hash %a => ();
|
||||
Readonly::Hash %a; # equivalent
|
||||
|
||||
# If you pass an odd number of values, the program will die:
|
||||
Readonly::Hash %a => (key1 => 'value1', "value2");
|
||||
--> dies with "May not store an odd number of values in a hash"
|
||||
|
||||
|
||||
=head1 EXPORTS
|
||||
|
||||
By default, this module exports the following symbol into the calling
|
||||
program's namespace:
|
||||
|
||||
Readonly
|
||||
|
||||
The following symbols are available for import into your program, if
|
||||
you like:
|
||||
|
||||
Scalar Scalar1
|
||||
Array Array1
|
||||
Hash Hash1
|
||||
|
||||
|
||||
=head1 REQUIREMENTS
|
||||
|
||||
Perl 5.000
|
||||
Carp.pm (included with Perl)
|
||||
Exporter.pm (included with Perl)
|
||||
|
||||
Readonly::XS is recommended but not required.
|
||||
|
||||
=head1 ACKNOWLEDGEMENTS
|
||||
|
||||
Thanks to Slaven Rezic for the idea of one common function
|
||||
(Readonly) for all three types of variables (13 April 2002).
|
||||
|
||||
Thanks to Ernest Lergon for the idea (and initial code) for
|
||||
deeply-Readonly data structures (21 May 2002).
|
||||
|
||||
Thanks to Damian Conway for the idea (and code) for making the
|
||||
Readonly function work a lot smoother under perl 5.8+.
|
||||
|
||||
|
||||
=head1 AUTHOR / COPYRIGHT
|
||||
|
||||
Eric J. Roode, roode@cpan.org
|
||||
|
||||
Copyright (c) 2001-2004 by Eric J. Roode. All Rights Reserved. This
|
||||
module is free software; you can redistribute it and/or modify it under
|
||||
the same terms as Perl itself.
|
||||
|
||||
If you have suggestions for improvement, please drop me a line. If
|
||||
you make improvements to this software, I ask that you please send me
|
||||
a copy of your changes. Thanks.
|
||||
|
||||
Readonly.pm is made from 100% recycled electrons. No animals were
|
||||
harmed during the development and testing of this module. Not sold
|
||||
in stores! Readonly::XS sold separately. Void where prohibited.
|
||||
|
||||
=cut
|
||||
|
||||
=begin gpg
|
||||
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.2.4 (MingW32)
|
||||
|
||||
iD8DBQFAhaGCY96i4h5M0egRAg++AJ0ar4ncojbOp0OOc2wo+E/1cBn5cQCg9eP9
|
||||
qTzAC87PuyKB+vrcRykrDbo=
|
||||
=39Ny
|
||||
-----END PGP SIGNATURE-----
|
||||
|
||||
=cut
|
||||
14
config/mpfire/webradio
Normal file
14
config/mpfire/webradio
Normal file
@@ -0,0 +1,14 @@
|
||||
62.75.176.45/rtl-high|89.0 RTL Hitradio|http://www.89.0rtl.de
|
||||
gffstream.ic.llnwd.net/stream/gffstream_stream_wdr_einslive_b|Einslive|http://www.einslive.de/
|
||||
213.186.41.149:8040|Deepinside Radio European|http://www.deepinside.co.uk
|
||||
62.75.176.40:80/bigfm-cbr-128|BigFM|http://www.bigfm.de
|
||||
stream.telvi.de:8000/radiobrocken|Hit-Radio Brocken|http://www.radiobrocken.de
|
||||
magic-island.eu:8000/listen.mp3|Magic Island|http://www.magic-island.eu
|
||||
dsl.blackbeats.fm:13000|BlackBeats FM|http://www.blackbeats.fm
|
||||
87.118.64.197:3100|Discofox-Radio|http://www.discofox-radio.de
|
||||
rmnradio.powerstream.de:8022|RMNradio|http://www.rmnradio.de/
|
||||
relay.radio.ethz.ch:8000/kohina.ogg|Kohina|http://www.kohina.com
|
||||
relay1.slayradio.org:8000|Slay Radio|http://www.slayradio.com/
|
||||
demovibes.de:8000/necta128.ogg|Nectarine Demoscene Radio|http://www.scenemusic.eu/
|
||||
r1.scenesat.com:8000/scenesathi|SceneSat Radio|http://www.scenesat.com
|
||||
radioparadise.steadyhost.com:8060|Radio Paradise|http://www.radioparadise.com/
|
||||
@@ -79,10 +79,13 @@ extendedKeyUsage = clientAuth
|
||||
keyUsage = digitalSignature
|
||||
|
||||
[ server ]
|
||||
|
||||
# JY ADDED -- Make a cert with nsCertType set to "server"
|
||||
basicConstraints = CA:FALSE
|
||||
nsCertType = server
|
||||
nsComment = "OpenSSL Generated Server Certificate"
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid,issuer:always
|
||||
extendedKeyUsage = serverAuth
|
||||
keyUsage = digitalSignature, keyEncipherment
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ OVPN="/var/ipfire/ovpn"
|
||||
CRL="${OVPN}/crls/cacrl.pem"
|
||||
CAKEY="${OVPN}/ca/cakey.pem"
|
||||
CACERT="${OVPN}/ca/cacert.pem"
|
||||
OPENSSLCONF="${OVPN}/openssl/ovpn.cnf"
|
||||
|
||||
# Check if CRL is presant or if OpenVPN is active
|
||||
if [ ! -e "${CAKEY}" ]; then
|
||||
@@ -75,7 +76,7 @@ UPDATE="14"
|
||||
## Mainpart
|
||||
# Check if OpenVPNs CRL needs to be renewed
|
||||
if [ ${NEXTUPDATE} -le ${UPDATE} ]; then
|
||||
if openssl ca -gencrl -keyfile "${CAKEY}" -cert "${CACERT}" -out "${CRL}" -config "/usr/share/openvpn/ovpn.cnf"; then
|
||||
if openssl ca -gencrl -keyfile "${CAKEY}" -cert "${CACERT}" -out "${CRL}" -config "${OPENSSLCONF}"; then
|
||||
logger -t openvpn "CRL has been updated"
|
||||
else
|
||||
logger -t openvpn "error: Could not update CRL"
|
||||
|
||||
@@ -52,376 +52,267 @@ usr/lib/bfd-plugins/libdep.so
|
||||
#usr/lib/ldscripts/aarch64elf.xbn
|
||||
#usr/lib/ldscripts/aarch64elf.xc
|
||||
#usr/lib/ldscripts/aarch64elf.xce
|
||||
#usr/lib/ldscripts/aarch64elf.xcer
|
||||
#usr/lib/ldscripts/aarch64elf.xd
|
||||
#usr/lib/ldscripts/aarch64elf.xdc
|
||||
#usr/lib/ldscripts/aarch64elf.xdce
|
||||
#usr/lib/ldscripts/aarch64elf.xdcer
|
||||
#usr/lib/ldscripts/aarch64elf.xde
|
||||
#usr/lib/ldscripts/aarch64elf.xder
|
||||
#usr/lib/ldscripts/aarch64elf.xdw
|
||||
#usr/lib/ldscripts/aarch64elf.xdwe
|
||||
#usr/lib/ldscripts/aarch64elf.xdwer
|
||||
#usr/lib/ldscripts/aarch64elf.xe
|
||||
#usr/lib/ldscripts/aarch64elf.xer
|
||||
#usr/lib/ldscripts/aarch64elf.xn
|
||||
#usr/lib/ldscripts/aarch64elf.xr
|
||||
#usr/lib/ldscripts/aarch64elf.xs
|
||||
#usr/lib/ldscripts/aarch64elf.xsc
|
||||
#usr/lib/ldscripts/aarch64elf.xsce
|
||||
#usr/lib/ldscripts/aarch64elf.xscer
|
||||
#usr/lib/ldscripts/aarch64elf.xse
|
||||
#usr/lib/ldscripts/aarch64elf.xser
|
||||
#usr/lib/ldscripts/aarch64elf.xsw
|
||||
#usr/lib/ldscripts/aarch64elf.xswe
|
||||
#usr/lib/ldscripts/aarch64elf.xswer
|
||||
#usr/lib/ldscripts/aarch64elf.xu
|
||||
#usr/lib/ldscripts/aarch64elf.xw
|
||||
#usr/lib/ldscripts/aarch64elf.xwe
|
||||
#usr/lib/ldscripts/aarch64elf.xwer
|
||||
#usr/lib/ldscripts/aarch64elf32.x
|
||||
#usr/lib/ldscripts/aarch64elf32.xbn
|
||||
#usr/lib/ldscripts/aarch64elf32.xc
|
||||
#usr/lib/ldscripts/aarch64elf32.xce
|
||||
#usr/lib/ldscripts/aarch64elf32.xcer
|
||||
#usr/lib/ldscripts/aarch64elf32.xd
|
||||
#usr/lib/ldscripts/aarch64elf32.xdc
|
||||
#usr/lib/ldscripts/aarch64elf32.xdce
|
||||
#usr/lib/ldscripts/aarch64elf32.xdcer
|
||||
#usr/lib/ldscripts/aarch64elf32.xde
|
||||
#usr/lib/ldscripts/aarch64elf32.xder
|
||||
#usr/lib/ldscripts/aarch64elf32.xdw
|
||||
#usr/lib/ldscripts/aarch64elf32.xdwe
|
||||
#usr/lib/ldscripts/aarch64elf32.xdwer
|
||||
#usr/lib/ldscripts/aarch64elf32.xe
|
||||
#usr/lib/ldscripts/aarch64elf32.xer
|
||||
#usr/lib/ldscripts/aarch64elf32.xn
|
||||
#usr/lib/ldscripts/aarch64elf32.xr
|
||||
#usr/lib/ldscripts/aarch64elf32.xs
|
||||
#usr/lib/ldscripts/aarch64elf32.xsc
|
||||
#usr/lib/ldscripts/aarch64elf32.xsce
|
||||
#usr/lib/ldscripts/aarch64elf32.xscer
|
||||
#usr/lib/ldscripts/aarch64elf32.xse
|
||||
#usr/lib/ldscripts/aarch64elf32.xser
|
||||
#usr/lib/ldscripts/aarch64elf32.xsw
|
||||
#usr/lib/ldscripts/aarch64elf32.xswe
|
||||
#usr/lib/ldscripts/aarch64elf32.xswer
|
||||
#usr/lib/ldscripts/aarch64elf32.xu
|
||||
#usr/lib/ldscripts/aarch64elf32.xw
|
||||
#usr/lib/ldscripts/aarch64elf32.xwe
|
||||
#usr/lib/ldscripts/aarch64elf32.xwer
|
||||
#usr/lib/ldscripts/aarch64elf32b.x
|
||||
#usr/lib/ldscripts/aarch64elf32b.xbn
|
||||
#usr/lib/ldscripts/aarch64elf32b.xc
|
||||
#usr/lib/ldscripts/aarch64elf32b.xce
|
||||
#usr/lib/ldscripts/aarch64elf32b.xcer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xd
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdc
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdce
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdcer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xde
|
||||
#usr/lib/ldscripts/aarch64elf32b.xder
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdw
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdwe
|
||||
#usr/lib/ldscripts/aarch64elf32b.xdwer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xe
|
||||
#usr/lib/ldscripts/aarch64elf32b.xer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xn
|
||||
#usr/lib/ldscripts/aarch64elf32b.xr
|
||||
#usr/lib/ldscripts/aarch64elf32b.xs
|
||||
#usr/lib/ldscripts/aarch64elf32b.xsc
|
||||
#usr/lib/ldscripts/aarch64elf32b.xsce
|
||||
#usr/lib/ldscripts/aarch64elf32b.xscer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xse
|
||||
#usr/lib/ldscripts/aarch64elf32b.xser
|
||||
#usr/lib/ldscripts/aarch64elf32b.xsw
|
||||
#usr/lib/ldscripts/aarch64elf32b.xswe
|
||||
#usr/lib/ldscripts/aarch64elf32b.xswer
|
||||
#usr/lib/ldscripts/aarch64elf32b.xu
|
||||
#usr/lib/ldscripts/aarch64elf32b.xw
|
||||
#usr/lib/ldscripts/aarch64elf32b.xwe
|
||||
#usr/lib/ldscripts/aarch64elf32b.xwer
|
||||
#usr/lib/ldscripts/aarch64elfb.x
|
||||
#usr/lib/ldscripts/aarch64elfb.xbn
|
||||
#usr/lib/ldscripts/aarch64elfb.xc
|
||||
#usr/lib/ldscripts/aarch64elfb.xce
|
||||
#usr/lib/ldscripts/aarch64elfb.xcer
|
||||
#usr/lib/ldscripts/aarch64elfb.xd
|
||||
#usr/lib/ldscripts/aarch64elfb.xdc
|
||||
#usr/lib/ldscripts/aarch64elfb.xdce
|
||||
#usr/lib/ldscripts/aarch64elfb.xdcer
|
||||
#usr/lib/ldscripts/aarch64elfb.xde
|
||||
#usr/lib/ldscripts/aarch64elfb.xder
|
||||
#usr/lib/ldscripts/aarch64elfb.xdw
|
||||
#usr/lib/ldscripts/aarch64elfb.xdwe
|
||||
#usr/lib/ldscripts/aarch64elfb.xdwer
|
||||
#usr/lib/ldscripts/aarch64elfb.xe
|
||||
#usr/lib/ldscripts/aarch64elfb.xer
|
||||
#usr/lib/ldscripts/aarch64elfb.xn
|
||||
#usr/lib/ldscripts/aarch64elfb.xr
|
||||
#usr/lib/ldscripts/aarch64elfb.xs
|
||||
#usr/lib/ldscripts/aarch64elfb.xsc
|
||||
#usr/lib/ldscripts/aarch64elfb.xsce
|
||||
#usr/lib/ldscripts/aarch64elfb.xscer
|
||||
#usr/lib/ldscripts/aarch64elfb.xse
|
||||
#usr/lib/ldscripts/aarch64elfb.xser
|
||||
#usr/lib/ldscripts/aarch64elfb.xsw
|
||||
#usr/lib/ldscripts/aarch64elfb.xswe
|
||||
#usr/lib/ldscripts/aarch64elfb.xswer
|
||||
#usr/lib/ldscripts/aarch64elfb.xu
|
||||
#usr/lib/ldscripts/aarch64elfb.xw
|
||||
#usr/lib/ldscripts/aarch64elfb.xwe
|
||||
#usr/lib/ldscripts/aarch64elfb.xwer
|
||||
#usr/lib/ldscripts/aarch64linux.x
|
||||
#usr/lib/ldscripts/aarch64linux.xbn
|
||||
#usr/lib/ldscripts/aarch64linux.xc
|
||||
#usr/lib/ldscripts/aarch64linux.xce
|
||||
#usr/lib/ldscripts/aarch64linux.xcer
|
||||
#usr/lib/ldscripts/aarch64linux.xd
|
||||
#usr/lib/ldscripts/aarch64linux.xdc
|
||||
#usr/lib/ldscripts/aarch64linux.xdce
|
||||
#usr/lib/ldscripts/aarch64linux.xdcer
|
||||
#usr/lib/ldscripts/aarch64linux.xde
|
||||
#usr/lib/ldscripts/aarch64linux.xder
|
||||
#usr/lib/ldscripts/aarch64linux.xdw
|
||||
#usr/lib/ldscripts/aarch64linux.xdwe
|
||||
#usr/lib/ldscripts/aarch64linux.xdwer
|
||||
#usr/lib/ldscripts/aarch64linux.xe
|
||||
#usr/lib/ldscripts/aarch64linux.xer
|
||||
#usr/lib/ldscripts/aarch64linux.xn
|
||||
#usr/lib/ldscripts/aarch64linux.xr
|
||||
#usr/lib/ldscripts/aarch64linux.xs
|
||||
#usr/lib/ldscripts/aarch64linux.xsc
|
||||
#usr/lib/ldscripts/aarch64linux.xsce
|
||||
#usr/lib/ldscripts/aarch64linux.xscer
|
||||
#usr/lib/ldscripts/aarch64linux.xse
|
||||
#usr/lib/ldscripts/aarch64linux.xser
|
||||
#usr/lib/ldscripts/aarch64linux.xsw
|
||||
#usr/lib/ldscripts/aarch64linux.xswe
|
||||
#usr/lib/ldscripts/aarch64linux.xswer
|
||||
#usr/lib/ldscripts/aarch64linux.xu
|
||||
#usr/lib/ldscripts/aarch64linux.xw
|
||||
#usr/lib/ldscripts/aarch64linux.xwe
|
||||
#usr/lib/ldscripts/aarch64linux.xwer
|
||||
#usr/lib/ldscripts/aarch64linux32.x
|
||||
#usr/lib/ldscripts/aarch64linux32.xbn
|
||||
#usr/lib/ldscripts/aarch64linux32.xc
|
||||
#usr/lib/ldscripts/aarch64linux32.xce
|
||||
#usr/lib/ldscripts/aarch64linux32.xcer
|
||||
#usr/lib/ldscripts/aarch64linux32.xd
|
||||
#usr/lib/ldscripts/aarch64linux32.xdc
|
||||
#usr/lib/ldscripts/aarch64linux32.xdce
|
||||
#usr/lib/ldscripts/aarch64linux32.xdcer
|
||||
#usr/lib/ldscripts/aarch64linux32.xde
|
||||
#usr/lib/ldscripts/aarch64linux32.xder
|
||||
#usr/lib/ldscripts/aarch64linux32.xdw
|
||||
#usr/lib/ldscripts/aarch64linux32.xdwe
|
||||
#usr/lib/ldscripts/aarch64linux32.xdwer
|
||||
#usr/lib/ldscripts/aarch64linux32.xe
|
||||
#usr/lib/ldscripts/aarch64linux32.xer
|
||||
#usr/lib/ldscripts/aarch64linux32.xn
|
||||
#usr/lib/ldscripts/aarch64linux32.xr
|
||||
#usr/lib/ldscripts/aarch64linux32.xs
|
||||
#usr/lib/ldscripts/aarch64linux32.xsc
|
||||
#usr/lib/ldscripts/aarch64linux32.xsce
|
||||
#usr/lib/ldscripts/aarch64linux32.xscer
|
||||
#usr/lib/ldscripts/aarch64linux32.xse
|
||||
#usr/lib/ldscripts/aarch64linux32.xser
|
||||
#usr/lib/ldscripts/aarch64linux32.xsw
|
||||
#usr/lib/ldscripts/aarch64linux32.xswe
|
||||
#usr/lib/ldscripts/aarch64linux32.xswer
|
||||
#usr/lib/ldscripts/aarch64linux32.xu
|
||||
#usr/lib/ldscripts/aarch64linux32.xw
|
||||
#usr/lib/ldscripts/aarch64linux32.xwe
|
||||
#usr/lib/ldscripts/aarch64linux32.xwer
|
||||
#usr/lib/ldscripts/aarch64linux32b.x
|
||||
#usr/lib/ldscripts/aarch64linux32b.xbn
|
||||
#usr/lib/ldscripts/aarch64linux32b.xc
|
||||
#usr/lib/ldscripts/aarch64linux32b.xce
|
||||
#usr/lib/ldscripts/aarch64linux32b.xcer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xd
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdc
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdce
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdcer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xde
|
||||
#usr/lib/ldscripts/aarch64linux32b.xder
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdw
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdwe
|
||||
#usr/lib/ldscripts/aarch64linux32b.xdwer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xe
|
||||
#usr/lib/ldscripts/aarch64linux32b.xer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xn
|
||||
#usr/lib/ldscripts/aarch64linux32b.xr
|
||||
#usr/lib/ldscripts/aarch64linux32b.xs
|
||||
#usr/lib/ldscripts/aarch64linux32b.xsc
|
||||
#usr/lib/ldscripts/aarch64linux32b.xsce
|
||||
#usr/lib/ldscripts/aarch64linux32b.xscer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xse
|
||||
#usr/lib/ldscripts/aarch64linux32b.xser
|
||||
#usr/lib/ldscripts/aarch64linux32b.xsw
|
||||
#usr/lib/ldscripts/aarch64linux32b.xswe
|
||||
#usr/lib/ldscripts/aarch64linux32b.xswer
|
||||
#usr/lib/ldscripts/aarch64linux32b.xu
|
||||
#usr/lib/ldscripts/aarch64linux32b.xw
|
||||
#usr/lib/ldscripts/aarch64linux32b.xwe
|
||||
#usr/lib/ldscripts/aarch64linux32b.xwer
|
||||
#usr/lib/ldscripts/aarch64linuxb.x
|
||||
#usr/lib/ldscripts/aarch64linuxb.xbn
|
||||
#usr/lib/ldscripts/aarch64linuxb.xc
|
||||
#usr/lib/ldscripts/aarch64linuxb.xce
|
||||
#usr/lib/ldscripts/aarch64linuxb.xcer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xd
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdc
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdce
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdcer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xde
|
||||
#usr/lib/ldscripts/aarch64linuxb.xder
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdw
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdwe
|
||||
#usr/lib/ldscripts/aarch64linuxb.xdwer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xe
|
||||
#usr/lib/ldscripts/aarch64linuxb.xer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xn
|
||||
#usr/lib/ldscripts/aarch64linuxb.xr
|
||||
#usr/lib/ldscripts/aarch64linuxb.xs
|
||||
#usr/lib/ldscripts/aarch64linuxb.xsc
|
||||
#usr/lib/ldscripts/aarch64linuxb.xsce
|
||||
#usr/lib/ldscripts/aarch64linuxb.xscer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xse
|
||||
#usr/lib/ldscripts/aarch64linuxb.xser
|
||||
#usr/lib/ldscripts/aarch64linuxb.xsw
|
||||
#usr/lib/ldscripts/aarch64linuxb.xswe
|
||||
#usr/lib/ldscripts/aarch64linuxb.xswer
|
||||
#usr/lib/ldscripts/aarch64linuxb.xu
|
||||
#usr/lib/ldscripts/aarch64linuxb.xw
|
||||
#usr/lib/ldscripts/aarch64linuxb.xwe
|
||||
#usr/lib/ldscripts/aarch64linuxb.xwer
|
||||
#usr/lib/ldscripts/armelf.x
|
||||
#usr/lib/ldscripts/armelf.xbn
|
||||
#usr/lib/ldscripts/armelf.xc
|
||||
#usr/lib/ldscripts/armelf.xce
|
||||
#usr/lib/ldscripts/armelf.xcer
|
||||
#usr/lib/ldscripts/armelf.xd
|
||||
#usr/lib/ldscripts/armelf.xdc
|
||||
#usr/lib/ldscripts/armelf.xdce
|
||||
#usr/lib/ldscripts/armelf.xdcer
|
||||
#usr/lib/ldscripts/armelf.xde
|
||||
#usr/lib/ldscripts/armelf.xder
|
||||
#usr/lib/ldscripts/armelf.xdw
|
||||
#usr/lib/ldscripts/armelf.xdwe
|
||||
#usr/lib/ldscripts/armelf.xdwer
|
||||
#usr/lib/ldscripts/armelf.xe
|
||||
#usr/lib/ldscripts/armelf.xer
|
||||
#usr/lib/ldscripts/armelf.xn
|
||||
#usr/lib/ldscripts/armelf.xr
|
||||
#usr/lib/ldscripts/armelf.xs
|
||||
#usr/lib/ldscripts/armelf.xsc
|
||||
#usr/lib/ldscripts/armelf.xsce
|
||||
#usr/lib/ldscripts/armelf.xscer
|
||||
#usr/lib/ldscripts/armelf.xse
|
||||
#usr/lib/ldscripts/armelf.xser
|
||||
#usr/lib/ldscripts/armelf.xsw
|
||||
#usr/lib/ldscripts/armelf.xswe
|
||||
#usr/lib/ldscripts/armelf.xswer
|
||||
#usr/lib/ldscripts/armelf.xu
|
||||
#usr/lib/ldscripts/armelf.xw
|
||||
#usr/lib/ldscripts/armelf.xwe
|
||||
#usr/lib/ldscripts/armelf.xwer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.x
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xbn
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xc
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xce
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xcer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xd
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdc
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdce
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdcer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xde
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xder
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdw
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdwe
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xdwer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xe
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xn
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xr
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xs
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xsc
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xsce
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xscer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xse
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xser
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xsw
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xswe
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xswer
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xu
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xw
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xwe
|
||||
#usr/lib/ldscripts/armelf_linux_eabi.xwer
|
||||
#usr/lib/ldscripts/armelfb.x
|
||||
#usr/lib/ldscripts/armelfb.xbn
|
||||
#usr/lib/ldscripts/armelfb.xc
|
||||
#usr/lib/ldscripts/armelfb.xce
|
||||
#usr/lib/ldscripts/armelfb.xcer
|
||||
#usr/lib/ldscripts/armelfb.xd
|
||||
#usr/lib/ldscripts/armelfb.xdc
|
||||
#usr/lib/ldscripts/armelfb.xdce
|
||||
#usr/lib/ldscripts/armelfb.xdcer
|
||||
#usr/lib/ldscripts/armelfb.xde
|
||||
#usr/lib/ldscripts/armelfb.xder
|
||||
#usr/lib/ldscripts/armelfb.xdw
|
||||
#usr/lib/ldscripts/armelfb.xdwe
|
||||
#usr/lib/ldscripts/armelfb.xdwer
|
||||
#usr/lib/ldscripts/armelfb.xe
|
||||
#usr/lib/ldscripts/armelfb.xer
|
||||
#usr/lib/ldscripts/armelfb.xn
|
||||
#usr/lib/ldscripts/armelfb.xr
|
||||
#usr/lib/ldscripts/armelfb.xs
|
||||
#usr/lib/ldscripts/armelfb.xsc
|
||||
#usr/lib/ldscripts/armelfb.xsce
|
||||
#usr/lib/ldscripts/armelfb.xscer
|
||||
#usr/lib/ldscripts/armelfb.xse
|
||||
#usr/lib/ldscripts/armelfb.xser
|
||||
#usr/lib/ldscripts/armelfb.xsw
|
||||
#usr/lib/ldscripts/armelfb.xswe
|
||||
#usr/lib/ldscripts/armelfb.xswer
|
||||
#usr/lib/ldscripts/armelfb.xu
|
||||
#usr/lib/ldscripts/armelfb.xw
|
||||
#usr/lib/ldscripts/armelfb.xwe
|
||||
#usr/lib/ldscripts/armelfb.xwer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.x
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xbn
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xc
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xce
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xcer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xd
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdc
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdce
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdcer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xde
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xder
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdw
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdwe
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xdwer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xe
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xn
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xr
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xs
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xsc
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xsce
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xscer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xse
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xser
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xsw
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xswe
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xswer
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xu
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xw
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xwe
|
||||
#usr/lib/ldscripts/armelfb_linux_eabi.xwer
|
||||
#usr/lib/ldscripts/stamp
|
||||
usr/lib/libbfd-2.43.so
|
||||
usr/lib/libbfd-2.41.so
|
||||
#usr/lib/libbfd.a
|
||||
#usr/lib/libbfd.la
|
||||
#usr/lib/libbfd.so
|
||||
@@ -440,7 +331,7 @@ usr/lib/libctf.so.0.0.0
|
||||
#usr/lib/libgprofng.so
|
||||
usr/lib/libgprofng.so.0
|
||||
usr/lib/libgprofng.so.0.0.0
|
||||
usr/lib/libopcodes-2.43.so
|
||||
usr/lib/libopcodes-2.41.so
|
||||
#usr/lib/libopcodes.a
|
||||
#usr/lib/libopcodes.la
|
||||
#usr/lib/libopcodes.so
|
||||
@@ -514,7 +405,6 @@ usr/lib/libsframe.so.1.0.0
|
||||
#usr/share/locale/ja/LC_MESSAGES/ld.mo
|
||||
#usr/share/locale/ka/LC_MESSAGES/bfd.mo
|
||||
#usr/share/locale/ka/LC_MESSAGES/gprof.mo
|
||||
#usr/share/locale/ka/LC_MESSAGES/ld.mo
|
||||
#usr/share/locale/ms
|
||||
#usr/share/locale/ms/LC_MESSAGES
|
||||
#usr/share/locale/ms/LC_MESSAGES/gprof.mo
|
||||
@@ -527,9 +417,7 @@ usr/lib/libsframe.so.1.0.0
|
||||
#usr/share/locale/pt_BR/LC_MESSAGES/opcodes.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/bfd.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/binutils.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/gas.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/gprof.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/ld.mo
|
||||
#usr/share/locale/ro/LC_MESSAGES/opcodes.mo
|
||||
#usr/share/locale/ru/LC_MESSAGES/bfd.mo
|
||||
#usr/share/locale/ru/LC_MESSAGES/binutils.mo
|
||||
|
||||
28
config/rootfiles/common/aarch64/dtc
Normal file
28
config/rootfiles/common/aarch64/dtc
Normal file
@@ -0,0 +1,28 @@
|
||||
#bin/convert-dtsv0
|
||||
#bin/dtc
|
||||
#bin/dtdiff
|
||||
#bin/fdtdump
|
||||
#bin/fdtget
|
||||
#bin/fdtoverlay
|
||||
#bin/fdtput
|
||||
#include
|
||||
#include/fdt.h
|
||||
#include/libfdt.h
|
||||
#include/libfdt_env.h
|
||||
#lib/libfdt-1.6.1.so
|
||||
#lib/libfdt.a
|
||||
#lib/libfdt.so
|
||||
#lib/libfdt.so.1
|
||||
#lib/python3.10
|
||||
#lib/python3.10/site-packages
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/PKG-INFO
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/SOURCES.txt
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/dependency_links.txt
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/native_libs.txt
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/not-zip-safe
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/top_level.txt
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.cpython-310-aarch64-linux-gnu.so
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.py
|
||||
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/libfdt.py
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,9 @@
|
||||
#usr/include/sim
|
||||
#usr/include/sim/callback.h
|
||||
#usr/include/sim/sim.h
|
||||
#usr/lib/libaarch64-unknown-linux-gnu-sim.a
|
||||
#usr/lib/libinproctrace.so
|
||||
#usr/lib/libsim.a
|
||||
#usr/share/gdb
|
||||
#usr/share/gdb/python
|
||||
#usr/share/gdb/python/gdb
|
||||
#usr/share/gdb/python/gdb/FrameDecorator.py
|
||||
@@ -24,30 +25,6 @@
|
||||
#usr/share/gdb/python/gdb/command/type_printers.py
|
||||
#usr/share/gdb/python/gdb/command/unwinders.py
|
||||
#usr/share/gdb/python/gdb/command/xmethods.py
|
||||
#usr/share/gdb/python/gdb/dap
|
||||
#usr/share/gdb/python/gdb/dap/__init__.py
|
||||
#usr/share/gdb/python/gdb/dap/breakpoint.py
|
||||
#usr/share/gdb/python/gdb/dap/bt.py
|
||||
#usr/share/gdb/python/gdb/dap/disassemble.py
|
||||
#usr/share/gdb/python/gdb/dap/evaluate.py
|
||||
#usr/share/gdb/python/gdb/dap/events.py
|
||||
#usr/share/gdb/python/gdb/dap/frames.py
|
||||
#usr/share/gdb/python/gdb/dap/io.py
|
||||
#usr/share/gdb/python/gdb/dap/launch.py
|
||||
#usr/share/gdb/python/gdb/dap/locations.py
|
||||
#usr/share/gdb/python/gdb/dap/memory.py
|
||||
#usr/share/gdb/python/gdb/dap/modules.py
|
||||
#usr/share/gdb/python/gdb/dap/next.py
|
||||
#usr/share/gdb/python/gdb/dap/pause.py
|
||||
#usr/share/gdb/python/gdb/dap/scopes.py
|
||||
#usr/share/gdb/python/gdb/dap/server.py
|
||||
#usr/share/gdb/python/gdb/dap/sources.py
|
||||
#usr/share/gdb/python/gdb/dap/startup.py
|
||||
#usr/share/gdb/python/gdb/dap/state.py
|
||||
#usr/share/gdb/python/gdb/dap/threads.py
|
||||
#usr/share/gdb/python/gdb/dap/typecheck.py
|
||||
#usr/share/gdb/python/gdb/dap/varref.py
|
||||
#usr/share/gdb/python/gdb/disassembler.py
|
||||
#usr/share/gdb/python/gdb/frames.py
|
||||
#usr/share/gdb/python/gdb/function
|
||||
#usr/share/gdb/python/gdb/function/__init__.py
|
||||
@@ -59,7 +36,6 @@
|
||||
#usr/share/gdb/python/gdb/printer/bound_registers.py
|
||||
#usr/share/gdb/python/gdb/printing.py
|
||||
#usr/share/gdb/python/gdb/prompt.py
|
||||
#usr/share/gdb/python/gdb/styling.py
|
||||
#usr/share/gdb/python/gdb/types.py
|
||||
#usr/share/gdb/python/gdb/unwinder.py
|
||||
#usr/share/gdb/python/gdb/xmethod.py
|
||||
@@ -93,7 +69,6 @@
|
||||
#usr/share/info/gdb.info-6
|
||||
#usr/share/info/gdb.info-7
|
||||
#usr/share/info/gdb.info-8
|
||||
#usr/share/info/gdb.info-9
|
||||
#usr/share/info/stabs.info
|
||||
#usr/share/man/man1/gcore.1
|
||||
#usr/share/man/man1/gdb-add-index.1
|
||||
|
||||
@@ -124,7 +124,6 @@ usr/bin/locale
|
||||
#usr/include/bits/netdb.h
|
||||
#usr/include/bits/param.h
|
||||
#usr/include/bits/poll.h
|
||||
#usr/include/bits/platform/features.h
|
||||
#usr/include/bits/poll2.h
|
||||
#usr/include/bits/posix1_lim.h
|
||||
#usr/include/bits/posix2_lim.h
|
||||
@@ -169,7 +168,6 @@ usr/bin/locale
|
||||
#usr/include/bits/socket.h
|
||||
#usr/include/bits/socket2.h
|
||||
#usr/include/bits/socket_type.h
|
||||
#usr/include/bits/spawn_ext.h
|
||||
#usr/include/bits/ss_flags.h
|
||||
#usr/include/bits/stab.def
|
||||
#usr/include/bits/stat.h
|
||||
@@ -178,7 +176,6 @@ usr/bin/locale
|
||||
#usr/include/bits/statx-generic.h
|
||||
#usr/include/bits/statx.h
|
||||
#usr/include/bits/stdint-intn.h
|
||||
#usr/include/bits/stdint-least.h
|
||||
#usr/include/bits/stdint-uintn.h
|
||||
#usr/include/bits/stdio-ldbl.h
|
||||
#usr/include/bits/stdio.h
|
||||
@@ -420,7 +417,6 @@ usr/bin/locale
|
||||
#usr/include/signal.h
|
||||
#usr/include/spawn.h
|
||||
#usr/include/stab.h
|
||||
#usr/include/stdbit.h
|
||||
#usr/include/stdc-predef.h
|
||||
#usr/include/stdint.h
|
||||
#usr/include/stdio.h
|
||||
@@ -812,7 +808,7 @@ usr/lib/gconv
|
||||
#usr/lib/libc_nonshared.a
|
||||
#usr/lib/libdl.a
|
||||
#usr/lib/libg.a
|
||||
#usr/lib/libm-2.40.a
|
||||
#usr/lib/libm-2.38.a
|
||||
#usr/lib/libm.a
|
||||
#usr/lib/libm.so
|
||||
#usr/lib/libmcheck.a
|
||||
@@ -884,6 +880,20 @@ usr/lib/locale
|
||||
#usr/lib/locale/aa_ER/LC_PAPER
|
||||
#usr/lib/locale/aa_ER/LC_TELEPHONE
|
||||
#usr/lib/locale/aa_ER/LC_TIME
|
||||
#usr/lib/locale/aa_ER@saaho
|
||||
#usr/lib/locale/aa_ER@saaho/LC_ADDRESS
|
||||
#usr/lib/locale/aa_ER@saaho/LC_COLLATE
|
||||
#usr/lib/locale/aa_ER@saaho/LC_CTYPE
|
||||
#usr/lib/locale/aa_ER@saaho/LC_IDENTIFICATION
|
||||
#usr/lib/locale/aa_ER@saaho/LC_MEASUREMENT
|
||||
#usr/lib/locale/aa_ER@saaho/LC_MESSAGES
|
||||
#usr/lib/locale/aa_ER@saaho/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/aa_ER@saaho/LC_MONETARY
|
||||
#usr/lib/locale/aa_ER@saaho/LC_NAME
|
||||
#usr/lib/locale/aa_ER@saaho/LC_NUMERIC
|
||||
#usr/lib/locale/aa_ER@saaho/LC_PAPER
|
||||
#usr/lib/locale/aa_ER@saaho/LC_TELEPHONE
|
||||
#usr/lib/locale/aa_ER@saaho/LC_TIME
|
||||
#usr/lib/locale/aa_ET
|
||||
#usr/lib/locale/aa_ET/LC_ADDRESS
|
||||
#usr/lib/locale/aa_ET/LC_COLLATE
|
||||
@@ -2116,20 +2126,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/cmn_TW/LC_PAPER
|
||||
#usr/lib/locale/cmn_TW/LC_TELEPHONE
|
||||
#usr/lib/locale/cmn_TW/LC_TIME
|
||||
#usr/lib/locale/crh_RU
|
||||
#usr/lib/locale/crh_RU/LC_ADDRESS
|
||||
#usr/lib/locale/crh_RU/LC_COLLATE
|
||||
#usr/lib/locale/crh_RU/LC_CTYPE
|
||||
#usr/lib/locale/crh_RU/LC_IDENTIFICATION
|
||||
#usr/lib/locale/crh_RU/LC_MEASUREMENT
|
||||
#usr/lib/locale/crh_RU/LC_MESSAGES
|
||||
#usr/lib/locale/crh_RU/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/crh_RU/LC_MONETARY
|
||||
#usr/lib/locale/crh_RU/LC_NAME
|
||||
#usr/lib/locale/crh_RU/LC_NUMERIC
|
||||
#usr/lib/locale/crh_RU/LC_PAPER
|
||||
#usr/lib/locale/crh_RU/LC_TELEPHONE
|
||||
#usr/lib/locale/crh_RU/LC_TIME
|
||||
#usr/lib/locale/crh_UA
|
||||
#usr/lib/locale/crh_UA/LC_ADDRESS
|
||||
#usr/lib/locale/crh_UA/LC_COLLATE
|
||||
@@ -4146,20 +4142,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/ga_IE@euro/LC_PAPER
|
||||
#usr/lib/locale/ga_IE@euro/LC_TELEPHONE
|
||||
#usr/lib/locale/ga_IE@euro/LC_TIME
|
||||
#usr/lib/locale/gbm_IN
|
||||
#usr/lib/locale/gbm_IN/LC_ADDRESS
|
||||
#usr/lib/locale/gbm_IN/LC_COLLATE
|
||||
#usr/lib/locale/gbm_IN/LC_CTYPE
|
||||
#usr/lib/locale/gbm_IN/LC_IDENTIFICATION
|
||||
#usr/lib/locale/gbm_IN/LC_MEASUREMENT
|
||||
#usr/lib/locale/gbm_IN/LC_MESSAGES
|
||||
#usr/lib/locale/gbm_IN/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/gbm_IN/LC_MONETARY
|
||||
#usr/lib/locale/gbm_IN/LC_NAME
|
||||
#usr/lib/locale/gbm_IN/LC_NUMERIC
|
||||
#usr/lib/locale/gbm_IN/LC_PAPER
|
||||
#usr/lib/locale/gbm_IN/LC_TELEPHONE
|
||||
#usr/lib/locale/gbm_IN/LC_TIME
|
||||
#usr/lib/locale/gd_GB
|
||||
#usr/lib/locale/gd_GB.utf8
|
||||
#usr/lib/locale/gd_GB.utf8/LC_ADDRESS
|
||||
@@ -4986,20 +4968,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/ku_TR/LC_PAPER
|
||||
#usr/lib/locale/ku_TR/LC_TELEPHONE
|
||||
#usr/lib/locale/ku_TR/LC_TIME
|
||||
#usr/lib/locale/kv_RU
|
||||
#usr/lib/locale/kv_RU/LC_ADDRESS
|
||||
#usr/lib/locale/kv_RU/LC_COLLATE
|
||||
#usr/lib/locale/kv_RU/LC_CTYPE
|
||||
#usr/lib/locale/kv_RU/LC_IDENTIFICATION
|
||||
#usr/lib/locale/kv_RU/LC_MEASUREMENT
|
||||
#usr/lib/locale/kv_RU/LC_MESSAGES
|
||||
#usr/lib/locale/kv_RU/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/kv_RU/LC_MONETARY
|
||||
#usr/lib/locale/kv_RU/LC_NAME
|
||||
#usr/lib/locale/kv_RU/LC_NUMERIC
|
||||
#usr/lib/locale/kv_RU/LC_PAPER
|
||||
#usr/lib/locale/kv_RU/LC_TELEPHONE
|
||||
#usr/lib/locale/kv_RU/LC_TIME
|
||||
#usr/lib/locale/kw_GB
|
||||
#usr/lib/locale/kw_GB.utf8
|
||||
#usr/lib/locale/kw_GB.utf8/LC_ADDRESS
|
||||
@@ -5182,20 +5150,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/lt_LT/LC_PAPER
|
||||
#usr/lib/locale/lt_LT/LC_TELEPHONE
|
||||
#usr/lib/locale/lt_LT/LC_TIME
|
||||
#usr/lib/locale/ltg_LV.utf8
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_ADDRESS
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_COLLATE
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_CTYPE
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_IDENTIFICATION
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_MEASUREMENT
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_MESSAGES
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_MONETARY
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_NAME
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_NUMERIC
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_PAPER
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_TELEPHONE
|
||||
#usr/lib/locale/ltg_LV.utf8/LC_TIME
|
||||
#usr/lib/locale/lv_LV
|
||||
#usr/lib/locale/lv_LV.utf8
|
||||
#usr/lib/locale/lv_LV.utf8/LC_ADDRESS
|
||||
@@ -5280,20 +5234,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/mai_NP/LC_PAPER
|
||||
#usr/lib/locale/mai_NP/LC_TELEPHONE
|
||||
#usr/lib/locale/mai_NP/LC_TIME
|
||||
#usr/lib/locale/mdf_RU
|
||||
#usr/lib/locale/mdf_RU/LC_ADDRESS
|
||||
#usr/lib/locale/mdf_RU/LC_COLLATE
|
||||
#usr/lib/locale/mdf_RU/LC_CTYPE
|
||||
#usr/lib/locale/mdf_RU/LC_IDENTIFICATION
|
||||
#usr/lib/locale/mdf_RU/LC_MEASUREMENT
|
||||
#usr/lib/locale/mdf_RU/LC_MESSAGES
|
||||
#usr/lib/locale/mdf_RU/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/mdf_RU/LC_MONETARY
|
||||
#usr/lib/locale/mdf_RU/LC_NAME
|
||||
#usr/lib/locale/mdf_RU/LC_NUMERIC
|
||||
#usr/lib/locale/mdf_RU/LC_PAPER
|
||||
#usr/lib/locale/mdf_RU/LC_TELEPHONE
|
||||
#usr/lib/locale/mdf_RU/LC_TIME
|
||||
#usr/lib/locale/mfe_MU
|
||||
#usr/lib/locale/mfe_MU/LC_ADDRESS
|
||||
#usr/lib/locale/mfe_MU/LC_COLLATE
|
||||
@@ -6344,20 +6284,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/sc_IT/LC_PAPER
|
||||
#usr/lib/locale/sc_IT/LC_TELEPHONE
|
||||
#usr/lib/locale/sc_IT/LC_TIME
|
||||
#usr/lib/locale/scn_IT
|
||||
#usr/lib/locale/scn_IT/LC_ADDRESS
|
||||
#usr/lib/locale/scn_IT/LC_COLLATE
|
||||
#usr/lib/locale/scn_IT/LC_CTYPE
|
||||
#usr/lib/locale/scn_IT/LC_IDENTIFICATION
|
||||
#usr/lib/locale/scn_IT/LC_MEASUREMENT
|
||||
#usr/lib/locale/scn_IT/LC_MESSAGES
|
||||
#usr/lib/locale/scn_IT/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/scn_IT/LC_MONETARY
|
||||
#usr/lib/locale/scn_IT/LC_NAME
|
||||
#usr/lib/locale/scn_IT/LC_NUMERIC
|
||||
#usr/lib/locale/scn_IT/LC_PAPER
|
||||
#usr/lib/locale/scn_IT/LC_TELEPHONE
|
||||
#usr/lib/locale/scn_IT/LC_TIME
|
||||
#usr/lib/locale/sd_IN
|
||||
#usr/lib/locale/sd_IN/LC_ADDRESS
|
||||
#usr/lib/locale/sd_IN/LC_COLLATE
|
||||
@@ -6736,20 +6662,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/ss_ZA/LC_PAPER
|
||||
#usr/lib/locale/ss_ZA/LC_TELEPHONE
|
||||
#usr/lib/locale/ss_ZA/LC_TIME
|
||||
#usr/lib/locale/ssy_ER
|
||||
#usr/lib/locale/ssy_ER/LC_ADDRESS
|
||||
#usr/lib/locale/ssy_ER/LC_COLLATE
|
||||
#usr/lib/locale/ssy_ER/LC_CTYPE
|
||||
#usr/lib/locale/ssy_ER/LC_IDENTIFICATION
|
||||
#usr/lib/locale/ssy_ER/LC_MEASUREMENT
|
||||
#usr/lib/locale/ssy_ER/LC_MESSAGES
|
||||
#usr/lib/locale/ssy_ER/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/ssy_ER/LC_MONETARY
|
||||
#usr/lib/locale/ssy_ER/LC_NAME
|
||||
#usr/lib/locale/ssy_ER/LC_NUMERIC
|
||||
#usr/lib/locale/ssy_ER/LC_PAPER
|
||||
#usr/lib/locale/ssy_ER/LC_TELEPHONE
|
||||
#usr/lib/locale/ssy_ER/LC_TIME
|
||||
#usr/lib/locale/st_ZA
|
||||
#usr/lib/locale/st_ZA.utf8
|
||||
#usr/lib/locale/st_ZA.utf8/LC_ADDRESS
|
||||
@@ -6778,20 +6690,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/st_ZA/LC_PAPER
|
||||
#usr/lib/locale/st_ZA/LC_TELEPHONE
|
||||
#usr/lib/locale/st_ZA/LC_TIME
|
||||
#usr/lib/locale/su_ID
|
||||
#usr/lib/locale/su_ID/LC_ADDRESS
|
||||
#usr/lib/locale/su_ID/LC_COLLATE
|
||||
#usr/lib/locale/su_ID/LC_CTYPE
|
||||
#usr/lib/locale/su_ID/LC_IDENTIFICATION
|
||||
#usr/lib/locale/su_ID/LC_MEASUREMENT
|
||||
#usr/lib/locale/su_ID/LC_MESSAGES
|
||||
#usr/lib/locale/su_ID/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/su_ID/LC_MONETARY
|
||||
#usr/lib/locale/su_ID/LC_NAME
|
||||
#usr/lib/locale/su_ID/LC_NUMERIC
|
||||
#usr/lib/locale/su_ID/LC_PAPER
|
||||
#usr/lib/locale/su_ID/LC_TELEPHONE
|
||||
#usr/lib/locale/su_ID/LC_TIME
|
||||
#usr/lib/locale/sv_FI
|
||||
#usr/lib/locale/sv_FI.utf8
|
||||
#usr/lib/locale/sv_FI.utf8/LC_ADDRESS
|
||||
@@ -7156,20 +7054,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/to_TO/LC_PAPER
|
||||
#usr/lib/locale/to_TO/LC_TELEPHONE
|
||||
#usr/lib/locale/to_TO/LC_TIME
|
||||
#usr/lib/locale/tok
|
||||
#usr/lib/locale/tok/LC_ADDRESS
|
||||
#usr/lib/locale/tok/LC_COLLATE
|
||||
#usr/lib/locale/tok/LC_CTYPE
|
||||
#usr/lib/locale/tok/LC_IDENTIFICATION
|
||||
#usr/lib/locale/tok/LC_MEASUREMENT
|
||||
#usr/lib/locale/tok/LC_MESSAGES
|
||||
#usr/lib/locale/tok/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/tok/LC_MONETARY
|
||||
#usr/lib/locale/tok/LC_NAME
|
||||
#usr/lib/locale/tok/LC_NUMERIC
|
||||
#usr/lib/locale/tok/LC_PAPER
|
||||
#usr/lib/locale/tok/LC_TELEPHONE
|
||||
#usr/lib/locale/tok/LC_TIME
|
||||
#usr/lib/locale/tpi_PG
|
||||
#usr/lib/locale/tpi_PG/LC_ADDRESS
|
||||
#usr/lib/locale/tpi_PG/LC_COLLATE
|
||||
@@ -7618,20 +7502,6 @@ usr/lib/locale
|
||||
#usr/lib/locale/yuw_PG/LC_PAPER
|
||||
#usr/lib/locale/yuw_PG/LC_TELEPHONE
|
||||
#usr/lib/locale/yuw_PG/LC_TIME
|
||||
#usr/lib/locale/zgh_MA
|
||||
#usr/lib/locale/zgh_MA/LC_ADDRESS
|
||||
#usr/lib/locale/zgh_MA/LC_COLLATE
|
||||
#usr/lib/locale/zgh_MA/LC_CTYPE
|
||||
#usr/lib/locale/zgh_MA/LC_IDENTIFICATION
|
||||
#usr/lib/locale/zgh_MA/LC_MEASUREMENT
|
||||
#usr/lib/locale/zgh_MA/LC_MESSAGES
|
||||
#usr/lib/locale/zgh_MA/LC_MESSAGES/SYS_LC_MESSAGES
|
||||
#usr/lib/locale/zgh_MA/LC_MONETARY
|
||||
#usr/lib/locale/zgh_MA/LC_NAME
|
||||
#usr/lib/locale/zgh_MA/LC_NUMERIC
|
||||
#usr/lib/locale/zgh_MA/LC_PAPER
|
||||
#usr/lib/locale/zgh_MA/LC_TELEPHONE
|
||||
#usr/lib/locale/zgh_MA/LC_TIME
|
||||
#usr/lib/locale/zh_CN
|
||||
#usr/lib/locale/zh_CN.gb18030
|
||||
#usr/lib/locale/zh_CN.gb18030/LC_ADDRESS
|
||||
@@ -8071,6 +7941,7 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/POSIX
|
||||
#usr/share/i18n/locales/aa_DJ
|
||||
#usr/share/i18n/locales/aa_ER
|
||||
#usr/share/i18n/locales/aa_ER@saaho
|
||||
#usr/share/i18n/locales/aa_ET
|
||||
#usr/share/i18n/locales/ab_GE
|
||||
#usr/share/i18n/locales/af_ZA
|
||||
@@ -8133,7 +8004,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/ckb_IQ
|
||||
#usr/share/i18n/locales/cmn_TW
|
||||
#usr/share/i18n/locales/cns11643_stroke
|
||||
#usr/share/i18n/locales/crh_RU
|
||||
#usr/share/i18n/locales/crh_UA
|
||||
#usr/share/i18n/locales/cs_CZ
|
||||
#usr/share/i18n/locales/csb_PL
|
||||
@@ -8223,7 +8093,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/fy_NL
|
||||
#usr/share/i18n/locales/ga_IE
|
||||
#usr/share/i18n/locales/ga_IE@euro
|
||||
#usr/share/i18n/locales/gbm_IN
|
||||
#usr/share/i18n/locales/gd_GB
|
||||
#usr/share/i18n/locales/gez_ER
|
||||
#usr/share/i18n/locales/gez_ER@abegede
|
||||
@@ -8270,7 +8139,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/ks_IN
|
||||
#usr/share/i18n/locales/ks_IN@devanagari
|
||||
#usr/share/i18n/locales/ku_TR
|
||||
#usr/share/i18n/locales/kv_RU
|
||||
#usr/share/i18n/locales/kw_GB
|
||||
#usr/share/i18n/locales/ky_KG
|
||||
#usr/share/i18n/locales/lb_LU
|
||||
@@ -8281,13 +8149,11 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/ln_CD
|
||||
#usr/share/i18n/locales/lo_LA
|
||||
#usr/share/i18n/locales/lt_LT
|
||||
#usr/share/i18n/locales/ltg_LV
|
||||
#usr/share/i18n/locales/lv_LV
|
||||
#usr/share/i18n/locales/lzh_TW
|
||||
#usr/share/i18n/locales/mag_IN
|
||||
#usr/share/i18n/locales/mai_IN
|
||||
#usr/share/i18n/locales/mai_NP
|
||||
#usr/share/i18n/locales/mdf_RU
|
||||
#usr/share/i18n/locales/mfe_MU
|
||||
#usr/share/i18n/locales/mg_MG
|
||||
#usr/share/i18n/locales/mhr_RU
|
||||
@@ -8345,7 +8211,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/sah_RU
|
||||
#usr/share/i18n/locales/sat_IN
|
||||
#usr/share/i18n/locales/sc_IT
|
||||
#usr/share/i18n/locales/scn_IT
|
||||
#usr/share/i18n/locales/sd_IN
|
||||
#usr/share/i18n/locales/sd_IN@devanagari
|
||||
#usr/share/i18n/locales/se_NO
|
||||
@@ -8367,9 +8232,7 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/sr_RS
|
||||
#usr/share/i18n/locales/sr_RS@latin
|
||||
#usr/share/i18n/locales/ss_ZA
|
||||
#usr/share/i18n/locales/ssy_ER
|
||||
#usr/share/i18n/locales/st_ZA
|
||||
#usr/share/i18n/locales/su_ID
|
||||
#usr/share/i18n/locales/sv_FI
|
||||
#usr/share/i18n/locales/sv_FI@euro
|
||||
#usr/share/i18n/locales/sv_SE
|
||||
@@ -8391,7 +8254,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/tl_PH
|
||||
#usr/share/i18n/locales/tn_ZA
|
||||
#usr/share/i18n/locales/to_TO
|
||||
#usr/share/i18n/locales/tok
|
||||
#usr/share/i18n/locales/tpi_PG
|
||||
#usr/share/i18n/locales/tr_CY
|
||||
#usr/share/i18n/locales/tr_TR
|
||||
@@ -8400,7 +8262,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/translit_cjk_variants
|
||||
#usr/share/i18n/locales/translit_combining
|
||||
#usr/share/i18n/locales/translit_compat
|
||||
#usr/share/i18n/locales/translit_emojis
|
||||
#usr/share/i18n/locales/translit_font
|
||||
#usr/share/i18n/locales/translit_fraction
|
||||
#usr/share/i18n/locales/translit_hangul
|
||||
@@ -8430,7 +8291,6 @@ usr/lib/locale
|
||||
#usr/share/i18n/locales/yo_NG
|
||||
#usr/share/i18n/locales/yue_HK
|
||||
#usr/share/i18n/locales/yuw_PG
|
||||
#usr/share/i18n/locales/zgh_MA
|
||||
#usr/share/i18n/locales/zh_CN
|
||||
#usr/share/i18n/locales/zh_HK
|
||||
#usr/share/i18n/locales/zh_SG
|
||||
@@ -8448,7 +8308,6 @@ usr/lib/locale
|
||||
#usr/share/info/libc.info-16
|
||||
#usr/share/info/libc.info-17
|
||||
#usr/share/info/libc.info-18
|
||||
#usr/share/info/libc.info-19
|
||||
#usr/share/info/libc.info-2
|
||||
#usr/share/info/libc.info-3
|
||||
#usr/share/info/libc.info-4
|
||||
|
||||
@@ -26,7 +26,6 @@ etc/rc.d/init.d/firewall
|
||||
etc/rc.d/init.d/firstsetup
|
||||
etc/rc.d/init.d/fsresize
|
||||
etc/rc.d/init.d/functions
|
||||
etc/rc.d/init.d/grub-btrfsd
|
||||
etc/rc.d/init.d/halt
|
||||
etc/rc.d/init.d/ipsec
|
||||
etc/rc.d/init.d/leds
|
||||
@@ -93,11 +92,12 @@ etc/rc.d/init.d/unbound
|
||||
etc/rc.d/init.d/vnstat
|
||||
etc/rc.d/init.d/waitdrives
|
||||
etc/rc.d/init.d/wlanclient
|
||||
etc/rc.d/init.d/ddos
|
||||
#etc/rc.d/rc0.d
|
||||
etc/rc.d/rc0.d/K01grub-btrfsd
|
||||
#etc/rc.d/rc0.d/K01imspetor
|
||||
#etc/rc.d/rc0.d/K01motion
|
||||
#etc/rc.d/rc0.d/K01vdradmin
|
||||
#etc/rc.d/rc0.d/K02sslh
|
||||
etc/rc.d/rc0.d/K08fcron
|
||||
etc/rc.d/rc0.d/K28apache
|
||||
etc/rc.d/rc0.d/K30sshd
|
||||
@@ -136,15 +136,15 @@ etc/rc.d/rc3.d/S30sshd
|
||||
etc/rc.d/rc3.d/S32apache
|
||||
etc/rc.d/rc3.d/S40fcron
|
||||
etc/rc.d/rc3.d/S98rc.local
|
||||
etc/rc.d/rc3.d/S99grub-btrfsd
|
||||
#etc/rc.d/rc3.d/S98sslh
|
||||
#etc/rc.d/rc3.d/S99imspetor
|
||||
#etc/rc.d/rc3.d/S99motion
|
||||
#etc/rc.d/rc3.d/S99vdradmin
|
||||
#etc/rc.d/rc6.d
|
||||
etc/rc.d/rc6.d/K01grub-btrfsd
|
||||
#etc/rc.d/rc6.d/K01imspetor
|
||||
#etc/rc.d/rc6.d/K01motion
|
||||
#etc/rc.d/rc6.d/K01vdradmin
|
||||
#etc/rc.d/rc6.d/K02sslh
|
||||
etc/rc.d/rc6.d/K08fcron
|
||||
etc/rc.d/rc6.d/K28apache
|
||||
etc/rc.d/rc6.d/K30sshd
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,2 @@
|
||||
boot/uInit-KVER
|
||||
boot/initramfs-KVER.img
|
||||
boot/uInit-KVER-ipfire
|
||||
boot/initramfs-KVER-ipfire.img
|
||||
|
||||
@@ -132,6 +132,8 @@ usr/local/bin/update-location-database
|
||||
usr/sbin/openvpn-metrics
|
||||
#usr/share
|
||||
#usr/share/doc
|
||||
#usr/share/doc/licenses
|
||||
usr/share/doc/licenses/GPLv3
|
||||
#usr/share/info
|
||||
#usr/share/locale
|
||||
#usr/share/man
|
||||
|
||||
@@ -59,8 +59,6 @@ usr/bin/choom
|
||||
#usr/bin/colrm
|
||||
#usr/bin/column
|
||||
usr/bin/eject
|
||||
usr/bin/enosys
|
||||
usr/bin/exch
|
||||
#usr/bin/fadvise
|
||||
usr/bin/fallocate
|
||||
usr/bin/fincore
|
||||
@@ -78,7 +76,6 @@ usr/bin/irqtop
|
||||
#usr/bin/linux64
|
||||
usr/bin/logger
|
||||
#usr/bin/look
|
||||
usr/bin/lsclocks
|
||||
usr/bin/lscpu
|
||||
usr/bin/lsipc
|
||||
usr/bin/lsirq
|
||||
@@ -98,14 +95,13 @@ usr/bin/renice
|
||||
usr/bin/scriptlive
|
||||
#usr/bin/scriptreplay
|
||||
#usr/bin/setarch
|
||||
usr/bin/setpgid
|
||||
usr/bin/setsid
|
||||
#usr/bin/setterm
|
||||
#usr/bin/taskset
|
||||
usr/bin/uclampset
|
||||
#usr/bin/ul
|
||||
#usr/bin/uname26
|
||||
usr/bin/unshare
|
||||
#usr/bin/unshare
|
||||
usr/bin/uuidgen
|
||||
usr/bin/uuidparse
|
||||
#usr/bin/waitpid
|
||||
@@ -164,8 +160,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/bash-completion/completions/delpart
|
||||
#usr/share/bash-completion/completions/dmesg
|
||||
#usr/share/bash-completion/completions/eject
|
||||
#usr/share/bash-completion/completions/enosys
|
||||
#usr/share/bash-completion/completions/exch
|
||||
#usr/share/bash-completion/completions/fadvise
|
||||
#usr/share/bash-completion/completions/fallocate
|
||||
#usr/share/bash-completion/completions/fdisk
|
||||
@@ -195,7 +189,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/bash-completion/completions/look
|
||||
#usr/share/bash-completion/completions/losetup
|
||||
#usr/share/bash-completion/completions/lsblk
|
||||
#usr/share/bash-completion/completions/lsclocks
|
||||
#usr/share/bash-completion/completions/lscpu
|
||||
#usr/share/bash-completion/completions/lsipc
|
||||
#usr/share/bash-completion/completions/lsirq
|
||||
@@ -231,7 +224,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/bash-completion/completions/scriptlive
|
||||
#usr/share/bash-completion/completions/scriptreplay
|
||||
#usr/share/bash-completion/completions/setarch
|
||||
#usr/share/bash-completion/completions/setpgid
|
||||
#usr/share/bash-completion/completions/setsid
|
||||
#usr/share/bash-completion/completions/setterm
|
||||
#usr/share/bash-completion/completions/sfdisk
|
||||
@@ -265,8 +257,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/man/man1/column.1
|
||||
#usr/share/man/man1/dmesg.1
|
||||
#usr/share/man/man1/eject.1
|
||||
#usr/share/man/man1/enosys.1
|
||||
#usr/share/man/man1/exch.1
|
||||
#usr/share/man/man1/fadvise.1
|
||||
#usr/share/man/man1/fallocate.1
|
||||
#usr/share/man/man1/fincore.1
|
||||
@@ -281,7 +271,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/man/man1/irqtop.1
|
||||
#usr/share/man/man1/logger.1
|
||||
#usr/share/man/man1/look.1
|
||||
#usr/share/man/man1/lsclocks.1
|
||||
#usr/share/man/man1/lscpu.1
|
||||
#usr/share/man/man1/lsfd.1
|
||||
#usr/share/man/man1/lsipc.1
|
||||
@@ -301,7 +290,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/man/man1/script.1
|
||||
#usr/share/man/man1/scriptlive.1
|
||||
#usr/share/man/man1/scriptreplay.1
|
||||
#usr/share/man/man1/setpgid.1
|
||||
#usr/share/man/man1/setsid.1
|
||||
#usr/share/man/man1/setterm.1
|
||||
#usr/share/man/man1/taskset.1
|
||||
@@ -327,7 +315,6 @@ usr/sbin/rtcwake
|
||||
#usr/share/man/man3/uuid_unparse.3
|
||||
#usr/share/man/man5/adjtime_config.5
|
||||
#usr/share/man/man5/fstab.5
|
||||
#usr/share/man/man5/scols-filter.5
|
||||
#usr/share/man/man5/terminal-colors.d.5
|
||||
#usr/share/man/man8/addpart.8
|
||||
#usr/share/man/man8/agetty.8
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#usr/include/hs
|
||||
#usr/include/hs/hs.h
|
||||
#usr/include/hs/hs_common.h
|
||||
#usr/include/hs/hs_compile.h
|
||||
#usr/include/hs/hs_runtime.h
|
||||
#usr/include/hs/hs_version.h
|
||||
#usr/lib/libhs.so
|
||||
usr/lib/libhs.so.5
|
||||
usr/lib/libhs.so.5.4.11
|
||||
#usr/lib/libhs_runtime.so
|
||||
usr/lib/libhs_runtime.so.5
|
||||
usr/lib/libhs_runtime.so.5.4.11
|
||||
#usr/lib/pkgconfig/libhs.pc
|
||||
@@ -45,7 +45,7 @@ usr/bin/apr-1-config
|
||||
#usr/lib/libapr-1.la
|
||||
#usr/lib/libapr-1.so
|
||||
usr/lib/libapr-1.so.0
|
||||
usr/lib/libapr-1.so.0.7.5
|
||||
usr/lib/libapr-1.so.0.7.4
|
||||
#usr/lib/pkgconfig/apr-1.pc
|
||||
#usr/share/apr-1
|
||||
#usr/share/apr-1/build
|
||||
|
||||
8
config/rootfiles/common/arpwatch
Normal file
8
config/rootfiles/common/arpwatch
Normal file
@@ -0,0 +1,8 @@
|
||||
etc/rc.d/init.d/arpwatch
|
||||
etc/sysconfig/arpwatch
|
||||
usr/sbin/arpsnmp
|
||||
usr/sbin/arpwatch
|
||||
#usr/share/man/man8/arpsnmp.8
|
||||
#usr/share/man/man8/arpwatch.8
|
||||
#var/lib/arpwatch
|
||||
var/lib/arpwatch/ethercodes.dat
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
usr/bin/attr
|
||||
usr/bin/getfattr
|
||||
usr/bin/setfattr
|
||||
#usr/etc
|
||||
#usr/etc/xattr.conf
|
||||
#usr/include/attr
|
||||
#usr/include/attr/attributes.h
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user