<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=6193&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / missing sysvinit config for power-profiles-daemon]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6193</link>
		<description><![CDATA[The most recent posts in missing sysvinit config for power-profiles-daemon.]]></description>
		<lastBuildDate>Fri, 01 Dec 2023 02:14:06 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: missing sysvinit config for power-profiles-daemon]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45821#p45821</link>
			<description><![CDATA[<p>Thanks <em>GlennW</em>, a useful script!</p><p>There are a few things to consider as far as the best power management solution...</p><p>Here are some useful references:<br />- <a href="https://www.reddit.com/r/thinkpad/comments/16n3yvc/how_i_got_amazing_battery_life_and_little_fan/" rel="nofollow">https://www.reddit.com/r/thinkpad/comme … ittle_fan/</a><br />- <a href="https://wiki.archlinux.org/title/Lenovo_ThinkPad_T14s_(AMD)_Gen_3#AMD_P-State_EPP" rel="nofollow">https://wiki.archlinux.org/title/Lenovo … -State_EPP</a><br />- <a href="https://www.phoronix.com/review/linux-65-thinkpad" rel="nofollow">https://www.phoronix.com/review/linux-65-thinkpad</a><br />- <a href="https://www.phoronix.com/news/Linux-6.6-ACPI-Power-Management" rel="nofollow">https://www.phoronix.com/news/Linux-6.6 … Management</a></p><p>Currently, I am using the 6.5.0.0. kernel from daedalus-backports.</p><p><em>aluma</em>, if you are having sleep issues, you may want to try that kernel, no sleep issues for me.<br />However, the wifi driver doesn&#039;t wake from hibernate (known issue for that kernel driver)<br />- <a href="https://wiki.archlinux.org/title/Lenovo_ThinkPad_T14_(AMD)_Gen_4#Failure_to_resume_from_hibernation" rel="nofollow">https://wiki.archlinux.org/title/Lenovo … ibernation</a></p><p>Note that I have tried the suggestion from the reddit post above and getting good power utilisation rate now (around 5.5 - 7W which should give close to 10hr battery life).</p><div class="codebox"><pre><code>echo &#039;power&#039; | tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference</code></pre></div><p>I will write up an install guide for Devuan for the laptop soon, but looks really good and should improve even further with new kernel releases.</p>]]></description>
			<author><![CDATA[dummy@example.com (greenant)]]></author>
			<pubDate>Fri, 01 Dec 2023 02:14:06 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45821#p45821</guid>
		</item>
		<item>
			<title><![CDATA[Re: missing sysvinit config for power-profiles-daemon]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45819#p45819</link>
			<description><![CDATA[<p># systemd to sysvinit startup script conversion<br /># ref. <a href="https://dev1galaxy.org/viewtopic.php?pid=23309#p23309" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=23309#p23309</a></p><p> ...has this handy link to a converting script.</p><p>sysd2v-0.3.sh , over 500 lines, 15kb file not at the link in that post...</p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh
# sysd2v v0.3  --  systemd unit to sysvinit script converter
# Copyright (C) 2019  Trek http://www.trek.eu.org/devel/sysd2v
# distributed under the terms of the GNU General Public License 3

nl=&quot;
&quot;

# read a systemd unit file and set variables named ini_{section}_{key}
# usage: read_unit filename instance
# filename	service unit configuration file, &#039;-&#039; to read from stdin
# instance	instance name for template units
read_unit()
{
  filename=$1
  instance=$2

  if [ &quot;$filename&quot; != - ]
  then
    inifile_unit_name=${filename##*/}
    inifile_unit_name=${inifile_unit_name%.*}
  fi

  rm_comm=&#039;/^[#;]/d&#039;
  concat=&#039;:l; /\\$/ { N; s/[[:space:]]*\\\n/ /; tl }&#039;
  subst_inst=&quot;s/%[Ii]/$instance/g&quot;
  unit=$(
    cat &quot;$filename&quot; |
    sed &quot;$rm_comm&quot; |
    sed &quot;$concat;$subst_inst&quot;
  )
  section_list=$(
    printf %s &quot;$unit&quot; |
    sed -n &#039;s/^\[\([[:alnum:]]\+\)\].*/\1/p&#039;
  )
  oldifs=$IFS
  IFS=$nl

  for section in $section_list
  do
    get_sect=&#039;/^\[&#039;&quot;$section&quot;&#039;\]/,/^\[.\+\]/&#039;
    key_list=$(
      printf %s &quot;$unit&quot; |
      sed -n &quot;$get_sect&quot;&#039;s/^\([[:alnum:]]\+\)[[:space:]]*=.*/\1/p&#039; |
      sort -u
    )

    for key in $key_list
    do
      val=$(
        printf %s &quot;$unit&quot; |
        sed -n &quot;$get_sect&quot;&#039;s/^&#039;&quot;$key&quot;&#039;[[:space:]]*=[[:space:]]*\(.*\)/\1/p&#039;
      )
      var=$(
        echo &quot;${section}_$key&quot; |
        tr &#039;[:upper:]&#039; &#039;[:lower:]&#039;
      )
      eval ini_$var=\$val
      [ -n &quot;$debug&quot; ] &amp;&amp; echo &quot;ini_$var=$val&quot; &gt;&amp;2
    done
  done

  IFS=$oldifs
}

# read a systemd configuration value and write its prefix to stdout
# usage: get_prefix val
# val		systemd configuration value
get_prefix () { printf %s &quot;$1&quot; | sed -n &#039;s/^\([-@:+!|]*\).*/\1/p&#039;; }

# read a boolean value and returns true or false
# usage: is_true val
# val		boolean value
is_true () { case &quot;$1&quot; in 1|[Oo][Nn]|[Tt]*|[Yy]*) true;; *) false; esac }

# read systemd services list and write LSB facilities to stdout
# usage: get_provides services
# services	list of service units
get_provides ()
{
  lst=
  for dep in $1
  do
    lst=${lst:+$lst }${dep%.service}
  done
  printf %s &quot;$lst&quot;
}

# read systemd units list and write LSB facilities to stdout
# usage: get_depends dependencies [ignores]
# dependencies	list of required units
# ignores	facilities to ignore
get_depends ()
{
  lst=
  for dep in $1
  do
    d=
    case $dep in
      local-fs-pre.target) d=mountkernfs;;
      time-sync.target) d=\$time;;
      systemd-modules-load.service) d=kmod;;
      local-fs.target|network-pre.target) d=\$local_fs;;
      systemd-sysctl.service) d=procps;;
      network.target|network-online.target|systemd-networkd.service)
        d=\$network;;
      nss-lookup.target) d=\$named;;
      rpcbind.target|remote-fs-pre.target) d=\$portmap;;
      remote-fs.target|sysinit.target|basic.target) d=\$remote_fs;;
      syslog.service) d=\$syslog;;
      boot-complete.target|multi-user.target|default.target) d=\$all;;
      *.service) d=${dep%.service};;
      *) echo &quot;WARNING: unsupported target &#039;$dep&#039;&quot; &gt;&amp;2
    esac

    ign=${2:+$2 }$lst
    [ -z &quot;$ign&quot; -o -n &quot;${ign%%*&quot;$d&quot;*}&quot; ] &amp;&amp;
      lst=${lst:+$lst }$d
  done

  printf %s &quot;$lst&quot;
}

