Release new version 0.22.0 master v0.22.0
authorMichael Prokop <mika@grml.org>
Fri, 2 Feb 2024 15:49:46 +0000 (16:49 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 2 Feb 2024 15:49:46 +0000 (16:49 +0100)
19 files changed:
autoconfig
autoconfig.functions
debian/changelog
debian/control
debian/grml-autoconfig.dirs [new file with mode: 0644]
debian/grml-autoconfig.docs [new file with mode: 0644]
debian/grml-autoconfig.install
debian/grml-autoconfig.links [new file with mode: 0644]
debian/grml-autoconfig.lintian-overrides [new file with mode: 0644]
debian/grml-autoconfig.manpages [new file with mode: 0644]
debian/overrides [deleted file]
debian/rules
debian/source/format [new file with mode: 0644]
etc/dhcp/dhclient-exit-hooks.d/grml-sethostname [changed from symlink to file mode: 0755]
etc/dhcp3/dhclient-exit-hooks.d/grml-sethostname [deleted file]
etc/init.d/grml-autoconfig.strace [deleted file]
grml-autoconfig
language-functions
systemd/grml-autoconfig.service

index 88aa2ae..7846e8b 100644 (file)
@@ -57,7 +57,7 @@ CONFIG_DEBNET='yes'           # search for /etc/network/interfaces on partitions
 CONFIG_DEBS='yes'             # check for bootoption debs for installing .debs
 CONFIG_DISPLAY_SSH_FINGERPRINTS='yes' # display SSH server key fingerprints
 CONFIG_DISTRI='yes'           # support some customization via bootoption distri
-CONFIG_DMRAID='yes'           # support for dmraid
+CONFIG_EASTEREGG='yes'        # easteregg
 CONFIG_EXTRACT='yes'          # specify which (only in combination with bootparam myconfig/netconfig useful)
 CONFIG_FINDDCSDIR='yes'       # search for a debs, config, scripts directory
 CONFIG_HOMEDIR='yes'          # check for persistent homedir option
@@ -82,6 +82,7 @@ CONFIG_TESTCD='yes'           # CD checker
 CONFIG_TIME='yes'             # set clock, check for bootparam utc/gmt [only in live-mode]
 CONFIG_TIMEZONE='yes'         # get bootparam 'tz' and set it as /etc/localtime [only in live-mode]
 CONFIG_VIRTUALBOX_SHARED_FOLDERS='yes' # set up shared folders in VirtualBox environment
+CONFIG_VIRTUALBOX_SETUP='yes' # set up VirtuaBox service (iff present)
 CONFIG_VNC='yes'              # check for bootparam vnc
 CONFIG_XSTARTUP='yes'         # start X window system via grml-x [only in live-mode]
 
index 558472b..3bab753 100755 (executable)
@@ -184,7 +184,8 @@ KVM=false
 VIRTUALBOX=false
 VMWARE=false
 
-if vmware-detect &>/dev/null; then
+if virt-what 2>/dev/null | grep -q 'vmware' || \
+  imvirt 2>/dev/null | grep -iq "vmware" ; then
   VIRTUAL=true; VMWARE=true; VIRTUAL_ENV='VMware'
 fi
 
@@ -212,12 +213,8 @@ fi
 config_log(){
 if checkbootparam 'log' || checkbootparam 'debug' ; then
    export DEBUG="/tmp/grml.log.`date +%Y%m%d`"
-   touch $DEBUG
-   einfo "Bootparameter log found. Log files: ${DEBUG} and /var/log/boot"
-   eindent
-     einfo "Starting bootlogd." # known to be *very* unreliable :(
-     bootlogd -r -c >>$DEBUG 2>&1 ; eend $?
-   eoutdent
+   touch "${DEBUG}"
+   einfo "Bootparameter log found, debug log file from grml-autoconfig available at '${DEBUG}'"
 else
    DEBUG="/dev/null"
 fi
@@ -259,7 +256,7 @@ config_language(){
         if [ -r /usr/share/consolefonts/Uni3-Terminus16.psf.gz ] ; then
           CONSOLEFONT='Uni3-Terminus16'
         else
-          ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-terminus." ; eend 1
+          ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-setup-linux." ; eend 1
         fi
         if ! hasfb ; then
           CONSOLEFONT='Lat15-Terminus16'
@@ -543,33 +540,41 @@ config_kernel(){
 # }}}
 
 # {{{ secure boot
-config_secureboot(){
+# helper function to check whether we're running under (enabled) Secure Boot
+running_under_secureboot() {
   # systemd does this for us, but if we are not running under systemd then mokutil
   # doesn't work as needed as it relies on /sys/firmware/efi/efivars (while
   # /sys/firmware/efi/vars would exist)
   if ! $SYSTEMD ; then
-    if modprobe efivars &>/dev/null ; then
+    if modprobe efivarfs &>/dev/null ; then
       mount -t efivarfs efivarfs /sys/firmware/efi/efivars
     fi
   fi
 
-  if [ -x /usr/bin/mokutil ] ; then
-    local secstate=$(mokutil --sb-state 2>/dev/null) # "SecureBoot enabled"
-    if [ -n "$secstate" ] ; then
-      einfo "SecureBoot is enabled" ; eend 0
+  if [[ -x "$(command -v mokutil)" ]] ; then
+    if mokutil --sb-state 2>/dev/null | grep -q 'SecureBoot enabled' ; then
+      return 0
     else
-      einfo "SecureBoot not detected" ; eend 0
+      return 1
     fi
   else
-    if modprobe efivars &>/dev/null ; then
+    if modprobe efivarfs &>/dev/null ; then
       if od -An -t u1 /sys/firmware/efi/vars/SecureBoot-*/data 2>/dev/null | grep -q 1 ; then
-        einfo "SecureBoot is enabled" ; eend 0
+        return 0
       else
-        einfo "SecureBoot not detected" ; eend 0
+        return 1
       fi
     fi
   fi
 }
+
+config_secureboot(){
+  if running_under_secureboot ; then
+      einfo "SecureBoot is enabled" ; eend 0
+  else
+      einfo "SecureBoot not detected" ; eend 0
+  fi
+}
 # }}}
 
 # {{{ timezone
@@ -900,19 +905,23 @@ fi # -z $INSTALLED
 
 # {{{ CPU-detection
 config_cpu(){
-if checkbootparam 'nocpu'; then
-  ewarn "Skipping CPU detection as requested on boot commandline." ; eend 0
-  return 0
-fi
+  if checkbootparam 'nocpu'; then
+    ewarn "Skipping CPU detection as requested on boot commandline." ; eend 0
+    return 0
+  fi
 
-if [[ $(grep -c processor /proc/cpuinfo) -gt 1 ]] ; then
-   einfo "Found CPU:"
-   CPU=$(awk -F: '/^processor/{printf "        Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG)
-   echo $CPU | sed 's/ \{1,\}/ /g'
-   eend 0
-else
-   einfo "Found CPU: `awk -F: '/^processor/{printf " Processor"$2" is"};/^model name/{printf $2};/^vendor_id/{printf vendor};/^cpu MHz/{printf " %dMHz",int($2)};/^cache size/{printf ","$2" Cache"};/^$/{print ""}' /proc/cpuinfo 2>>$DEBUG` " ; eend 0
-fi
+  if ! [ -x "$(which lscpu)" ] ; then
+    ewarn "Skipping CPU detection due to lack of lscpu."; eend 0
+    return 0
+  fi
+
+  local cpu_info num_cpus
+
+  cpu_info="$(lscpu | sed -n '/^Model name:/s/[^:]*:\s*//p')"
+  num_cpus=$(grep -c processor /proc/cpuinfo)
+
+  einfo "Found ${num_cpus} CPU(s): ${cpu_info}"
+  eend 0
 }
 # }}}
 
@@ -1403,7 +1412,7 @@ else
     else
       eindent
       einfo "debs, config, scripts are read from $DCSDEVICE." ; eend 0
-      DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2 }}')"
+      DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2; exit }}')"
       if [ -n "$DCSDIR" ]; then
         ewarn "$DCSDEVICE already mounted on $DCSDIR"; eend 0
       else
@@ -1624,75 +1633,6 @@ config_swraid(){
 }
 # }}}
 
-# {{{ dmraid
-config_dmraid(){
-  [ -n "$INSTALLED" ] && return 0
-
-  if checkbootparam 'nodmraid' ; then
-    ewarn "Skipping dmraid code as requested on boot commandline." ; eend 0
-    return 0
-  fi
-
-  if ! [ -x /sbin/dmraid ] ; then
-    eerror "dmraid not available, can not execute it." ; eend 1
-    return
-  fi
-
-  dmraid_wrapper() {
-    # usage: dmraid_wrapper <dmraid_option>
-    [ -n "$1" ] || return 1
-
-    IFSOLD=${IFS:-}
-    IFS=$'\n'
-    eindent
-
-    for line in $(dmraid $1 ; echo errcode:$?); do
-      case $line in
-        *'no block devices found'*)
-          einfo "No block devices found" ; eend 0
-          break
-          ;;
-        *'no raid disks'*)
-          einfo "No active dmraid devices found" ; eend 0
-          break
-          ;;
-        errcode:0)
-          eend 0;
-          ;;
-        errcode:1)
-          eend 1
-          ;;
-        *)
-          einfo "$line"
-          ;;
-      esac
-    done
-
-    eoutdent
-    IFS=$IFSOLD
-  }
-
-  if checkbootparam 'dmraid' ; then
-    local ACTION="$(getbootparam 'dmraid' 2>>$DEBUG)"
-    if [ "$ACTION" = "off" ] ; then
-      # Deactivates all active software RAID sets:
-      einfo "Deactivating present dmraid sets (as requested via dmraid=off):"
-      dmraid_wrapper -an
-    else
-      # Activate all software RAID sets discovered:
-      einfo "Activating present dmraid sets (as requested via dmraid):"
-      dmraid_wrapper -ay
-    fi
-
-    return
-  fi
-
-  # by default (no special bootoptions) discover all software RAID devices:
-  einfo "Searching for any present dmraid sets:"
-  dmraid_wrapper -r
-}
-# }}}
-
 # {{{ LVM (Logical Volumes)
 config_lvm(){
   [ -n "$INSTALLED" ] && return 0
@@ -1713,12 +1653,18 @@ config_lvm(){
           fi
           eend 0
           if checkbootparam 'lvm' ; then
-             einfo "Bootoption LVM found. Searching for logical volumes and enabling them:"
              if $SYSTEMD ; then
-               service_wrapper lvm2-lvmetad start
-               vgchange -ay
-               eend $?
+               einfo "Bootoption LVM found, enabling related services."
+               if [ -r /etc/init.d/lvm2-lvmetad ] ; then
+                 service_wrapper lvm2-lvmetad start ; eend $?
+               fi
+               if [ -r /etc/init.d/lvm2-lvmpolld ] ; then
+                 service_wrapper lvm2-lvmpolld start ; eend $?
+               fi
+               einfo "Searching for logical volumes and enabling them:"
+               vgchange -ay ; eend $?
              else
+               einfo "Bootoption LVM found. Searching for logical volumes and enabling them:"
                service_wrapper lvm2 start ; eend $?
              fi
           fi
@@ -1841,16 +1787,22 @@ fi # checkbootparam "BOOT_IMAGE=debian2hd
 
 # {{{ virtualbox shared folders
 config_virtualbox_shared_folders() {
-if $VIRTUALBOX ; then
-  einfo "VirtualBox detected, trying to set up Shared Folders."
-  if ! modinfo vboxsf &>/dev/null ; then
-    ewarn "vboxsf driver not present, not setting up VirtualBox Shared Folders."
-    eend 0
-  elif ! [ -x /usr/sbin/VBoxService ] ; then
-    ewarn "virtualbox-guest-utils not installed, not setting up VirtualBox Shared Folders."
-    eend 0
+  if ! $VIRTUALBOX ; then
+    return
+  fi
+
+  if checkbootparam 'novboxsf' ; then
+    ewarn "Skipping VirtualBox Shared Folders setup as requested on boot commandline." ; eend 0
   else
-    eindent
+    einfo "VirtualBox detected, trying to set up Shared Folders."
+    if ! modinfo vboxsf &>/dev/null ; then
+      ewarn "vboxsf driver not present, not setting up VirtualBox Shared Folders."
+      eend 0
+    elif ! [ -x /usr/sbin/VBoxService ] ; then
+      ewarn "virtualbox-guest-utils not installed, not setting up VirtualBox Shared Folders."
+      eend 0
+    else
+      eindent
 
       einfo "Loading vboxsf driver."
       lsmod | grep -q vboxsf || modprobe vboxsf
@@ -1863,8 +1815,8 @@ if $VIRTUALBOX ; then
 
       config_userfstab
 
-      einfo "Adding $fstabuser to group vboxsf."
-      adduser grml vboxsf &>/dev/null
+      einfo "Adding user ${fstabuser:-grml} to group vboxsf."
+      adduser "${fstabuser:-grml}" vboxsf >>"${DEBUG}" 2>&1
       eend $?
 
       einfo "Starting VBoxService."
@@ -1876,7 +1828,7 @@ if $VIRTUALBOX ; then
         vbautomation="$(getbootparam 'vbautomation' 2>>$DEBUG)"
       fi
 
-      if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}$" ; then
+      if ! VBoxControl sharedfolder list | egrep -q "^[0-9]+ - ${vbautomation}(\s+|$)" ; then
         ewarn "No automount shared folder '$vbautomation' available"
         eend 0
       else
@@ -1925,9 +1877,36 @@ if $VIRTUALBOX ; then
         fi
       fi
 
-    eoutdent
+      eoutdent
+    fi
   fi
-fi
+}
+# }}}
+
+# {{{ VirtualBox application
+config_virtualbox_setup() {
+  if checkbootparam 'novbox' ; then
+    ewarn "Skipping VirtualBox setup as requested on boot commandline." ; eend 0
+    return
+  fi
+
+  if ! [ -x /usr/bin/VBox ] ; then
+    return
+  fi
+
+  if running_under_secureboot ; then
+    ewarn "VirtualBox service can not be started as running under enabled Secure Boot." ; eend 0
+    return
+  fi
+
+  einfo "VirtualBox service detected, trying to set up."
+  service_wrapper vboxdrv restart >>"${DEBUG}" 2>&1 ; eend $?
+
+  config_userfstab
+
+  einfo "Adding user ${fstabuser:-grml} to group vboxusers."
+  adduser "${fstabuser:-grml}" vboxusers >>"${DEBUG}" 2>&1
+  eend $?
 }
 # }}}
 
@@ -1944,5 +1923,43 @@ fi
 }
 # }}}
 
