File tree 5 files changed +51
-2
lines changed
dockers/docker-platform-monitor/base_image_files
5 files changed +51
-2
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ DOCKER_EXEC_FLAGS=" i"
4
+
5
+ # Determine whether stdout is on a terminal
6
+ if [ -t 1 ] ; then
7
+ DOCKER_EXEC_FLAGS+=" t"
8
+ fi
9
+
10
+ docker exec -$DOCKER_EXEC_FLAGS pmon smartctl " $@ "
Original file line number Diff line number Diff line change 2
2
3
3
DOCKER_PLATFORM_MONITOR = docker-platform-monitor.gz
4
4
$(DOCKER_PLATFORM_MONITOR)_PATH = $(DOCKERS_PATH ) /docker-platform-monitor
5
- $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS ) $(LM_SENSORS ) $(FANCONTROL ) $(SENSORD ) $(LIBSWSSCOMMON ) $(PYTHON_SWSSCOMMON )
5
+ $(DOCKER_PLATFORM_MONITOR)_DEPENDS += $(LIBSENSORS ) $(LM_SENSORS ) $(FANCONTROL ) $(SENSORD ) $(LIBSWSSCOMMON ) $(PYTHON_SWSSCOMMON ) $( SMARTMONTOOLS )
6
6
$(DOCKER_PLATFORM_MONITOR)_PYTHON_DEBS += $(SONIC_LEDD ) $(SONIC_XCVRD ) $(SONIC_PSUD )
7
7
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SONIC_PLATFORM_COMMON_PY2 )
8
8
$(DOCKER_PLATFORM_MONITOR)_PYTHON_WHEELS += $(SWSSSDK_PY2 )
@@ -22,3 +22,4 @@ $(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
22
22
$(DOCKER_PLATFORM_MONITOR)_aboot_RUN_OPT += -v /usr/lib/python2.7/dist-packages/arista:/usr/lib/python2.7/dist-packages/arista:ro
23
23
24
24
$(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += sensors:/usr/bin/sensors
25
+ $(DOCKER_PLATFORM_MONITOR)_BASE_IMAGE_FILES += smartctl:/usr/sbin/smartctl
Original file line number Diff line number Diff line change
1
+ # smartmontools package
2
+ #
3
+
4
+ SMARTMONTOOLS_VERSION_MAJOR = 6.6
5
+ SMARTMONTOOLS_VERSION_FULL = $(SMARTMONTOOLS_VERSION_MAJOR ) -1
6
+
7
+ export SMARTMONTOOLS_VERSION_MAJOR SMARTMONTOOLS_VERSION_FULL
8
+
9
+ SMARTMONTOOLS = smartmontools_$(SMARTMONTOOLS_VERSION_FULL ) _amd64.deb
10
+ $(SMARTMONTOOLS)_SRC_PATH = $(SRC_PATH ) /smartmontools
11
+
12
+ SONIC_STRETCH_DEBS += $(SMARTMONTOOLS )
13
+ SONIC_MAKE_DEBS += $(SMARTMONTOOLS )
Original file line number Diff line number Diff line change @@ -218,7 +218,13 @@ RUN apt-get update && apt-get install -y \
218
218
# For lm-sensors
219
219
librrd8 \
220
220
librrd-dev \
221
- rrdtool
221
+ rrdtool \
222
+ # For smartmontools 6.6-1
223
+ automake1.11 \
224
+ libselinux1-dev
225
+
226
+ # For smartmontools 6.6-1
227
+ RUN apt-get -t stretch-backports install -y debhelper
222
228
223
229
# For linux build
224
230
RUN apt-get -y build-dep linux
Original file line number Diff line number Diff line change
1
+ SHELL = /bin/bash
2
+ .ONESHELL :
3
+ .SHELLFLAGS += -e
4
+
5
+
6
+ MAIN_TARGET = smartmontools_$(SMARTMONTOOLS_VERSION_FULL ) _amd64.deb
7
+
8
+ $(addprefix $(DEST ) /, $(MAIN_TARGET ) ) : $(DEST ) /% :
9
+ rm -rf smartmontools-$(SMARTMONTOOLS_VERSION_MAJOR )
10
+ wget -O smartmontools_$(SMARTMONTOOLS_VERSION_MAJOR ) .orig.tar.gz -N " https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_$( SMARTMONTOOLS_VERSION_MAJOR) .orig.tar.gz?sv=2015-04-05&sr=b&sig=JZx4qiLuO36T0rsGqk4V2RDuWjRw6NztsLK7vlBYAkg%3D&se=2046-08-20T23%3A47%3A13Z&sp=r"
11
+ wget -O smartmontools_$(SMARTMONTOOLS_VERSION_FULL ) .dsc -N " https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_$( SMARTMONTOOLS_VERSION_FULL) .dsc?sv=2015-04-05&sr=b&sig=IS7FKUN%2Bvq0T55f4X2hGAViB70Y%2FgzjGgvzpUJLyUfA%3D&se=2046-08-20T23%3A46%3A57Z&sp=r"
12
+ wget -O smartmontools_$(SMARTMONTOOLS_VERSION_FULL ) .debian.tar.xz -N " https://sonicstorage.blob.core.windows.net/packages/debian/smartmontools_$( SMARTMONTOOLS_VERSION_FULL) .debian.tar.xz?sv=2015-04-05&sr=b&sig=H0RFeC41MCvhTQCln85DuPLn5v2goozwz%2FB9sA9p5eQ%3D&se=2046-08-20T23%3A46%3A02Z&sp=r"
13
+ dpkg-source -x smartmontools_$(SMARTMONTOOLS_VERSION_FULL ) .dsc
14
+
15
+ pushd smartmontools-$(SMARTMONTOOLS_VERSION_MAJOR)
16
+ dpkg-buildpackage -us -uc -b -j$(SONIC_CONFIG_MAKE_JOBS)
17
+ popd
18
+
19
+ mv $* $(DEST)/
You can’t perform that action at this time.
0 commit comments