source: casper-and-ubiquity-hooks/trunk/fuentes/ubiquity-customize-openssh/usr/lib/ubiquity/target-config/90customopenssh @ 791

Last change on this file since 791 was 791, checked in by kbut, 3 years ago

add hooks

  • Property svn:executable set to *
File size: 740 bytes
Line 
1#!/bin/sh
2
3# First do source of debconf
4. /usr/share/debconf/confmodule
5
6
7# Only in casper mode
8rc=0
9cat /proc/cmdline | grep -q "casper" ||rc=1
10if [ ${rc} -eq 0 ]; then
11
12
13        # Second. Try to solve with traditional mechanism
14        # of casper-reconfigure technology
15        casper-reconfigure /target openssh-server
16
17        # If nothing works...is time of N4D.
18
19        cat > /target/etc/n4d/one-shot/os.openssh-server.sh << EOF
20#!/bin/sh
21#
22# ONE-SHOT Mechanism
23# for openssh-server
24#
25# Powered by N4D
26#
27
28# If openssh-server is installed
29# must have a dpkg-reconfigure
30# action.
31
32dpkg-reconfigure openssh-server
33
34exit 0
35
36EOF
37
38        # Now is the time of permissions
39        chmod +x /target/etc/n4d/one-shot/os.openssh-server.sh
40else
41        echo "Disabled (not in casper)"
42fi
43
44exit 0
Note: See TracBrowser for help on using the repository browser.