+# {{{ Easteregg (for 20 years grml.org)
+display_easteregg() {
+  einfo "You found the birthday easter egg!" ; eend 0
+
+  if [[ -x /bin/toilet && -x /usr/games/lolcat ]] ; then
+    visualize() { printf "%s\n" "$*" | toilet | /usr/games/lolcat ; }
+  elif [[ -x /bin/toilet ]] ; then
+    visualize() { printf "%s\n" "$*" | toilet ; }
+  else
+    visualize() { printf "%s\n" "$*" ; }
+  fi
+
+  visualize "   \o/   "
+  visualize "20 years"
+  visualize "grml.org"
+}
+
+config_easteregg() {
+  checkbootparam 'noeasteregg' && return 0
+
+  zmodload zsh/datetime 2>/dev/null || return 0
+  zmodload zsh/mathfunc 2>/dev/null || return 0
+
+  local birthday=1694822400            # := 2023-09-16 -> TZ=UTC date -d "2023-09-16" +%s
+  local one_month=$[24*30*3600]
+  local pi=3.14159265358979323846
+  local magic=$(( one_month/(pi/2) ))  # normalization factor, used to map the [birthday;birthday+-one_month] range onto [0;+-pi/2]
+
+  if [[ $(( abs(birthday-EPOCHSECONDS) )) -le $one_month ]] ; then
+    if [[ $(( rand48() )) -le $(( cos((birthday-EPOCHSECONDS)/magic) )) ]] ; then
+      display_easteregg
+    fi
+  fi
+
+  return 0
+}
+# }}}
+
 ## END OF FILE #################################################################
 # vim:foldmethod=marker expandtab ai ft=zsh shiftwidth=2
