https://github.com/vroncevic/gen_rule
UDEV rules setup for interface boards
https://github.com/vroncevic/gen_rule
bash linux rules shell udev
Last synced: about 2 months ago
JSON representation
UDEV rules setup for interface boards
- Host: GitHub
- URL: https://github.com/vroncevic/gen_rule
- Owner: vroncevic
- License: gpl-3.0
- Created: 2016-11-30T12:12:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T18:38:58.000Z (about 2 years ago)
- Last Synced: 2025-03-28T21:47:00.248Z (over 1 year ago)
- Topics: bash, linux, rules, shell, udev
- Language: Shell
- Homepage: https://vroncevic.github.io/gen_rule
- Size: 6.83 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UDEV rules setup for interface boards

**gen_rule** is shell tool for generating rule access to user device.
Developed in **[bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell))** code: **100%**.
[](https://github.com/vroncevic/gen_rule/actions/workflows/gen_rule_shell_checker.yml)
The README is used to introduce the tool and provide instructions on
how to install the tool, any machine dependencies it may have and any
other information that should be provided before the tool is installed.
[](https://github.com/vroncevic/gen_rule/issues) [](https://github.com/vroncevic/gen_rule/graphs/contributors)
**Table of Contents**
- [Installation](#installation)
- [Usage](#usage)
- [Dependencies](#dependencies)
- [Shell tool structure](#shell-tool-structure)
- [Docs](#docs)
- [Copyright and licence](#copyright-and-licence)
### Installation

Navigate to release **[page](https://github.com/vroncevic/gen_rule/releases)** download and extract release archive.
To install **gen_rule** type the following
```bash
tar xvzf gen_rule-4.0.tar.gz
cd gen_rule-4.0
cp -R ~/sh_tool/bin/ /root/scripts/gen_rule/ver.4.0/
cp -R ~/sh_tool/conf/ /root/scripts/gen_rule/ver.4.0/
cp -R ~/sh_tool/log/ /root/scripts/gen_rule/ver.4.0/
```
Self generated setup script and execution
```bash
./gen_rule_setup.sh
[setup] installing App/Tool/Script gen_rule
Thu Dec 4 08:42:12 PM CET 2025
[setup] copy App/Tool/Script structure
[setup] remove github editor configuration files
[setup] set App/Tool/Script permission
[setup] create symbolic link of App/Tool/Script
[setup] done
/root/scripts/gen_rule/ver.4.0/
├── bin/
│ ├── create_udev_file.sh
│ ├── gen_rule.sh
│ ├── list_udev_files.sh
│ └── remove_udev_file.sh
├── conf/
│ ├── gen_rule.cfg
│ ├── gen_rule.logo
│ ├── gen_rule_util.cfg
│ ├── template/
│ │ ├── avr_dragon_isp.template
│ │ ├── avr_jtag_ice.template
│ │ ├── avr_silabs.template
│ │ ├── avr_usb_asp.template
│ │ ├── avr_usb_mkii.template
│ │ ├── avr_usb_tiny.template
│ │ └── msp430uif.template
│ ├── udev_rule_names.cfg
│ └── udev_templates.cfg
└── log/
└── gen_rule.log
4 directories, 19 files
lrwxrwxrwx 1 root root 46 Dec 4 08:42 /root/bin/gen_rule -> /root/scripts/gen_rule/ver.4.0/bin/gen_rule.sh
```
Or You can use docker to create image/container.
### Usage
```bash
# Create symlink for shell tool
ln -s /root/scripts/gen_rule/ver.4.0/bin/gen_rule.sh /root/bin/gen_rule
# Setting PATH
export PATH=${PATH}:/root/bin/
# Generating user device rule
gen_rule
gen_rule ver.4.0
Thu Dec 4 08:42:42 PM CET 2025
[check_root] Check permission for current session? [ok]
[check_root] Done
██
░██
█████ █████ ███████ ██████ ██ ██ ░██ █████
██░░░██ ██░░░██░░██░░░██ ░░██░░█░██ ░██ ░██ ██░░░██
░██ ░██░███████ ░██ ░██ ░██ ░ ░██ ░██ ░██░███████
░░██████░██░░░░ ░██ ░██ ░██ ░██ ░██ ░██░██░░░░
░░░░░██░░██████ ███ ░██ █████░███ ░░██████ ███░░██████
█████ ░░░░░░ ░░░ ░░ ░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░
░░░░░
Info github.io/gen_rule ver.4.0
Issue github.io/issue
Author vroncevic.github.io
[USAGE] gen_rule [OPTIONS]
[OPTIONS]
[OPERATION] install | uninstall | list
[TARGET DEVICE] Target device board
# Instaling UDEV rule for AVR Dragon board
gen_rule install avr_dragon
[help | h] print this option
```
### Dependencies
**gen_rule** requires next modules and libraries
* sh_util [https://github.com/vroncevic/sh_util](https://github.com/vroncevic/sh_util)
### Shell tool structure
**gen_rule** is based on MOP.
Shell tool structure
```bash
sh_tool/
├── bin/
│ ├── create_udev_file.sh
│ ├── gen_rule.sh
│ ├── list_udev_files.sh
│ └── remove_udev_file.sh
├── conf/
│ ├── gen_rule.cfg
│ ├── gen_rule.logo
│ ├── gen_rule_util.cfg
│ ├── template/
│ │ ├── avr_dragon_isp.template
│ │ ├── avr_jtag_ice.template
│ │ ├── avr_silabs.template
│ │ ├── avr_usb_asp.template
│ │ ├── avr_usb_mkii.template
│ │ ├── avr_usb_tiny.template
│ │ └── msp430uif.template
│ ├── udev_rule_names.cfg
│ └── udev_templates.cfg
└── log/
└── gen_rule.log
```
### Docs
[](https://gen-rule.readthedocs.io/projects/gen_rule/en/latest/?badge=latest)
More documentation and info at
* [gen_rule.readthedocs.io](https://gen-rule.readthedocs.io/en/latest/)
* [www.gnu.org/software/bash/manual/](https://www.gnu.org/software/bash/manual/)
* [wiki.debian.org/udev](https://wiki.debian.org/udev)
### Copyright and licence
[](https://www.gnu.org/licenses/gpl-4.0) [](https://opensource.org/licenses/Apache-2.0)
Copyright (C) 2016 - 2026 by [vroncevic.github.io/gen_rule](https://vroncevic.github.io/gen_rule)
**gen_rule** is free software; you can redistribute it and/or modify
it under the same terms as Bash itself, either Bash version 4.2.47 or,
at your option, any later version of Bash 4 you may have available.
Lets help and support FSF.
[](https://my.fsf.org/)
[](https://my.fsf.org/donate/)