From: SeokYeon Hwang Date: Thu, 14 Mar 2013 12:19:42 +0000 (+0900) Subject: Make sshd service and cleans up some files. X-Git-Tag: submit/tizen_common/20140529.181337~11^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc04e1422b83ba0d19c04d35bcbc1e50198dd3f0;p=platform%2Fadaptation%2Femulator%2Fsystem-plugin-emulator.git Make sshd service and cleans up some files. Change-Id: Iccd88acd06f1be14d7295a90d8db83f7d4d58eea --- diff --git a/filesystem/etc/rc.d/rc.emul b/filesystem/etc/rc.d/rc.emul index 4e0849c..9a56f92 100755 --- a/filesystem/etc/rc.d/rc.emul +++ b/filesystem/etc/rc.d/rc.emul @@ -8,9 +8,6 @@ C_='\033[0m' #Color off echo -e "[${_G}rc.emul : script start ${C_}]" -echo -e "[${_G}sshd start ${C_}]" -/etc/init.d/ssh start - echo -e "[${_G}chmod +x /opt/media for various apps ${C_}]" chmod -R 777 /opt/media diff --git a/filesystem/usr/lib/systemd/system/sshd.service b/filesystem/usr/lib/systemd/system/sshd.service new file mode 100644 index 0000000..09da55f --- /dev/null +++ b/filesystem/usr/lib/systemd/system/sshd.service @@ -0,0 +1,13 @@ +[Unit] +Description=OpenSSH Daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/sshd -D +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=always + +[Install] +WantedBy=multi-user.target + diff --git a/packaging/system-plugin-emulator.spec b/packaging/system-plugin-emulator.spec index 5c8e50c..693287b 100644 --- a/packaging/system-plugin-emulator.spec +++ b/packaging/system-plugin-emulator.spec @@ -25,13 +25,18 @@ System plugin files for emulator find . -name .gitignore -exec rm -f {} \; cp -arf filesystem/* %{buildroot} +# for legacy init +ln -s /etc/init.d/ssh %{buildroot}/etc/rc.d/rc3.d/S50ssh + +# for systemd mkdir -p %{buildroot}/usr/lib/systemd/system/basic.target.wants mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants -ln -s ../sdbd.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/sdbd.service -ln -s ../emul-opengl-mode.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-opengl-mode.service -ln -s ../emul-opengl-yagl.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-opengl-yagl.service -ln -s ../emul-alsa.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-alsa.service -ln -s ../emul-legacy-start.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-legacy-start.service +ln -s /usr/lib/systemd/system/sdbd.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/sdbd.service +ln -s /usr/lib/systemd/system/emul-opengl-mode.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-opengl-mode.service +ln -s /usr/lib/systemd/system/emul-opengl-yagl.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-opengl-yagl.service +ln -s /usr/lib/systemd/system/emul-alsa.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-alsa.service +ln -s /usr/lib/systemd/system/emul-legacy-start.service %{buildroot}/usr/lib/systemd/system/basic.target.wants/emul-legacy-start.service +ln -s /usr/lib/systemd/system/sshd.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/sshd.service %post mkdir -p /opt/usr @@ -102,6 +107,7 @@ touch /dev/rtc1 /etc/rc.d/rc3.d/S01simulator-alsa /etc/rc.d/rc3.d/S20vmodem /etc/rc.d/rc3.d/S45vconf-menuscreen +/etc/rc.d/rc3.d/S50ssh /etc/rc.d/rc3.d/S96set_valperiod /etc/rc.d/rc5.d/S99zzzbackup_csa /etc/sshd_config @@ -113,14 +119,16 @@ touch /dev/rtc1 /usr/bin/mount_slp.sh /usr/bin/save_blenv /usr/bin/wlan.sh -/usr/lib/systemd/system/basic.target.wants/emul-alsa.service -/usr/lib/systemd/system/basic.target.wants/emul-legacy-start.service -/usr/lib/systemd/system/basic.target.wants/emul-opengl-mode.service -/usr/lib/systemd/system/basic.target.wants/emul-opengl-yagl.service -/usr/lib/systemd/system/basic.target.wants/sdbd.service /usr/lib/systemd/system/emul-alsa.service /usr/lib/systemd/system/emul-legacy-start.service /usr/lib/systemd/system/emul-opengl-mode.service /usr/lib/systemd/system/emul-opengl-yagl.service /usr/lib/systemd/system/sdbd.service +/usr/lib/systemd/system/basic.target.wants/emul-alsa.service +/usr/lib/systemd/system/basic.target.wants/emul-legacy-start.service +/usr/lib/systemd/system/basic.target.wants/emul-opengl-mode.service +/usr/lib/systemd/system/basic.target.wants/emul-opengl-yagl.service +/usr/lib/systemd/system/basic.target.wants/sdbd.service +/usr/lib/systemd/system/sshd.service +/usr/lib/systemd/system/multi-user.target.wants/sshd.service /usr/lib/udev/rules.d/95-tizen-emulator.rules