Browse code

Remove ntp from azure and ami

Anish Swaminathan authored on 2015/08/19 10:36:10
Showing 8 changed files
... ...
@@ -1,3 +1,3 @@
1 1
 {
2
-    "packages":["sudo", "tar", "ntp"]
2
+    "packages":["sudo", "tar"]
3 3
 }
... ...
@@ -1,3 +1,3 @@
1 1
 {
2
-    "packages":["sudo", "python-pyasn1", "WALinuxAgent", "ntp"]
2
+    "packages":["sudo", "python-pyasn1", "WALinuxAgent"]
3 3
 }
... ...
@@ -1,3 +1,3 @@
1 1
 {
2
-    "packages":["sudo", "tar", "which", "google-daemon", "google-startup-scripts", "kubernetes", "ntp"]
2
+    "packages":["sudo", "tar", "which", "google-daemon", "google-startup-scripts", "kubernetes", "perl", "ntp"]
3 3
 }
... ...
@@ -3,8 +3,6 @@
3 3
 
4 4
 cd /lib/systemd/system/multi-user.target.wants/
5 5
 
6
-ln -s ../ntpd.service ntpd.service
7
-# ln -s ../etcd.service etcd.service
8 6
 ln -s ../docker.service docker.service
9 7
 ln -s ../eth0.service eth0.service
10 8
 
... ...
@@ -68,8 +66,6 @@ echo "Tunnel no" >> /etc/ssh/ssh_config
68 68
 echo "ServerAliveInterval 420" >> /etc/ssh/ssh_config
69 69
 
70 70
 sed -i '/.*linux.*vmlinuz/ s/$/ console=ttyS0/' /boot/grub/grub.cfg
71
-# Disable root login
72
-#usermod -L root
73 71
 
74 72
 # Disable loading/unloading of modules
75 73
 echo 1 > /proc/sys/kernel/modules_disabled
... ...
@@ -5,8 +5,6 @@ cd /lib/systemd/system/multi-user.target.wants/
5 5
 
6 6
 # Create links in multi-user.target to auto-start these scripts and services.
7 7
 
8
-ln -s ../ntpd.service ntpd.service
9
-# ln -s ../etcd.service etcd.service
10 8
 ln -s ../docker.service docker.service
11 9
 ln -s ../eth0.service eth0.service
12 10
 ln -s ../waagent.service waagent.service
... ...
@@ -57,8 +55,6 @@ echo "ServerAliveInterval 180" >> /etc/ssh/ssh_config
57 57
 
58 58
 sed -i '/.*linux.*vmlinuz/ s/$/ console=ttyS0 earlyprintk=ttyS0 rootdelay=30/' /boot/grub/grub.cfg
59 59
 
60
-# Disable root login
61
-#usermod -L root
62 60
 
63 61
 # Disable loading/unloading of modules
64 62
 echo 1 > /proc/sys/kernel/modules_disabled
... ...
@@ -89,10 +89,12 @@ if [ $IMG_NAME != "ova" ]
89 89
     mount -o bind /dev $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/dev
90 90
     mount -o bind /dev/pts $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/dev/pts
91 91
     mount -o bind /sys $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/sys
92
-
92
+    if [ $IMG_NAME = "gce" ]
93
+      then
94
+        cp ntpd.service $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
95
+    fi
93 96
     cp ntpd.service $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
94 97
     cp eth0.service $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
95
-    #cp etcd.service $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
96 98
     cp -f docker.service $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
97 99
     cp -f docker.socket $PHOTON_IMG_OUTPUT_PATH/photon-${IMG_NAME}/lib/systemd/system/
98 100
     if [ -e $IMG_NAME/cloud-photon.cfg ]
... ...
@@ -1,9 +1,6 @@
1 1
 #!/bin/bash
2 2
 set -x
3 3
 
4
-cp -f /usr/lib/systemd/system/google* /lib/systemd/system/
5
-cp -f /usr/lib/systemd/system/kub* /lib/systemd/system/
6
-
7 4
 cd /lib/systemd/system/multi-user.target.wants/
8 5
 
9 6
 # Create links in multi-user.target to auto-start these scripts and services.
... ...
@@ -11,7 +8,6 @@ for i in ../google*; do  ln -s $i `basename $i`; done
11 11
 # for i in ../kube*; do  ln -s $i `basename $i`; done
12 12
 
13 13
 ln -s ../ntpd.service ntpd.service
14
-# ln -s ../etcd.service etcd.service
15 14
 ln -s ../docker.service docker.service
16 15
 ln -s ../eth0.service eth0.service
17 16
 
... ...
@@ -5,7 +5,7 @@ After=network.target nss-lookup.target
5 5
 [Service]
6 6
 Type=forking
7 7
 PrivateTmp=true
8
-ExecStart=/usr/sbin/ntpd -g -u ntp:ntp
8
+ExecStart=/usr/bin/ntpd -g -u ntp:ntp
9 9
 Restart=always
10 10
 
11 11
 [Install]