Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-LED_control | Major rework #3397

Merged
merged 16 commits into from
Feb 27, 2020
Merged

DietPi-LED_control | Major rework #3397

merged 16 commits into from
Feb 27, 2020

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Feb 26, 2020

Status: Review

  • Remove script executions from code
  • Changelog

Commit list/description:

  • DietPi-LED_control | Major rework: Chosen LED triggers are now applied as udev rules so that this script does not need to be executed on boot. Reset options have been added to remove udev rules. Location has been moved to parent, since now it is for interactive execution only. A shell alias has been added for quick access via "dietpi-led_control".
  • DietPi-Patch | Convert old DietPi-LED_control settings to udev rules and remove script from old location
  • DietPi-PreBoot | Remove DietPi-LED_control call, since LED triggers are now applied via udev rules
  • DietPi-PreBoot | Do not use G_THREAD, since DietPi-Set_CPU is the only larger call being done, hence no benefit of concurrency
  • DietPi-PreBoot | Do not load DietPi-Globals, since checking for RPi is the only left reason, which can be done much simpler
  • DietPi-PreBoot | Obtain hardware info only if resulting file is missing, and on RPi to allow SDcard swapping. For non-RPi models, the result can only change after DietPi updates, and DietPi-Patch forces a hardware info reload on every execution.
  • DietPi-Config | DietPi-LED_control script has been moved to parent dir
  • DietPi-Login | Since PROMPT_COMMAND() is called from regular interactive shell with bashrc sourced, assure that "rm /tmp/dietpi-process.pid" is non-interactive and silent, regardless of applied "rm" interactive or verbose aliases.
  • DietPi-Obtain_HW_model | In any unexpected hardware identifier case, revert to "Generic Device" (ID: 22) to assure that our scripts cannot do wrong assumptions, e.g. assume RPi because of missing identifier file only (( $G_HW_MODEL < 10 )).
  • DietPi-Obtain_HW_model | Remove $IMAGE_ADDITIONAL_CREDITS, since this doubles with .prep_info. If no .prep_info is present (very old images), convert old $IMAGE_ADDITIONAL_CREDITS entry via pre-patches instead
  • DietPi-Banner | Remove $image_additional_credits line in favour of pre-image line which basically double each other
  • DietPi-Banner | Add Joulinar to DietPi Team line, deserves credit for outstanding support on GitHub and Forums
  • DietPi-Pre-patch | Convert .hw_model additional credits line to .prep_info pre-image. This must be done as pre-patch, since DietPi-Patch calls DietPi-Obtain_HW_model, which clears the line
  • DietPi-Globals | Use hardware ID 22 (Generic Device) as general fallback to assure that it is never falsely identified as RPi by (( $G_HW_MODEL < 10 )).

+ DietPi-LED_control | Major rework: Chosen LED triggers are now applied as udev rules so that this script does not need to be executed on boot. Reset options have been added to remove udev rules
@MichaIng MichaIng added this to the v6.29 milestone Feb 26, 2020
+ DietPi-PreBoot | Remove DietPi-LED_control call, since LED triggers are now applied via udev rules
+ DietPi-PreBoot | Do not use G_THREAD, since DietPi-Set_CPU is the only larger call being done, hence no benefit of concurrency
+ DietPi-PreBoot | Do not load DietPi-Globals, since checking for RPi is the only left reason, which can be done much simpler
+ DietPi-PreBoot | Obtain hardware info only if resulting file is missing, and on RPi to allow SDcard swapping. For non-RPi models, the result can only change after DietPi updates, and DietPi-Patch forces a hardware info reload on every execution.
+ DietPi-Config | DietPi-LED_control script has been moved to parent dir
+ DietPi-Login | Since PROMPT_COMMAND() is called from regular interactive shell with bashrc sourced, assure that "rm /tmp/dietpi-process.pid" is non-interactive and silent, regardless of applied "rm" interactive or verbose aliases.
+ DietPi-Patch | Remove dietpi-lcd_control from old location: #3397
+ DietPi-Patch | Show what we're doing
+ DietPi-Patch | Remove obsolete config as well. ToDo: Migrate to new udev rules first?
+ DietPi-Globals | Add DietPi-LED_control to shortcut aliases
+ DietPi-LED_control | Syntax + colour
+ DietPi-Patch | Translate old DietPi-LED_control settings into new udev rules before removing old config
+ CHANGELOG | DietPi-LED_control: LED trigger choices are now applied via udev rules
@MichaIng MichaIng requested review from Fourdee and Joulinar February 27, 2020 11:38
+ DietPi-Patch | Syntax
+ DietPi-Obtain_HW_model | In any unexpected hardware identifier case, revert to "Generic Device" (ID: 22) to assure that our scripts cannot do wrong assumptions, e.g. assume RPi because of missing identifier file only (( $G_HW_MODEL < 10 )).
+ DietPi-Obtain_HW_model | Remove $IMAGE_ADDITIONAL_CREDITS, since this doubles with .prep_info. If no .prep_info is present (very old images), convert old $IMAGE_ADDITIONAL_CREDITS entry via pre-patches instead (ToDo).
+ DietPi-Banner | Remove $image_additional_credits line in favour of pre-image line which basically double each other
+ DietPi-Banner | Add Joulinar to DietPi Team line, deserves credit for outstanding support on GitHub and Forums
+ DietPi-Pre-patch | Convert .hw_model additional credits line to .prep_info pre-image. This must be done as pre-patch, since DietPi-Patch calls DietPi-Obtain_HW_model, which clears the line: #3397
+ DietPi-Globals | Use hardware ID 22 (Generic Device) as general fallback to assure that it is never falsely identified as RPi by (( $G_HW_MODEL < 10 )).
@MichaIng MichaIng merged commit 4b302e1 into dev Feb 27, 2020
@MichaIng MichaIng deleted the led_control branch February 27, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant