]> piware.de Git - bin.git/commitdiff
postinst-setup-fedora updates
authorMartin Pitt <martin@piware.de>
Sun, 4 Jun 2017 13:44:59 +0000 (15:44 +0200)
committerMartin Pitt <martin@piware.de>
Sun, 4 Jun 2017 13:44:59 +0000 (15:44 +0200)
postinst-setup-fedora

index 577d03afb7b78db811bad05b0d64fadb8be16fdc..5e6a0be5f3d7c7fc1fb63d78f24f728f78b587aa 100755 (executable)
@@ -28,26 +28,33 @@ dnf install -y iwl6000g2a-firmware NetworkManager-wifi \
 dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
 dnf install -y gstreamer1-{libav,plugins-{ugly,bad-free}} --setopt=strict=0
 
 dnf install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
 dnf install -y gstreamer1-{libav,plugins-{ugly,bad-free}} --setopt=strict=0
 
-# TODO: restore /etc git
+# restore /etc git branch
+if [ ! -d /etc/.git ]; then
+    [ -e /backup-etc ] || git clone git+ssh://martin@piware.de/home/martin/backup/`hostname`-etc-fedora/ /backup-etc
+    cp -av /backup-etc/* /etc/
+    cp -av /backup-etc/.git/ /etc/
+    rm -rf /backup-etc
+fi
+
 
 # other setup
 
 # other setup
-grep -q /ubuntu /etc/fstab || cat << EOF >> /etc/fstab
+grep -q lib/mock /etc/fstab || cat << EOF >> /etc/fstab
 
 tmpfs /var/tmp tmpfs defaults 0 0
 tmpfs /var/lib/mock tmpfs defaults 0 0
 
 tmpfs /var/tmp tmpfs defaults 0 0
 tmpfs /var/lib/mock tmpfs defaults 0 0
-/proc /ubuntu/proc none bind 0 0
-/sys /ubuntu/sys none bind 0 0
-/dev /ubuntu/dev none rbind 0 0
-/home /ubuntu/home none rbind 0 0
-/srv /ubuntu/srv none bind 0 0
-/tmp /ubuntu/tmp none bind 0 0
+#/proc /ubuntu/proc none bind 0 0
+#/sys /ubuntu/sys none bind 0 0
+#/dev /ubuntu/dev none rbind 0 0
+#/home /ubuntu/home none rbind 0 0
+#/srv /ubuntu/srv none bind 0 0
+#/tmp /ubuntu/tmp none bind 0 0
 EOF
 
 EOF
 
-systemctl enable ubuntu-apt-cacher-ng
-
 # have schroot use tmpfs
 # have schroot use tmpfs
-rmdir /var/lib/schroot/unpack
-ln -s /tmp /var/lib/schroot/unpack
+if [ ! -L /var/lib/schroot/unpack ]; then
+    rmdir /var/lib/schroot/unpack
+    ln -s /tmp /var/lib/schroot/unpack
+fi
 
 # root's ssh stuff
 if [ ! -d /root/.ssh ] && [ -d /home/martin/.ssh ]; then
 
 # root's ssh stuff
 if [ ! -d /root/.ssh ] && [ -d /home/martin/.ssh ]; then