This commit is contained in:
niamtokik
2022-04-09 15:04:46 +00:00
commit 657854ed22
5 changed files with 145 additions and 0 deletions

45
Makefile Normal file
View File

@@ -0,0 +1,45 @@
# hotplugd urndis OpenBSD Makefile deploy
#
# Copyright (c) 2020 Mathieu Kerjouan
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.PHONY += help
help:
@echo "Usage: make [install|help]"
.PHONY += install
install: /etc/hotplug/attach /etc/hotplug/detach /etc/hotplug/device/urndis
rcctl enable hotplugd
rcctl start hotplugd
/etc/hotplug:
mkdir $@
/etc/hotplug/device: /etc/hotplug
mkdir $@
/etc/hotplug/class: /etc/hotplug
mkdir $@
/etc/hotplug/attach: /etc/hotplug
cp etc_hotplug_attach.sh $@
chmod +x $@
/etc/hotplug/detach: /etc/hotplug
cp etc_hotplug_detach.sh $@
chmod +x $@
/etc/hotplug/device/urndis: /etc/hotplug/device
cp etc_hotplug_device_urndis.sh $@
chmod +x $@