Skip to content

Commit

Permalink
Merge pull request #27 from grml/zeha/no-initscript
Browse files Browse the repository at this point in the history
Move main startup script into /usr/share/grml-autoconfig/
  • Loading branch information
zeha authored Dec 21, 2024
2 parents 9103d6d + ad74d63 commit 5bae653
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 50 deletions.
1 change: 0 additions & 1 deletion debian/grml-autoconfig.dirs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
etc/grml
etc/init.d
usr/bin
usr/sbin
usr/share/doc/grml-saveconfig
2 changes: 1 addition & 1 deletion debian/grml-autoconfig.install
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ autoconfig.local /etc/grml/
bin/restore-config /usr/bin/
bin/save-config /usr/bin/
etc/* /etc/
grml-autoconfig /etc/init.d/
grml-autoconfig /usr/share/grml-autoconfig/
language-functions /etc/grml/
sbin/grml-autoconfig /usr/sbin/
systemd/* usr/lib/systemd/system/
Expand Down
4 changes: 0 additions & 4 deletions debian/grml-autoconfig.lintian-overrides
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# grml specific packaging
grml-autoconfig: unknown-section grml
grml-autoconfig: bugs-field-does-not-refer-to-debian-infrastructure mailto:[email protected]
# we have our custom look'n'feel
grml-autoconfig: init.d-script-does-not-source-init-functions [etc/init.d/grml-autoconfig]
# we have our custom target
grml-autoconfig: systemd-service-file-refers-to-unusual-wantedby-target grml-boot.target [usr/lib/systemd/system/grml-autoconfig.service]
# we have no better way yet
grml-autoconfig: systemd-service-file-wraps-init-script ExecStart [usr/lib/systemd/system/grml-autoconfig.service]
# that's the way dhclient hook scripts are working
grml-autoconfig: executable-not-elf-or-script [etc/dhcp/dhclient-exit-hooks.d/grml-sethostname]
1 change: 1 addition & 0 deletions debian/grml-autoconfig.maintscript
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rm_conffile /etc/init.d/grml-autoconfig 0.23.3~
3 changes: 2 additions & 1 deletion debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
set -e

if [ "$1" = "configure" ]; then
update-rc.d grml-autoconfig start 30 2 . >/dev/null
# upgrade from grml-autoconfig before 0.23.3
update-rc.d grml-autoconfig remove >/dev/null || exit 0
fi

#DEBHELPER#
Expand Down
10 changes: 0 additions & 10 deletions debian/postrm

This file was deleted.

12 changes: 6 additions & 6 deletions doc/grml-autoconfig.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ About
The program grml-autoconfig does not support any options but needs to be run
with root permissions as it modifies a system wide configuration file
(/etc/grml/autoconfig). 'grml-autoconfig' is an interface to the framework
named grml-autoconfig. /etc/init.d/grml-autoconfig is the main script of the
grml-system where all the hardware recognition and activation of services take
place.
named grml-autoconfig. /usr/share/grml-autoconfig/grml-autoconfig is the main
script of the grml-system where all the hardware recognition and activation of
services take place.

grml-autoconfig supports an adjustable configuration via the configuration file
named /etc/grml/autoconfig. The script named Bgrml-autoconfig is a simple
Expand All @@ -35,10 +35,10 @@ your own (there is no interference).
Files
-----

*/etc/init.d/grml-autoconfig*::
*/usr/share/grml-autoconfig/grml-autoconfig*::

Init-script which runs the commands defined in /etc/grml/autoconfig.functions
after checking configuration file /etc/grml/autoconfig.
Main script which runs the commands defined in /etc/grml/autoconfig.functions
after checking configuration file /etc/grml/autoconfig. Executed by systemd.

*/usr/sbin/grml-autoconfig*::

Expand Down
27 changes: 1 addition & 26 deletions grml-autoconfig
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
#!/bin/zsh -f
# Filename: /etc/init.d/grml-autoconfig
# Filename: /usr/share/grml-autoconfig/grml-autoconfig
# Purpose: basic system configuration and hardware setup for grml system
# Authors: grml-team (grml.org), (c) Michael Prokop <[email protected]>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
################################################################################

# http://wiki.debian.org/LSBInitScripts =>
### BEGIN INIT INFO
# Provides: grml-autoconfig
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Should-Start: udev
# Default-Start: S 2 3 4 5
# Default-Stop:
### END INIT INFO

# {{{ placeholder functions for restart/reload/stop
if [[ $1 == "restart" ]] ; then
echo "$0 restart - empty placeholder. Doing nothing but running."
fi

if [[ $1 == "force-reload" ]] ; then
echo "$0 force-reload - empty placeholder. Doing nothing but running."
fi

if [[ $1 == "stop" ]] ; then
echo "$0 stop - empty placeholder. Doing nothing but exiting."
exit 1
fi
# }}}

# {{{ path, signals, umask, zsh, colors
export PATH="/bin:/sbin:/usr/bin:/usr/sbin"
umask 022
Expand Down
2 changes: 1 addition & 1 deletion systemd/grml-autoconfig.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ [email protected]
After=rc-local.service systemd-modules-load.service

[Service]
ExecStart=/etc/init.d/grml-autoconfig
ExecStart=/usr/share/grml-autoconfig/grml-autoconfig
Type=oneshot
StandardInput=null
StandardOutput=tty
Expand Down

0 comments on commit 5bae653

Please sign in to comment.