aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-baselayout/alpine-baselayout.pre-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-16 09:06:27 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-16 10:21:06 +0000
commit03bf0af45bcde46319e4c81abf1eee440a573ace (patch)
treebe7626b800ad9470c7394412c84007d4e7bcaa6a /main/alpine-baselayout/alpine-baselayout.pre-upgrade
parent66ef745e031af5613e81dda39de1ffae141492a2 (diff)
downloadaports-03bf0af45bcde46319e4c81abf1eee440a573ace.tar.bz2
aports-03bf0af45bcde46319e4c81abf1eee440a573ace.tar.xz
main/alpine-baselayout: upgrade to 2.1.0 and fix modprobe.d
Newer versions of module-init-tools requires files in modprobe.d to have .conf extension. In order for upgraders to keep their module configs we need to rename our files in /etc/modprobe.d. We do so in a pre-upgrade script.
Diffstat (limited to 'main/alpine-baselayout/alpine-baselayout.pre-upgrade')
-rw-r--r--main/alpine-baselayout/alpine-baselayout.pre-upgrade15
1 files changed, 15 insertions, 0 deletions
diff --git a/main/alpine-baselayout/alpine-baselayout.pre-upgrade b/main/alpine-baselayout/alpine-baselayout.pre-upgrade
new file mode 100644
index 0000000000..7ba635eb99
--- /dev/null
+++ b/main/alpine-baselayout/alpine-baselayout.pre-upgrade
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# we need to have our modprobe.d files with .conf suffix
+for i in /etc/modprobe.d/*; do
+ # ignore files that does not exist (i.e if modprobe.d is empty)
+ [ -r "$i" ] || continue
+
+ # ignore files that has an extention
+ case "$i" in
+ *.*) continue;;
+ esac
+
+ # append extension
+ mv "$i" "$i".conf
+done