mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
Adding alarm/macspoof so people stop asking how to set MAC addresses.
This commit is contained in:
parent
90cd5a21bc
commit
79abfc22ee
4 changed files with 43 additions and 0 deletions
23
alarm/macspoof/PKGBUILD
Normal file
23
alarm/macspoof/PKGBUILD
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Maintainer Jason Plum <jplum@archlinuxarm.org>
|
||||
|
||||
pkgname=macspoof
|
||||
pkgdesc="MAC Spoofing service"
|
||||
pkgver=0.1
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
|
||||
url="https://wiki.archlinux.org/index.php/MAC_Address_Spoofing#Systemd_unit"
|
||||
license=('GPL2')
|
||||
|
||||
source=('macspoof@.service'
|
||||
'macspoof.conf.d')
|
||||
md5sums=('c830b7ee6425390005189a2a01bb84eb'
|
||||
'b50f74e4b71d6fda819feb89ccb62bc3')
|
||||
backup=('etc/conf.d/macspoof')
|
||||
install=macspoof.install
|
||||
|
||||
package() {
|
||||
install -m644 -D "${srcdir}/macspoof.conf.d" "${pkgdir}/etc/conf.d/macspoof"
|
||||
install -m644 -D "${srcdir}/macspoof@.service" "${pkgdir}/usr/lib/systemd/system/macspoof@.service"
|
||||
}
|
||||
|
4
alarm/macspoof/macspoof.conf.d
Normal file
4
alarm/macspoof/macspoof.conf.d
Normal file
|
@ -0,0 +1,4 @@
|
|||
# macspoof@.service configuration file
|
||||
# example of setting for eth0 and wlan0
|
||||
# mac_addr_eth0=DE:AD:BE:EF:00:01
|
||||
# mac_addr_wlan0=DE:AD:BE:EF:00:02
|
3
alarm/macspoof/macspoof.install
Normal file
3
alarm/macspoof/macspoof.install
Normal file
|
@ -0,0 +1,3 @@
|
|||
post_install() {
|
||||
echo " Be sure to edit /etc/conf.d/macspoof"
|
||||
}
|
13
alarm/macspoof/macspoof@.service
Normal file
13
alarm/macspoof/macspoof@.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=MAC address change %I
|
||||
Before=dhcpcd@%i.service netctl@%1.service netctl-ifplugd@%i.service netctl-auto@%i.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
EnvironmentFile=/etc/conf.d/macspoof
|
||||
ExecStart=/usr/bin/ip link set dev %i down
|
||||
ExecStart=/usr/bin/ip link set dev %i address ${mac_addr_%i}
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=network.target
|
Loading…
Reference in a new issue