void-packages/templates/initscripts/files/rc.d/persistent_rules

32 lines
847 B
Plaintext
Raw Normal View History

#!/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"