index 7c2ae31..2b9ae55 100644 (file)
@@ -1,3 +1,135 @@
+grml-autoconfig (0.22.0) grml-testing; urgency=medium
+
+  * [ce26c04] Drop support for dmraid
+
+ -- Michael Prokop <mika@grml.org>  Fri, 02 Feb 2024 16:49:33 +0100
+
+grml-autoconfig (0.21.2) grml-testing; urgency=medium
+
+  [ Csillag Tamas ]
+  * [deb3d70] if multiple mountpoints avail, pick the first one
+
+ -- Michael Prokop <mika@grml.org>  Wed, 04 Oct 2023 18:59:59 +0200
+
+grml-autoconfig (0.21.1) grml-testing; urgency=medium
+
+  * [4e06a5e] Improve easter egg for 20 years of grml.org.
+    Thanks to Christopher Bock and András Korn
+
+ -- Michael Prokop <mika@grml.org>  Sat, 16 Sep 2023 14:44:00 +0200
+
+grml-autoconfig (0.21.0) grml-testing; urgency=medium
+
+  * [6015780] Implement easter egg for 20 years of grml.org.
+    Thanks to Christopher Bock for suggesting usage of lolcat
+
+ -- Michael Prokop <mika@grml.org>  Thu, 14 Sep 2023 18:24:38 +0200
+
+grml-autoconfig (0.20.7) grml-testing; urgency=medium
+
+  * [74eef77] config_cpu: use lscpu for identifying CPU information.
+    Thanks to Christopher Bock and András Korn for feedback
+
+ -- Michael Prokop <mika@grml.org>  Fri, 08 Sep 2023 08:55:38 +0200
+
+grml-autoconfig (0.20.6) grml-testing; urgency=medium
+
+  * [b39d89f] Replace deprecated vmware-detect with virt-what/imvirt.
+    Thanks to Christoph Biedl and András Korn for feedback
+  * [82176e8] imvirt/vmware: don't allow output of grep on stdout.
+    Thanks to András Korn
+
+ -- Michael Prokop <mika@grml.org>  Wed, 06 Sep 2023 17:25:03 +0200
+
+grml-autoconfig (0.20.5) grml-testing; urgency=medium
+
+  * [39d6dbd] Depend on util-linux-extra or older util-linux
+
+ -- Michael Prokop <mika@grml.org>  Fri, 11 Aug 2023 19:39:42 +0200
+
+grml-autoconfig (0.20.4) grml-testing; urgency=medium
+
+  * [7bfc241] Drop support for bootlogd. Thanks to Roland Sommer for
+    reporting
+
+ -- Michael Prokop <mika@grml.org>  Mon, 27 Feb 2023 17:37:07 +0100
+
+grml-autoconfig (0.20.3) grml-testing; urgency=medium
+
+  * [1e268ff] systemd unit: use StandardInput=null to work in serial
+    console mode
+
+ -- Michael Prokop <mika@grml.org>  Fri, 02 Sep 2022 17:16:56 +0200
+
+grml-autoconfig (0.20.2) grml-testing; urgency=medium
+
+  * [a08b349] running_under_secureboot: update for efivarfs + new mokutil
+    behavior
+
+ -- Michael Prokop <mika@grml.org>  Mon, 21 Mar 2022 18:02:52 +0100
+
+grml-autoconfig (0.20.1) grml-testing; urgency=medium
+
+  * [59c0504] Demote unavailability of dmraid from error to warning only
+
+ -- Michael Prokop <mika@grml.org>  Mon, 10 May 2021 08:45:03 +0200
+
+grml-autoconfig (0.20.0) grml-testing; urgency=medium
+
+  * [bf5fdcc] The Uni3-Terminus16.psf.gz font is shipped by console-setup-
+    linux nowadays
+  * [ac2c74a] Refresh packaging and use new debhelper style
+  * [b5b1296] Drop deprecated /etc/dhcp3 and ship as /etc/dhcp only
+  * [682ab2c] Drop /etc/init.d/grml-autoconfig.strace
+  * [43e0bd2] Convert language-functions from ISO-8859 to UTF-8
+  * [b6ad875] Apply wrap-and-sort (-tas) on Debian packaging
+  * [d949005] Drop deprecated Conflicts and Replaces on grml-etc + grml-
+    saveconfig
+
+ -- Michael Prokop <mika@grml.org>  Fri, 07 May 2021 17:30:00 +0200
+
+grml-autoconfig (0.19.4) grml-testing; urgency=medium
+
+  * [14203cc] Do not run VirtualBox setup under enabled Secure Boot to
+    avoid errors and startup delays. Thanks to Ralf Moll for the bugreport
+
+ -- Michael Prokop <mika@grml.org>  Tue, 15 Sep 2020 21:19:05 +0200
+
+grml-autoconfig (0.19.3) grml-testing; urgency=medium
+
+  * [5e4c03e] Improve VirtualBox shared folders + support vboxdrv service
+
+ -- Michael Prokop <mika@grml.org>  Thu, 13 Aug 2020 09:57:03 +0200
+
+grml-autoconfig (0.19.2) grml-testing; urgency=medium
+
+  * [289b3ef] VirtualBox shared folders: adjust check for detecting shared
+    folder
+  * [cc3ead1] VirtualBox shared folders: expect exact match for automation
+    folder name
+
+ -- Michael Prokop <mika@grml.org>  Fri, 10 Jul 2020 08:54:15 +0200
+
+grml-autoconfig (0.19.1) grml-testing; urgency=medium
+
+  * [86279cd] lvm: start lvm2-lvmetad only if present + support
+    lvm2-lvmpolld
+
+ -- Michael Prokop <mika@grml.org>  Tue, 23 Jun 2020 13:04:50 +0200
+
+grml-autoconfig (0.19.0) grml-testing; urgency=medium
+
+  * [b451f8e] Switch default mount point from /lib/live/mount/medium to
+    /run/live/medium
+  * [ebdc8af] Drop deprecated doc/grml-autoconfig.200905.txt
+  * [6f7266f] Bump Standards-Version to 4.3.0
+  * [7c8c7eb] Bump debian/compat to 10 and adjust Build-Depends on
+    debhelper accordingly
+  * [8fb8266] Disable shunit2 tests, failing in current Debian/unstable
+    environments
+
+ -- Michael Prokop <mika@grml.org>  Thu, 21 Mar 2019 16:31:27 +0100
+
 grml-autoconfig (0.18.1) grml-testing; urgency=medium
 
   * [fc67c18] config_language: rely on console-setup for keyboard + font
