diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-07-24 08:01:31 +0000 |
commit | b70981b68efcce5256eb11c6cd26ae123b10b6ea (patch) | |
tree | a38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/udev/move_tmp_persistent_rules.sh | |
parent | 2b4df81538b8398442d5296650905c70341dd8d3 (diff) | |
download | aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2 aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz |
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/udev/move_tmp_persistent_rules.sh')
-rwxr-xr-x | main/udev/move_tmp_persistent_rules.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/main/udev/move_tmp_persistent_rules.sh b/main/udev/move_tmp_persistent_rules.sh new file mode 100755 index 0000000000..1a0259798b --- /dev/null +++ b/main/udev/move_tmp_persistent_rules.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +. /etc/init.d/functions.sh + +# store persistent-rules that got created while booting +# when / was still read-only +store_persistent_rules() { + local file dest + + for file in /dev/.udev/tmp-rules--*; do + dest=${file##*tmp-rules--} + [ "$dest" = '*' ] && break + type=${dest##70-persistent-} + type=${type%%.rules} + ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d" + cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file" + eend $? "Failed moving persistent rules!" + done +} + +store_persistent_rules + +# vim:ts=4 |