Make sure sources.list has correct permissions.
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 8 Dec 2015 13:32:29 +0000 (14:32 +0100)
committerValentin Vidic <Valentin.Vidic@CARNet.hr>
Tue, 8 Dec 2015 13:32:29 +0000 (14:32 +0100)
src/functions.sh

index 34b9022..4c98608 100644 (file)
@@ -530,16 +530,18 @@ create_sources_list () {
 
         # backup old version
         if [ -f $sl -a ! -f $sl.$backup_ext ]; then
-            cp -av $sl $sl.$backup_ext
+            cp -v $sl $sl.$backup_ext
         fi
 
         # install new version
-        cp -av $sl_new $sl
+        cp -v $sl_new $sl
         notice "Novi sadrzaj datoteke /etc/apt/sources.list:
 
 `cat /etc/apt/sources.list`"
     fi
 
+    # make sure permissions are correct
+    chmod 0644 $sl
     rm $sl_new
 }