aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2016-04-25 15:27:16 +0200
committerLukas Nykryn <lnykryn@redhat.com>2016-04-25 15:27:16 +0200
commit189590c3af812c2d8f445a6800ad74f4ccf15e2e (patch)
tree9b457295e51b8506f0a5897df17fc75b9d4f83b4 /systemd
parentc2dbaeda955fa99f90b051b62e58e3269237aea0 (diff)
downloadinitscripts-189590c3af812c2d8f445a6800ad74f4ccf15e2e.tar
initscripts-189590c3af812c2d8f445a6800ad74f4ccf15e2e.tar.gz
initscripts-189590c3af812c2d8f445a6800ad74f4ccf15e2e.tar.bz2
initscripts-189590c3af812c2d8f445a6800ad74f4ccf15e2e.tar.xz
initscripts-189590c3af812c2d8f445a6800ad74f4ccf15e2e.zip
remove autorelabel stuff
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/fedora-autorelabel43
-rw-r--r--systemd/system/fedora-autorelabel-mark.service15
-rw-r--r--systemd/system/fedora-autorelabel.service17
3 files changed, 0 insertions, 75 deletions
diff --git a/systemd/fedora-autorelabel b/systemd/fedora-autorelabel
deleted file mode 100755
index d87acd29..00000000
--- a/systemd/fedora-autorelabel
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-# Do automatic relabelling
-#
-
-. /etc/init.d/functions
-
-relabel_selinux() {
- # if /sbin/init is not labeled correctly this process is running in the
- # wrong context, so a reboot will be required after relabel
- AUTORELABEL=
- . /etc/selinux/config
- echo "0" > /sys/fs/selinux/enforce
- [ -x /bin/plymouth ] && plymouth --hide-splash
-
- if [ "$AUTORELABEL" = "0" ]; then
- echo
- echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required. "
- echo $"*** /etc/selinux/config indicates you want to manually fix labeling"
- echo $"*** problems. Dropping you to a shell; the system will reboot"
- echo $"*** when you leave the shell."
- sulogin
-
- else
- echo
- echo $"*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required."
- echo $"*** Relabeling could take a very long time, depending on file"
- echo $"*** system size and speed of hard drives."
-
- FORCE=`cat /.autorelabel`
- [ -x "/usr/sbin/quotaoff" ] && /usr/sbin/quotaoff -aug
- /sbin/fixfiles $FORCE restore > /dev/null 2>&1
- fi
- rm -f /.autorelabel
- /usr/lib/dracut/dracut-initramfs-restore
- systemctl --force reboot
-}
-
-# Check to see if a full relabel is needed
-if [ "$READONLY" != "yes" ]; then
- restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1
- relabel_selinux
-fi
diff --git a/systemd/system/fedora-autorelabel-mark.service b/systemd/system/fedora-autorelabel-mark.service
deleted file mode 100644
index 33b5147b..00000000
--- a/systemd/system/fedora-autorelabel-mark.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Mark the need to relabel after reboot
-DefaultDependencies=no
-Requires=local-fs.target
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target
-ConditionSecurity=!selinux
-ConditionPathIsDirectory=/etc/selinux
-ConditionPathExists=!/.autorelabel
-
-[Service]
-ExecStart=-/bin/touch /.autorelabel
-Type=oneshot
-RemainAfterExit=yes
diff --git a/systemd/system/fedora-autorelabel.service b/systemd/system/fedora-autorelabel.service
deleted file mode 100644
index c98a40ff..00000000
--- a/systemd/system/fedora-autorelabel.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Relabel all filesystems, if necessary
-DefaultDependencies=no
-Requires=local-fs.target
-Conflicts=shutdown.target
-After=local-fs.target
-Before=sysinit.target shutdown.target
-ConditionSecurity=selinux
-ConditionKernelCommandLine=|autorelabel
-ConditionPathExists=|/.autorelabel
-
-[Service]
-ExecStart=/lib/systemd/fedora-autorelabel
-Type=oneshot
-TimeoutSec=0
-RemainAfterExit=yes
-StandardInput=tty