index 2f90ae6..2230934 100644 (file)
@@ -2,12 +2,14 @@ Source: grml-autoconfig
 Section: grml
 Priority: optional
 Maintainer: Michael Prokop <mika@grml.org>
-Build-Depends: debhelper (>= 10~)
-Standards-Version: 4.3.0
-Build-Depends-Indep: asciidoc,
-                     docbook-xsl,
-                     xsltproc,
-                     zsh
+Build-Depends:
+ debhelper (>= 10~),
+Standards-Version: 4.5.1
+Build-Depends-Indep:
+ asciidoc,
+ docbook-xsl,
+ xsltproc,
+ zsh,
 Homepage: https://git.grml.org/?p=grml-autoconfig.git
 Vcs-git: git://git.grml.org/grml-autoconfig.git
 Vcs-Browser: https://git.grml.org/?p=grml-autoconfig.git
@@ -16,31 +18,31 @@ Bugs: mailto:bugs@grml.org
 
 Package: grml-autoconfig
 Architecture: all
-Conflicts: grml-etc (<= 0.4-7),
-           grml-saveconfig
-Replaces: grml-saveconfig
-Depends: beep,
        console-setup,
        console-setup-linux,
        gawk,
        gpm,
        grml-etc-core (>= 0.1-3),
        grml-network (>= 0.3.7),
        grml-scripts (>= 0.8-14),
        kbd | console-utilities,
        rsync,
        rsyslog | system-log-daemon,
        udev,
        zsh,
        ${misc:Depends},
