Make sshd service and cleans up some files.
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 14 Mar 2013 12:19:42 +0000 (21:19 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 15 Mar 2013 04:54:24 +0000 (13:54 +0900)
Change-Id: Iccd88acd06f1be14d7295a90d8db83f7d4d58eea

filesystem/etc/rc.d/rc.emul
filesystem/usr/lib/systemd/system/sshd.service [new file with mode: 0644]
packaging/system-plugin-emulator.spec

index 4e0849c..9a56f92 100755 (executable)
@@ -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 (file)
index 0000000..09da55f
--- /dev/null
@@ -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
+
index 5c8e50c..693287b 100644 (file)
@@ -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