summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-05-15 18:34:02 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-30 12:04:40 +0100
commit6b20156b0c6f5f47388ce5f5fd130fa15bf4e0c2 (patch)
tree78c42af47aeb98a2f52eff93d0d3186377995d77 /meta/recipes-connectivity/openssh
parentaf3fc709c44456385ac340e44c226cfac4733e27 (diff)
downloadpoky-6b20156b0c6f5f47388ce5f5fd130fa15bf4e0c2.tar.gz
openssh: use new update-alternatives
(From OE-Core rev: b417ced0573acde896332827bcc13b0f7c5bd9fe) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssh')
-rw-r--r--meta/recipes-connectivity/openssh/openssh_6.0p1.bb31
1 files changed, 11 insertions, 20 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_6.0p1.bb b/meta/recipes-connectivity/openssh/openssh_6.0p1.bb
index dba08a19ae..04fd6a9c69 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.0p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.0p1.bb
@@ -7,7 +7,7 @@ SECTION = "console/network"
7LICENSE = "BSD" 7LICENSE = "BSD"
8LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507" 8LIC_FILES_CHKSUM = "file://LICENCE;md5=e326045657e842541d3f35aada442507"
9 9
10PR = "r0" 10PR = "r1"
11 11
12DEPENDS = "zlib openssl" 12DEPENDS = "zlib openssl"
13DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" 13DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
@@ -29,7 +29,7 @@ PAM_SRC_URI = "file://sshd"
29SRC_URI[md5sum] = "3c9347aa67862881c5da3f3b1c08da7b" 29SRC_URI[md5sum] = "3c9347aa67862881c5da3f3b1c08da7b"
30SRC_URI[sha256sum] = "589d48e952d6c017e667873486b5df63222f9133d417d0002bd6429d9bd882de" 30SRC_URI[sha256sum] = "589d48e952d6c017e667873486b5df63222f9133d417d0002bd6429d9bd882de"
31 31
32inherit useradd update-rc.d 32inherit useradd update-rc.d update-alternatives
33 33
34USERADD_PACKAGES = "${PN}-sshd" 34USERADD_PACKAGES = "${PN}-sshd"
35USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" 35USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd"
@@ -77,8 +77,6 @@ do_install_append () {
77 done 77 done
78 install -d ${D}${sysconfdir}/init.d 78 install -d ${D}${sysconfdir}/init.d
79 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd 79 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
80 mv ${D}${bindir}/scp ${D}${bindir}/scp.${PN}
81 mv ${D}${bindir}/ssh ${D}${bindir}/ssh.${PN}
82 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin 80 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
83 rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var 81 rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
84} 82}
@@ -86,8 +84,8 @@ do_install_append () {
86ALLOW_EMPTY_${PN} = "1" 84ALLOW_EMPTY_${PN} = "1"
87 85
88PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" 86PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
89FILES_${PN}-scp = "${bindir}/scp.${PN}" 87FILES_${PN}-scp = "${bindir}/scp.${BPN}"
90FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" 88FILES_${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
91FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" 89FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd"
92FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" 90FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config"
93FILES_${PN}-sftp = "${bindir}/sftp" 91FILES_${PN}-sftp = "${bindir}/sftp"
@@ -99,21 +97,14 @@ RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
99DEPENDS_${PN}-sshd += "update-rc.d" 97DEPENDS_${PN}-sshd += "update-rc.d"
100RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen" 98RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen"
101 99
102pkg_postinst_${PN}-scp () { 100CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
103 update-alternatives --install ${bindir}/scp scp scp.${PN} 90 101CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"
104}
105 102
106pkg_postinst_${PN}-ssh () { 103ALTERNATIVE_PRIORITY = "90"
107 update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
108}
109 104
110pkg_postrm_${PN}-ssh () { 105ALTERNATIVE_${PN}-scp = "scp"
111 update-alternatives --remove ${bindir}/ssh ssh.${PN} 106ALTERNATIVE_LINK_NAME[scp] = "${bindir}/scp"
112}
113 107
114pkg_postrm_${PN}-scp () { 108ALTERNATIVE_${PN}-ssh = "ssh"
115 update-alternatives --remove ${bindir}/scp scp.${PN} 109ALTERNATIVE_LINK_NAME[ssh] = "${bindir}/ssh"
116}
117 110
118CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
119CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"