#!/bin/sh # # lkcl 2004aug08 # # restore contexts on anything in /dev which has the default device_t # file context. # # some things are meant to have device_t: hey, we set them too, makes # no odds. # # we pass all of the devs to restorecon on one line because restorecon # caches the lookups of the filecontexts: doing a restorecon one at a # time takes 1/4 sec per device/dir/symlink... devs='' #for x in `ls -altrZ /dev/ | grep -v initctl | grep device_t | grep -v "_device_t" | cut -c64-`; do for x in `ls -altrZ /dev/ | grep device_t | grep -v "_device_t" | cut -c64-`; do echo $x devs="$devs /dev/$x" done; echo $devs /sbin/restorecon $devs