46 lines
1.3 KiB
Makefile
46 lines
1.3 KiB
Makefile
# 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 $@
|