File tree 4 files changed +4
-383
lines changed
4 files changed +4
-383
lines changed Original file line number Diff line number Diff line change @@ -154,11 +154,6 @@ sudo cp $IMAGE_CONFIGS/hostname/hostname-config.service $FILESYSTEM_ROOT/etc/sy
154
154
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable hostname-config.service
155
155
sudo cp $IMAGE_CONFIGS /hostname/hostname-config.sh $FILESYSTEM_ROOT /usr/bin/
156
156
157
- # Copy serial-port-watchdog configuration scripts
158
- sudo cp $IMAGE_CONFIGS /serial-port-watchdog/serial-port-watchdog.service $FILESYSTEM_ROOT /etc/systemd/system/
159
- sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable serial-port-watchdog.service
160
- sudo cp $IMAGE_CONFIGS /serial-port-watchdog/serial-port-watchdog.py $FILESYSTEM_ROOT /usr/bin/
161
-
162
157
# Copy updategraph script and service file
163
158
sudo cp $IMAGE_CONFIGS /updategraph/updategraph.service $FILESYSTEM_ROOT /etc/systemd/system/
164
159
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl enable updategraph.service
Original file line number Diff line number Diff line change @@ -183,51 +183,15 @@ for x in "$@"; do
183
183
done
184
184
}
185
185
186
- setup_platform ()
187
- {
186
+ eval sonic_version=$( cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" " )
187
+
188
+ if [ -f /host/image-$sonic_version /platform/firsttime ]; then
189
+
188
190
if [ -n " $aboot_platform " ]; then
189
191
platform=$aboot_platform
190
192
elif [ -n " $onie_platform " ]; then
191
193
platform=$onie_platform
192
194
else
193
- platform=' '
194
- fi
195
- }
196
-
197
- # Setup default values in this function before reading installer.conf
198
- # installer.conf could override the value set in this function.
199
- setup_platform_defaults ()
200
- {
201
- # Default serial port: ttyS0
202
- CONSOLE_DEV=0
203
- }
204
-
205
- load_platform_installer_config ()
206
- {
207
- INSTALLER_CFG=/usr/share/sonic/device/$platform /installer.conf
208
- if [ -f $INSTALLER_CFG ]; then
209
- . $INSTALLER_CFG
210
- fi
211
- }
212
-
213
- program_serial_port ()
214
- {
215
- sed -i " s|ttyS.|ttyS$CONSOLE_DEV |g" /etc/systemd/system/serial-port-watchdog.service
216
- systemctl daemon-reload
217
- systemctl restart serial-port-watchdog.service
218
- }
219
-
220
- eval sonic_version=$( cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" " )
221
-
222
- setup_platform
223
- setup_platform_defaults
224
- load_platform_installer_config
225
-
226
- program_serial_port
227
-
228
- if [ -f /host/image-$sonic_version /platform/firsttime ]; then
229
-
230
- if [ -z " $platform " ]; then
231
195
echo " Unknown sonic platform"
232
196
firsttime_exit
233
197
fi
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments