void-packages/templates/initscripts/files/rc.d/persistent_rules
Juan RP a3190ec48c initscripts: misc changes, bump to 2009-03.
--HG--
extra : convert_revision : 97fb9127cb91659331f1574a19a8871fed30a0ab
2009-03-26 10:07:50 +01:00

31 lines
827 B
Bash
Executable file

#!/bin/sh
#
# PROVIDE: persistent_rules
# REQUIRE: SERVERS locale
# BEFORE: NETWORKING
$_rc_subr_loaded . /etc/rc.subr
name="persistent_rules"
start_cmd="persistent_start"
stop_cmd=":"
persistent_start()
{
# Adding persistent network/cdrom generated rules
if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
echo -n "Adding persistent cdrom udev rules... "
cat /dev/.udev/tmp-rules--70-persistent-cd.rules \
>> /etc/udev/rules.d/70-persistent-cd.rules
show_rval
fi
if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
echo -n "Adding persistent network udev rules... "
cat /dev/.udev/tmp-rules--70-persistent-net.rules \
>> /etc/udev/rules.d/70-persistent-net.rules
show_rval
fi
}
load_rc_config $name
run_rc_command "$1"