-         ${shlibs:Depends}
-Recommends: acpi-support,
           alsa-utils,
           grml-debootstrap (>= 0.7),
           hwinfo,
           locales,
           mdadm,
-            x11vnc
+Depends:
+ beep,
+ console-setup,
+ console-setup-linux,
gawk,
gpm,
grml-etc-core (>= 0.1-3),
grml-network (>= 0.3.7),
grml-scripts (>= 0.8-14),
kbd | console-utilities,
rsync,
rsyslog | system-log-daemon,
udev,
util-linux-extra | util-linux (<= 2.38-1),
zsh,
${misc:Depends},
${shlibs:Depends},
+Recommends:
+ acpi-support,
+ alsa-utils,
+ grml-debootstrap (>= 0.7),
+ hwinfo,
+ locales,
+ mdadm,
+ x11vnc,
 Description: main bootup process of a Grml (based) system
  grml-autoconfig is the main part of the bootup process of the
  grml system. This includes the hardware recognition system and
diff --git a/debian/grml-autoconfig.dirs b/debian/grml-autoconfig.dirs
new file mode 100644 (file)
index 0000000..e909d4a
--- /dev/null
@@ -0,0 +1,5 @@
+etc/grml
+etc/init.d
+usr/bin
+usr/sbin
+usr/share/doc/grml-saveconfig
diff --git a/debian/grml-autoconfig.docs b/debian/grml-autoconfig.docs
new file mode 100644 (file)
index 0000000..a9b9955
--- /dev/null
@@ -0,0 +1,4 @@
+doc/grml-autoconfig.1.html
+doc/grml-autoconfig.8.html
+doc/restore-config.1.html
+doc/save-config.1.html
index 1676ff5..4f452b4 100644 (file)
@@ -1 +1,10 @@
+autoconfig           /etc/grml/
+autoconfig.functions /etc/grml/
+autoconfig.local     /etc/grml/
+bin/restore-config /usr/bin/
+bin/save-config /usr/bin/
+etc/* /etc/
+grml-autoconfig      /etc/init.d/
+language-functions   /etc/grml/
+sbin/grml-autoconfig /usr/sbin/
 systemd/* lib/systemd/system/
diff --git a/debian/grml-autoconfig.links b/debian/grml-autoconfig.links
new file mode 100644 (file)
index 0000000..959e857
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/doc/grml-autoconfig/grml-autoconfig.1.html /usr/share/doc/grml-saveconfig/grml-config.html
diff --git a/debian/grml-autoconfig.lintian-overrides b/debian/grml-autoconfig.lintian-overrides
new file mode 100644 (file)
index 0000000..49829d8
--- /dev/null
@@ -0,0 +1,11 @@
+# grml specific packaging
+grml-autoconfig: unknown-section grml
+grml-autoconfig: bugs-field-does-not-refer-to-debian-infrastructure mailto:bugs@grml.org
+# 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 lib/systemd/system/grml-autoconfig.service grml-boot.target
+# we have no better way yet
+grml-autoconfig: systemd-service-file-wraps-init-script lib/systemd/system/grml-autoconfig.service ExecStart
+# that's the way dhclient hook scripts are working
+grml-autoconfig: executable-not-elf-or-script etc/dhcp/dhclient-exit-hooks.d/grml-sethostname
diff --git a/debian/grml-autoconfig.manpages b/debian/grml-autoconfig.manpages
new file mode 100644 (file)
index 0000000..eb6c3bc
--- /dev/null
@@ -0,0 +1,4 @@
+doc/grml-autoconfig.1.gz
+doc/grml-autoconfig.8.gz
+doc/restore-config.1.gz
+doc/save-config.1.gz
diff --git a/debian/overrides b/debian/overrides
deleted file mode 100644 (file)
index 85bb9a9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-grml-autoconfig: unknown-section grml
-grml-autoconfig: script-in-etc-init.d-not-registered-via-update-rc.d /etc/init.d/grml-autoconfig.strace
index 1e38b6e..b332450 100755 (executable)
@@ -9,70 +9,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-build: build-stamp
+%:
+       dh $@
 
-build-stamp:
-       dh_testdir
-       # tests against shunit2 2.1.6-1 fail in unstable envs as of 2019-03-21
-       # (cd tests && ./run_tests.sh)
-       (cd doc && $(MAKE))
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp
-       cd doc && $(MAKE) clean && cd ..
-
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs etc/grml etc/init.d usr/sbin usr/bin usr/share/doc/grml-saveconfig
-
-       # Add here commands to install the package into debian/grml-autoconfig.
-       install -m 755 grml-autoconfig      debian/grml-autoconfig/etc/init.d/grml-autoconfig
-       install -m 644 autoconfig           debian/grml-autoconfig/etc/grml/autoconfig
-       install -m 644 autoconfig.local     debian/grml-autoconfig/etc/grml/autoconfig.local
-       install -m 755 autoconfig.functions debian/grml-autoconfig/etc/grml/autoconfig.functions
-       install -m 644 language-functions   debian/grml-autoconfig/etc/grml/language-functions
-       install -m 755 sbin/grml-autoconfig debian/grml-autoconfig/usr/sbin/grml-autoconfig
+# tests against shunit2 2.1.6-1 fail in unstable envs since 2019-03-21 :-/
+#ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+#override_dh_auto_test:
+#      (cd tests && ./run_tests.sh)
+#      make shellcheck
+#endif
 
-       install -m 755 bin/restore-config debian/grml-autoconfig/usr/bin/restore-config
-       install -m 755 bin/save-config debian/grml-autoconfig/usr/bin/save-config
-
-       # just as a "backup" solution:
-       cp -a etc/* debian/grml-autoconfig/etc/
-
-# Build architecture-dependent files here.
-binary-arch: build install
-# We have nothing to do by default.
-
-# Build architecture-independent files here.
-binary-indep: build install
-       dh_testdir
-       dh_testroot
-       dh_install
-       dh_installchangelogs
-       dh_installdocs doc/grml-autoconfig.1.html doc/grml-autoconfig.8.html \
-                       doc/restore-config.1.html doc/save-config.1.html
-       dh_installman doc/grml-autoconfig.1.gz doc/grml-autoconfig.8.gz \
-                       doc/restore-config.1.gz doc/save-config.1.gz
-       # backward compability:
-       dh_link /usr/share/doc/grml-autoconfig/grml-autoconfig.1.html /usr/share/doc/grml-saveconfig/grml-config.html
-       dh_strip
-       dh_compress
-       mkdir -p $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/
-       cp -av debian/overrides $(CURDIR)/debian/grml-autoconfig/usr/share/lintian/overrides/grml-autoconfig
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+override_dh_auto_build:
+       (cd doc && $(MAKE))
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..89ae9db
--- /dev/null
@@ -0,0 +1 @@
+3.0 (native)
deleted file mode 120000 (symlink)
index 36cd991c5836e5383fead4a4705cc6471ad4e9f3..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-../../dhcp3/dhclient-exit-hooks.d/grml-sethostname
\ No newline at end of file
new file mode 100755 (executable)
index 0000000000000000000000000000000000000000..acd03a2913672183e05664a82dd5a03c2dc239c2
--- /dev/null
@@ -0,0 +1,12 @@
+# only run the comamnd if we bound to a new ip
+case "$reason" in BOUND)
+if ! grep -q 'nodhcphostname' /proc/cmdline && [ -f /etc/grml_cd ] ; then
+
+    hostname=$(busybox nslookup "$new_ip_address" | awk '/Address 1: '$new_ip_address'/ {print $4}')
+    if [ -n "$hostname" ] ; then
+        grml-hostname "$hostname"
+        hostname -F /etc/hostname
+    fi
+fi
+;;
+esac
diff --git a/etc/dhcp3/dhclient-exit-hooks.d/grml-sethostname b/etc/dhcp3/dhclient-exit-hooks.d/grml-sethostname
deleted file mode 100755 (executable)
index acd03a2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# only run the comamnd if we bound to a new ip
-case "$reason" in BOUND)
-if ! grep -q 'nodhcphostname' /proc/cmdline && [ -f /etc/grml_cd ] ; then
-
-    hostname=$(busybox nslookup "$new_ip_address" | awk '/Address 1: '$new_ip_address'/ {print $4}')
-    if [ -n "$hostname" ] ; then
-        grml-hostname "$hostname"
-        hostname -F /etc/hostname
-    fi
-fi
-;;
-esac
diff --git a/etc/init.d/grml-autoconfig.strace b/etc/init.d/grml-autoconfig.strace
deleted file mode 100755 (executable)
index 6825727..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Filename:      grml-autoconfig.strace
-# Purpose:       strace grml-autoconfig for use with mksquashfs/mkisos sort option
-# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
-# 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 start/restart/reload/stop
-[[ $1 == "start" ]] && true
-
-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
-# }}}
-
-/usr/bin/strace -f -eopen,stat64,execve -o /etc/grml/strace.autoconfig /etc/init.d/grml-autoconfig "$*" &
-
-## END OF FILE #################################################################
index a0d4a4c..dedb9a8 100755 (executable)
@@ -83,8 +83,6 @@ checkvalue $CONFIG_TIMEZONE && config_timezone
 
 checkvalue $CONFIG_SWRAID && config_swraid
 
-checkvalue $CONFIG_DMRAID && config_dmraid
-
 checkvalue $CONFIG_LVM && config_lvm
 
 checkvalue $CONFIG_TESTCD && config_testcd
@@ -135,6 +133,8 @@ checkvalue $CONFIG_CONSOLE && config_console
 
 checkvalue $CONFIG_VIRTUALBOX_SHARED_FOLDERS && config_virtualbox_shared_folders
 
+checkvalue $CONFIG_VIRTUALBOX_SETUP && config_virtualbox_setup
+
 checkvalue $CONFIG_MYPATH && config_mypath
 
 checkvalue $CONFIG_DISTRI && config_distri
@@ -144,6 +144,8 @@ checkvalue $CONFIG_BLANKING && config_blanking
 checkvalue $CONFIG_DEBOOTSTRAP && config_debootstrap
 
 checkvalue $CONFIG_XSTARTUP && config_x_startup
+
+checkvalue $CONFIG_EASTEREGG && config_easteregg
 # }}}
 
 # {{{ Re-enable signals
index 3f4091f..b575f47 100644 (file)
@@ -656,7 +656,7 @@ case "$LANGUAGE" in
                 COUNTRY="no"
                 LANG="nb_NO.UTF-8"
                 LANGUAGE="no:nb_NO"
-                # Keytable "no*" is correct if æøå (the 3 final letters in the
+                # Keytable "no*" is correct if  (the 3 final letters in the
                 # norse alphabet) shows up as "a+e", "oslash" and "aring".
                 # Otherwise try the other variants no-latin1 etc.
                 KEYTABLE="no"
index c2a1c99..c026713 100644 (file)
@@ -8,7 +8,7 @@ After=rc-local.service
 [Service]
 ExecStart=/etc/init.d/grml-autoconfig
 Type=oneshot
-StandardInput=tty
+StandardInput=null
 StandardOutput=tty
 
 [Install]