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

feat: add sbkey-notify script and autostart file #94

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ublue/setup-services/src/bin/sb-key-notify
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KEY_WARN_FILE="/run/user-motd-sbkey-warn.md"

if [ -e $KEY_WARN_FILE ]; then
WARNING_MSG=$(cat "$KEY_WARN_FILE")

notify-send "WARNING" "$(echo "$WARNING_MSG" | tr -d '*~')" -i dialog-warning -u critical -a mokutil --wait
else
echo "No secure boot key warning file. Skipping..."
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Name=Secure boot Notify
Comment=Autostart secure boot key notification
Exec=/usr/bin/sb-key-notify
Icon=org.gnome.Terminal
Type=Application
Categories=Utility;System;
Name[en_US]=secure-boot-notify


6 changes: 5 additions & 1 deletion ublue/setup-services/ublue-setup-services.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ Universal Blue setup scripts
{{{ git_dir_setup_macro }}}

%install
mkdir -p %{buildroot}{%{_libexecdir},%{_unitdir},%{_sysconfdir}/{polkit-1/{rules.d,actions},profile.d}}
mkdir -p %{buildroot}{%{_bindir},%{_libexecdir},%{_unitdir},%{_sysconfdir}/{polkit-1/{rules.d,actions},profile.d}}
install -Dm0755 ./src/scripts/* %{buildroot}%{_libexecdir}
install -Dm0755 ./src/bin/* %{buildroot}%{_bindir}
install -Dpm0644 ./src/services/* %{buildroot}%{_unitdir}
install -Dpm0644 ./src/polkit/*.rules %{buildroot}%{_sysconfdir}/polkit-1/rules.d
install -Dpm0644 ./src/polkit/*.policy %{buildroot}%{_sysconfdir}/polkit-1/actions
install -Dpm0755 ./src/profile/* %{buildroot}%{_sysconfdir}/profile.d
cp -rp ./src/skel %{buildroot}%{_sysconfdir}

%post
%systemd_post ublue-user-setup.service
Expand All @@ -33,11 +35,13 @@ install -Dpm0755 ./src/profile/* %{buildroot}%{_sysconfdir}/profile.d
%systemd_preun ublue-system-setup.service

%files
%{_bindir}/sb*
%{_libexecdir}/ublue-*
%{_libexecdir}/check-*
%{_sysconfdir}/polkit-1/rules.d/*
%{_sysconfdir}/polkit-1/actions/*
%{_sysconfdir}/profile.d/*
%{_sysconfdir}/skel/.config/autostart/*
%{_unitdir}/*.service

%changelog
Expand Down
Loading