systemd/systemd-inittab
Frederic Crozat d853475825 - Add tty1.patch: ensure passphrase are handled before starting
gettty on tty1.
- Add inittab generator, creating default.target at startup based
  on /etc/inittab value.
- No longer try to create /etc/systemd/system/default.target at
  initial package install (bnc#707418)
- Fix configuration path used for systemd user manager.
- Ensure pam-config output is no display in install script.
- Remove buildrequires on vala, no longer needed.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=183
2011-08-24 15:35:41 +00:00

9 lines
432 B
Bash

#!/bin/bash
# Try to read default runlevel from the old inittab if it exists
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null)
if [ -n "$runlevel" -a -e /lib/systemd/system/runlevel$runlevel.target ] ; then
/bin/ln -sf /lib/systemd/system/runlevel$runlevel.target $1/default.target 2>&1 && exit 0
fi
#failsafe
/bin/ln -sf /lib/systemd/system/graphical.target $1/default.target