From b4eafd94677a12f1dc3d6cade21cece0fd858339 Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Sat, 17 Apr 2004 00:23:17 -0700 Subject: [PATCH] add dbus.dev, pam_console.dev and selinux.dev files for /etc/dev.d/default/ usage Thanks to Red Hat for them. --- etc/dev.d/default/dbus.dev | 11 +++++++++++ etc/dev.d/default/pam_console.dev | 14 ++++++++++++++ etc/dev.d/default/selinux.dev | 14 ++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 etc/dev.d/default/dbus.dev create mode 100644 etc/dev.d/default/pam_console.dev create mode 100644 etc/dev.d/default/selinux.dev (limited to 'etc/dev.d') diff --git a/etc/dev.d/default/dbus.dev b/etc/dev.d/default/dbus.dev new file mode 100644 index 0000000000..0e79632b30 --- /dev/null +++ b/etc/dev.d/default/dbus.dev @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ -f /etc/sysconfig/udev ]; then + . /etc/sysconfig/udev +fi + +[ "$UDEV_DBUS" != "yes" ] && exit 0 + +if [ -x /usr/sbin/udev_dbus ]; then + exec /usr/sbin/udev_dbus "$@" +fi diff --git a/etc/dev.d/default/pam_console.dev b/etc/dev.d/default/pam_console.dev new file mode 100644 index 0000000000..324c4fd804 --- /dev/null +++ b/etc/dev.d/default/pam_console.dev @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -f /etc/sysconfig/udev ]; then + . /etc/sysconfig/udev +fi + +[ "$UDEV_CONSOLE" != "yes" ] && exit 0 + +if [ -x /sbin/pam_console_setowner ]; then + if [ "$UDEV_LOG" = "yes" -a -x /usr/bin/logger ]; then + /usr/bin/logger -p auth.debug "Restoring console permissions for $DEVNAME" + fi + exec /sbin/pam_console_setowner $DEVNAME +fi diff --git a/etc/dev.d/default/selinux.dev b/etc/dev.d/default/selinux.dev new file mode 100644 index 0000000000..f168eefc42 --- /dev/null +++ b/etc/dev.d/default/selinux.dev @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -f /etc/sysconfig/udev ]; then + . /etc/sysconfig/udev +fi + +[ "$UDEV_SELINUX" != "yes" ] && exit 0 + +if [ -x /sbin/restorecon ]; then + if [ "$UDEV_LOG" = "yes" -a -x /usr/bin/logger ]; then + /usr/bin/logger -p auth.debug "Restoring file security contexts for $DEVNAME" + fi + /sbin/restorecon $DEVNAME +fi -- cgit v1.2.3-54-g00ecf