summaryrefslogtreecommitdiffstats
path: root/update-conf
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2007-02-16 13:16:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2007-02-16 13:16:32 +0000
commit3e8dc3717f14c72885c1b88a9c2fb0e2dd7dde51 (patch)
tree04123d986c7f4e9385a804863dbc41072cc208ba /update-conf
parentcfa5f10a4a1bac5ae573833051dddc3bcad168bf (diff)
downloadalpine-conf-3e8dc3717f14c72885c1b88a9c2fb0e2dd7dde51.tar.bz2
alpine-conf-3e8dc3717f14c72885c1b88a9c2fb0e2dd7dde51.tar.xz
0.8 beta. added setup-cryptswap and initial setup-ads
Diffstat (limited to 'update-conf')
-rw-r--r--update-conf20
1 files changed, 17 insertions, 3 deletions
diff --git a/update-conf b/update-conf
index c13d8cb..1e88e72 100644
--- a/update-conf
+++ b/update-conf
@@ -11,10 +11,11 @@ LBUCACHE="$TMPD/lbucache"
usage() {
echo "$PROGRAM $VERSION
-Usage: $PROGAM [-ahl]
+Usage: $PROGAM [-aihl]
-a Select all updated files.
-h Show this help.
+ -i Use all new init.d scripts.
-l List updated files.
"
}
@@ -25,9 +26,15 @@ is_modified() {
test -n "`( echo \"$1\" ; cat \"$LBUCACHE\" ) | sort | uniq -d`"
}
-while getopts "alh" opt ; do
+
+is_initd() {
+ echo "$1" | grep etc/init.d/ > /dev/null
+}
+
+while getopts "alih" opt ; do
case "$opt" in
a) aflag="-a" ;;
+ i) iflag="-i" ;;
l) lflag="-l" ;;
h|*) usage;;
esac
@@ -47,7 +54,14 @@ find "$ROOT/etc" -name '*.apk-new' | while read apknew ; do
fi
elif [ "$aflag" ] || is_modified "$f" ; then
-
+ if [ "$iflag" ] && is_initd "$f" ; then
+ echo "Autoupdating $p"
+ mv "$apknew" "$p"
+ continue
+ fi
+
+ diff -u "$p" "$apknew"
+
# ask user what to do with the file
while [ -z "$choice" ] ; do
echo "New $p available:"