# read LSB facilities list and write runlevel to stdout
# usage: get_runlevel facilities
# facilities	list of required facilities
get_runlevel ()
{
  case $1 in
    *\$remote_fs*) echo 2 3 4 5;;
    *) echo S
  esac
}

# write a list of environment files to be executed
# usage: write_env list
# list		files separated by newlines, with prefix (-)
write_env ()
{
  oldifs=$IFS
  IFS=$nl

  for env in $1
  do
    pre=$(get_prefix &quot;$env&quot;)
    noerr=

    [ -n &quot;$pre&quot; -a -z &quot;${pre%%*-*}&quot; ] &amp;&amp; noerr=&quot;[ -r ${env#$pre} ] &amp;&amp; &quot;

    printf &#039;%s\n&#039; &quot;$noerr. ${env#$pre}&quot;
  done

  IFS=$oldifs
}

# write an environment variable containing paths
# usage: write_path name prefix list
# name		name of the environment variable
# prefix	path prefix to append directories
# list		paths separated by spaces or newlines
write_path ()
{
  lst=
  for dir in $3
  do
    lst=${lst:+$lst:}$2/$dir
  done

  [ -z &quot;$3&quot; ] || printf &#039;%s=%s\n&#039; $1 $lst
}

# write a list of directories to be created
# usage: write_install prefix list [user [group [mode]]]
# prefix	path prefix to append directories
# list		paths separated by spaces or newlines
# user		user ownership
# group		group ownership
# mode		permission mode
write_install ()
{
  for dir in $2
  do
    printf &#039;  install -d %s%s/%s || return 2\n&#039; \
      &quot;${3:+-o $3 }${4:+-g $4 }${5:+-m $5 }&quot; &quot;$1&quot; &quot;$dir&quot;
  done
}

# write a list of commands applying systemd executable prefixes
# usage: write_commands list [run [runpriv]]
# list		commands separated by newlines, with prefixes (-@:+!)
# run		command line to run each command (nice, chrt, ...)
# runpriv	command line to set privileges (runuser, ...)
write_commands ()
{
  oldifs=$IFS
  IFS=$nl

  for cmd in $1
  do
    pre=$(get_prefix &quot;$cmd&quot;)
    beg=$3
    end=&#039; || return 2&#039;

    if [ -n &quot;$pre&quot; ]
    then
      [ -z &quot;${pre%%*-*}&quot; ] &amp;&amp; end=
      [ -z &quot;${pre%%*[+!]*}&quot; ] &amp;&amp; beg=
      [ -z &quot;${pre%%*[@:]*}&quot; ] &amp;&amp;
        echo &quot;WARNING: unsupported exec prefix &#039;$pre&#039;&quot; &gt;&amp;2
    fi

    printf &#039;  %s\n&#039; &quot;$2$beg${cmd#$pre}$end&quot;
  done

  IFS=$oldifs
}

# read a list of commands separated by newlines and write an override function
# usage: write_function name [commands]
# name		function name (start_cmd, stop_cmd, ...)
# commands	list of commands, read from stdin if omitted
write_function ()
{
  lst=${2-$(cat)}

  [ -n &quot;$lst&quot; ] || return
  [ &quot;$lst&quot; = : ] &amp;&amp; printf &quot;do_${1}_override () :\n\n&quot; &amp;&amp; return

  end=&#039;  true\n&#039;
  [ -z &quot;${lst%%*|| return [0-9]}&quot; -o -z &quot;${lst%%*|| return \$?}&quot; ] &amp;&amp; end=
  printf &quot;do_${1}_override ()\n{\n%s\n$end}\n\n&quot; &quot;$lst&quot;
}

# write an init-d-script file starting from the ini_* vars (see read_unit)
# usage: write_init servicename instance
# servicename	name of the service provided
# instance	instance name for template units
write_init ()
{
  name=$1
  instance=$2

  if [ &quot;${name%@}&quot; != &quot;$name&quot; ]
  then
    name=$name$instance
  fi

  daemon_pre=$(get_prefix &quot;$ini_service_execstart&quot;)
  daemon=${ini_service_execstart#$daemon_pre}

  if [ &quot;${daemon%%[[:space:]]*}&quot; != &quot;$daemon&quot; ]
  then
    daemon_args=${daemon#*[[:space:]]}
    daemon=${daemon%%[[:space:]]*}
  fi

  pidfile=$ini_service_pidfile

  if [ -n &quot;$ini_service_user&quot; ]
  then
    start_args=&quot;--user $ini_service_user&quot;
    [ -n &quot;$daemon_pre&quot; -a -z &quot;${daemon_pre%%*[+!]*}&quot; ] ||
      start_args=&quot;$start_args --chuid $ini_service_user&quot;
    stop_args=&quot;--user $ini_service_user&quot;
    runprivstart=&quot;runuser -u $ini_service_user -- &quot;
    is_true &quot;$ini_service_permissionsstartonly&quot; || runpriv=$runprivstart
  fi

  cls=$ini_service_ioschedulingclass
  pri=$ini_service_ioschedulingpriority
  [ -n &quot;$cls$pri&quot; ] &amp;&amp;
    start_args=&quot;$start_args --iosched ${cls:-best-effort}${pri:+:$pri}&quot; &amp;&amp;
    run=&quot;ionice ${cls:+-c $cls }${pri:+-n $pri }&quot;

  pol=$ini_service_cpuschedulingpolicy
  pri=$ini_service_cpuschedulingpriority
  [ -n &quot;$pol$pri&quot; ] &amp;&amp;
    start_args=&quot;$start_args --procsched ${pol:-other}${pri:+:$pri}&quot; &amp;&amp;
    run=&quot;${run}chrt ${pol:+--$pol }${pri:-0} &quot;

  [ -n &quot;$ini_service_nice&quot; ] &amp;&amp;
    start_args=&quot;$start_args --nicelevel $ini_service_nice&quot; &amp;&amp;
    run=&quot;${run}nice -n $ini_service_nice &quot;

  pre=$(get_prefix &quot;$ini_service_workingdirectory&quot;)
  workdir=${ini_service_workingdirectory#$pre}
  [ &quot;$workdir&quot; = &#039;~&#039; ] &amp;&amp; workdir=\~$ini_service_user
  [ -n &quot;$workdir&quot; ] &amp;&amp;
    start_args=&quot;$start_args --chdir $workdir&quot; &amp;&amp;
    chdir=&quot;${pre}cd $workdir&quot;

  if [ -z &quot;${service_type:=$ini_service_type}&quot; ]
  then
    if [ -n &quot;$ini_service_busname&quot; ]
    then
      service_type=dbus
    elif [ -n &quot;$ini_service_execstart&quot; ]
    then
      service_type=simple
    else
      service_type=oneshot
    fi
  fi

  if [ &quot;$service_type&quot; != forking ]
  then
    start_args=&quot;$start_args --background&quot;
    [ -z &quot;$pidfile&quot; -a &quot;$ini_service_killmode&quot; != none ] &amp;&amp;
      start_args=&quot;$start_args --make-pidfile&quot; &amp;&amp;
      pidfile=&quot;/var/run/$name-sysd2v.pid&quot;
  fi

  if [ &quot;$service_type&quot; = notify ]
  then
    start_args=&quot;$start_args --notify-await&quot;
    timeout=${ini_service_timeoutstartsec:-$ini_service_timeoutsec}
    timeout=${timeout%s}
    [ -n &quot;${timeout#60}&quot; ] &amp;&amp;
      start_args=&quot;$start_args --notify-timeout $timeout&quot;
    [ -n &quot;$timeout&quot; -a -z &quot;${timeout%%*[^0-9]*}&quot; ] &amp;&amp;
      echo &quot;WARNING: unsupported timeout &#039;$timeout&#039;&quot; &gt;&amp;2
  elif [ &quot;$service_type&quot; = dbus ]
  then
    : TODO
  fi

  signal=${ini_service_killsignal#SIG}
  timeout=${ini_service_timeoutstopsec:-$ini_service_timeoutsec}
  timeout=${timeout%s}
  [ -n &quot;${signal#TERM}&quot; -o -n &quot;${timeout#90}&quot; ] &amp;&amp;
    stop_args=&quot;$stop_args --retry=${signal:-TERM}/${timeout:-90}/KILL/5&quot;

  limitnofile=$ini_service_limitnofile
  [ &quot;$limitnofile&quot; = infinity ] &amp;&amp; limitnofile=unlimited

  need_install=$ini_service_runtimedirectory
  need_install=$need_install$ini_service_statedirectory
  need_install=$need_install$ini_service_cachedirectory
  need_install=$need_install$ini_service_logsdirectory
  need_install=$need_install$ini_service_configurationdirectory

  need_do_start=$ini_service_execstartpre$ini_service_execstartpost
  need_do_start=$need_do_start$need_install

  execstop=$ini_service_execstop

  if [ &quot;$service_type&quot; != oneshot ]
  then
    [ &quot;$pidfile&quot; = &quot;/var/run/${daemon##*/}.pid&quot; ] &amp;&amp; unset pidfile
    [ &quot;$name&quot; = &quot;${daemon##*/}&quot; ] &amp;&amp; unset name

    [ -n &quot;$daemon_args&quot; -a -z &quot;${daemon_args%%*[\&quot;\\]*}&quot; ] &amp;&amp;
      echo &quot;WARNING: DAEMON_ARGS needs to be escaped&quot; &gt;&amp;2
    errcheck=&#039; || return $?&#039;

    if [ -n &quot;$daemon_pre&quot; ]
    then
      [ -z &quot;${daemon_pre%%*-*}&quot; ] &amp;&amp; errcheck=
      [ -z &quot;${daemon_pre%%*[@:]*}&quot; ] &amp;&amp;
        echo &quot;WARNING: unsupported exec prefix &#039;$daemon_pre&#039;&quot; &gt;&amp;2
    fi

    # TODO: test if already running before start (pretest=&quot;+do_status_cmd&quot;)
    [ -n &quot;$need_do_start&quot; -o -z &quot;$errcheck&quot; ] &amp;&amp;
      execstart=&quot;-+do_start_cmd$errcheck&quot;

    errcheck=&#039; || return $?&#039;
    [ -n &quot;$execstop&quot; ] &amp;&amp; errcheck=
    [ -n &quot;$execstop$ini_service_execstoppost&quot; -a \
      &quot;$ini_service_killmode&quot; != none ] &amp;&amp;
      killstop=&quot;-do_stop_cmd$errcheck&quot;

    [ -n &quot;$timeout&quot; -a -z &quot;${timeout%%*[^0-9]*}&quot; ] &amp;&amp;
      echo &quot;WARNING: unsupported timeout &#039;$timeout&#039;&quot; &gt;&amp;2
  else
    daemon=none
    pidfile=none
    : ${name:=SERVICE_NAME}
    unset daemon_args start_args stop_args
    execstart=$ini_service_execstart
    runstart=$run
  fi

  need_do_start=$need_do_start$execstart
  start_args=${start_args# }
  stop_args=${stop_args# }

  aliases=$(get_provides &quot;$ini_install_alias&quot;)

  [ -z &quot;$ini_unit_defaultdependencies&quot; ] ||
    is_true &quot;$ini_unit_defaultdependencies&quot; &amp;&amp;
    defdep=sysinit.target

  req_start=$(get_depends &quot;$ini_unit_requires $defdep&quot;)
  should_start=$(get_depends &quot;$ini_unit_wants $ini_unit_after&quot; &quot;$req_start&quot;)

  default_start=$(get_runlevel &quot;$req_start $should_start&quot;)
  [ &quot;$default_start&quot; = S ] &amp;&amp; default_stop=&#039;0 6&#039; || default_stop=&#039;0 1 6&#039;
  [ -z &quot;$execstop$ini_service_execstoppost&quot; ] &amp;&amp;
    [ &quot;$service_type&quot; = oneshot -o &quot;$ini_service_killmode&quot; = none ] &amp;&amp;
    default_stop=

  [ &quot;$default_start&quot; = S ] &amp;&amp; ignore=\$remote_fs
  start_before=$(get_depends &quot;$ini_unit_requiredby $ini_install_wantedby
    $ini_unit_before&quot; &quot;$req_start $should_start \$all $ignore&quot;)

  cat &lt;&lt;EOF
#!/bin/sh
# Generated by sysd2v v0.3  --  http://www.trek.eu.org/devel/sysd2v
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != &quot;\$INIT_D_SCRIPT_SOURCED&quot; ] ; then
    set &quot;\$0&quot; &quot;\$@&quot;; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:       ${name:-${daemon##*/}}${aliases:+ $aliases}
# Required-Start: $req_start
# Required-Stop:  ${default_stop:+$req_start}
${should_start:+# Should-Start:   $should_start
${default_stop:+# Should-Stop:    $should_start
}}${start_before:+# X-Start-Before: $start_before
${default_stop:+# X-Stop-After:   $start_before
}}# Default-Start:  $default_start
# Default-Stop:   $default_stop
# Description:    ${ini_unit_description:-SERVICE_DESCRIPTION}
### END INIT INFO
EOF

  if [ -n &quot;$ini_service_environment$ini_service_environmentfile$need_install&quot; ]
  then
    echo set -a
    write_path RUNTIME_DIRECTORY /run &quot;$ini_service_runtimedirectory&quot;
    write_path STATE_DIRECTORY /var/lib &quot;$ini_service_statedirectory&quot;
    write_path CACHE_DIRECTORY /var/cache &quot;$ini_service_cachedirectory&quot;
    write_path LOGS_DIRECTORY /var/log &quot;$ini_service_logsdirectory&quot;
    write_path CONFIGURATION_DIRECTORY /etc \
      &quot;$ini_service_configurationdirectory&quot;
    printf &#039;%s&#039; &quot;${ini_service_environment:+$ini_service_environment$nl}&quot;
    write_env &quot;$ini_service_environmentfile&quot;
    printf &#039;set +a\n\n&#039;
  fi

  cat &lt;&lt;EOF
${name:+DESC=\&quot;$name\&quot;
}DAEMON=$daemon
${daemon_args:+DAEMON_ARGS=\&quot;$daemon_args\&quot;
}${pidfile:+PIDFILE=$pidfile
}${start_args:+START_ARGS=\&quot;$start_args\&quot;
}${stop_args:+STOP_ARGS=\&quot;$stop_args\&quot;
}${limitnofile:+ulimit -n $limitnofile
}${ini_service_umask:+umask $ini_service_umask
}
EOF

  if [ -n &quot;$need_do_start&quot; ]
  then
    {
      write_install /run &quot;$ini_service_runtimedirectory&quot; \
        &quot;$ini_service_user&quot; &quot;$ini_service_group&quot; \
        &quot;$ini_service_runtimedirectorymode&quot;
      write_install /var/lib &quot;$ini_service_statedirectory&quot; \
        &quot;$ini_service_user&quot; &quot;$ini_service_group&quot; \
        &quot;$ini_service_statedirectorymode&quot;
      write_install /var/cache &quot;$ini_service_cachedirectory&quot; \
        &quot;$ini_service_user&quot; &quot;$ini_service_group&quot; \
        &quot;$ini_service_cachedirectorymode&quot;
      write_install /var/log &quot;$ini_service_logsdirectory&quot; \
        &quot;$ini_service_user&quot; &quot;$ini_service_group&quot; \
        &quot;$ini_service_logsdirectorymode&quot;
      write_install /etc &quot;$ini_service_configurationdirectory&quot; &#039;&#039; &#039;&#039; \
        &quot;$ini_service_configurationdirectorymode&quot;
      write_commands &quot;$chdir&quot;
      write_commands &quot;$ini_service_execstartpre&quot; &quot;$run&quot; &quot;$runpriv&quot;
      write_commands &quot;$execstart&quot; &quot;$runstart&quot; &quot;$runprivstart&quot;
      write_commands &quot;$ini_service_execstartpost&quot; &quot;$run&quot; &quot;$runpriv&quot;
    } | write_function start_cmd
  else
    [ &quot;$service_type&quot; = oneshot ] &amp;&amp; write_function start :
  fi

  if [ -n &quot;$execstop$ini_service_execstoppost&quot; ]
  then
    {
      write_commands &quot;$chdir&quot;
      write_commands &quot;$execstop&quot; &quot;$run&quot; &quot;$runpriv&quot;
      write_commands &quot;$killstop&quot;
      write_commands &quot;$ini_service_execstoppost&quot; &quot;$run&quot; &quot;$runpriv&quot;
    } | write_function stop_cmd
  else
    [ &quot;$service_type&quot; = oneshot -o &quot;$ini_service_killmode&quot; = none ] &amp;&amp;
      write_function stop :
  fi

  if [ &quot;$ini_service_execreload&quot; = &#039;/bin/kill -HUP $MAINPID&#039; -a \
       -z &quot;$run$runpriv&quot; ]
  then
    printf &#039;alias do_reload=do_reload_sigusr1\n\n&#039;
  elif [ -n &quot;$ini_service_execreload&quot; ]
  then
    {
      write_commands &quot;$chdir&quot;
      write_commands &quot;$ini_service_execreload&quot; &quot;$run&quot; &quot;$runpriv&quot;
    } | write_function reload_cmd

    cat &lt;&lt;&quot;EOF&quot;
do_reload ()
{
  log_daemon_msg &quot;Reloading $DESC configuration files&quot; &quot;$NAME&quot;
  MAINPID=$(cat $PIDFILE)
  do_reload_cmd_override
  log_end_msg $?
}
EOF
  fi

  [ &quot;$service_type&quot; = oneshot ] &amp;&amp; write_function status :
}

# parse command line
while getopts di:n: opt
do
    case $opt in
      d) debug=1;;
      i) instance=$OPTARG;;
      n) name=$OPTARG;;
      ?) printf &quot;Usage: %s [-d] [-i instance] [-n servicename] [filename]\n&quot; \
           &quot;$0&quot;
         exit 2;;
    esac
done

: ${instance=INSTANCE_NAME}
shift $(($OPTIND - 1))

# convert unit file
read_unit &quot;${1:--}&quot; &quot;$instance&quot;
write_init &quot;${name-$inifile_unit_name}&quot; &quot;$instance&quot;</code></pre></div><p>I have a copy... (not sure if I may post it here in code tags???) <br />happy to share.</p><p>Maybe it&#039;ll work for you. Just look out for start and stop levels being consistent with your system.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Fri, 01 Dec 2023 00:10:44 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45819#p45819</guid>
		</item>
		<item>
			<title><![CDATA[Re: missing sysvinit config for power-profiles-daemon]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45802#p45802</link>
			<description><![CDATA[<p>There is another solution - power management using DE.<br />In Trinity, for example, there is a tdepowersave program in which everything is configured in 15 seconds. <br />It hangs in the tray and issues warnings when necessary.<br />KDE5 has something similar.</p><p>Another question is that in Daedalus, turning off the laptop when closing the lid (this is how I set it up) happens every other time, sometimes it “falls asleep” in the middle of the process and to continue you need to open the lid. <br />There was no such glitch in Chimaera.</p><p> Regards.</p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Thu, 30 Nov 2023 12:35:55 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45802#p45802</guid>
		</item>
		<item>
			<title><![CDATA[missing sysvinit config for power-profiles-daemon]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=45798#p45798</link>
			<description><![CDATA[<p>I am trying to access power profiles for AMD laptop (thinkpad 14s Gen4 AMD).</p><p>Devuan daedalus works well in general on this laptop but trying to set power profiles fails.</p><p>install: </p><div class="codebox"><pre><code>apt install power-profiles-daemon</code></pre></div><p>try to access power-profiles:</p><div class="codebox"><pre><code># powerprofilesctl get
Failed to communicate with power-profiles-daemon: g-dbus-error-quark: Error calling StartServiceByName for net.hadess.PowerProfiles: Launch helper exited with unknown return code 1 (25)</code></pre></div><p>looks like the service is not running.</p><p>There is no sysvinit definition but there is a systemd unit file:</p><div class="codebox"><pre class="vscroll"><code>[Unit]
Description=Power Profiles daemon
Conflicts=tuned.service auto-cpufreq.service system76-power.service
Before=multi-user.target display-manager.target

[Service]
Type=dbus
BusName=net.hadess.PowerProfiles
ExecStart=/usr/libexec/power-profiles-daemon
Restart=on-failure
# This always corresponds to /var/lib/power-profiles-daemon
StateDirectory=power-profiles-daemon
#Uncomment this to enable debug
#Environment=&quot;G_MESSAGES_DEBUG=all&quot;

# Lockdown
ProtectSystem=strict
ProtectControlGroups=true
ProtectHome=true
ProtectKernelModules=true
PrivateTmp=true
RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK
MemoryDenyWriteExecute=true
RestrictRealtime=true

[Install]
WantedBy=graphical.target</code></pre></div><p>running the command directly does allow access to power profile:</p><div class="codebox"><pre><code>/usr/libexec/power-profiles-daemon</code></pre></div><p>I am looking to create a sysvinit file for this daemon.&#160; I think I can do that with just the daemon command, but not sure if it should be connected to Dbus more explicitly?</p>]]></description>
			<author><![CDATA[dummy@example.com (greenant)]]></author>
			<pubDate>Thu, 30 Nov 2023 10:51:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=45798#p45798</guid>
		</item>
	</channel>
</rss>
