scripts: make sure conffiles are sorted
[openwrt/staging/hauke.git] / scripts / ipkg-build
index c112270a2bc6b2b18eeca9f7659db7b218a2b946..32bc4b6d503b6beb40d122ad2da037d3a68397d3 100755 (executable)
@@ -58,7 +58,8 @@ pkg_appears_sane() {
 
                rm "$CONTROL"/conffiles
                if [ -f "$CONTROL"/conffiles.resolved ]; then
-                       mv "$CONTROL"/conffiles.resolved "$CONTROL"/conffiles
+                       sort -o "$CONTROL"/conffiles "$CONTROL"/conffiles.resolved
+                       rm "$CONTROL"/conffiles.resolved
                        chmod 0644 "$CONTROL"/conffiles
                fi
        fi