Fini la conversion du stage3 (nouveau format répertoire pkg)
[hvlinux.git] / stage3 / pkg / openssh
index 2e36ee0..726639d 100644 (file)
@@ -1,49 +1,34 @@
-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-install -v -m700 -d /var/lib/sshd
-chown -v root:sys /var/lib/sshd
-
-groupadd -f sshd
-hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
-    --prefix=/usr \
-    --sysconfdir=/etc/ssh \
-    --datadir=/usr/share/sshd \
-    --with-pam \
-    --libexecdir=/usr/lib/openssh \
-    --with-md5-passwords \
-    --with-privsep-path=/var/lib/sshd
-make -j ${MAKEJOBS}
-make -j ${MAKEJOBS} install
-
-cd ${LFS_TMP}/${1}
-install -v -m755 -d /usr/share/doc/${1}
-install -v -m644 INSTALL LICENCE OVERVIEW README* WARNING.RNG \
-    /usr/share/doc/${1}
-
-# Disabling root logins
-sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config
-
-# Enabling X11 forwarding
-sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config
-
-# Setting MaxAuthTries to 2
-sed -i -e "s!^[#]*MaxAuthTries.*!MaxAuthTries 3!g" /etc/ssh/sshd_config
-
-install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d
-bootscript_add_rc3 sshd 25 70
-
-exit $?
+#!/bin/bash
+
+hvconfig_pre()
+{
+    install -v -m700 -d /var/lib/sshd
+    chown -v root:sys /var/lib/sshd
+
+    groupadd -f sshd
+    hv_useradd -c sshd-privsep -d /var/lib/sshd -g sshd -s /bin/false sshd
+
+    CONFIGURE_OPTS="\
+        ${CONFIGURE_OPTS} \
+        --sysconfdir=/etc/ssh \
+        --datadir=/usr/share/sshd \
+        --with-pam \
+        --libexecdir=/usr/lib/openssh \
+        --with-md5-passwords \
+        --with-privsep-path=/var/lib/sshd"
+}
+
+hvbuild_post()
+{
+    # Disabling root logins
+    sed -i -e "s!^#PermitRootLogin.*!PermitRootLogin no!g" /etc/ssh/sshd_config
+
+    # Enabling X11 forwarding
+    sed -i -e "s!^#X11Forwarding.*!X11Forwarding yes!g" /etc/ssh/sshd_config
+
+    # Setting MaxAuthTries to 2
+    sed -i -e "s!^[#]*MaxAuthTries.*!MaxAuthTries 3!g" /etc/ssh/sshd_config
+
+    install -v -m740 ${SCRDIR}/bootscripts/sshd /etc/rc.d/init.d
+    bootscript_add_rc3 sshd 25 70
+}