Changeset View
Standalone View
sysutils/google-compute-engine-oslogin/pkg-deinstall
- This file was added.
#!/bin/sh | |||||
if [ "$2" = "DEINSTALL" ]; then | |||||
if [ -x ${PKG_PREFIX}/bin/google_oslogin_control ]; then | |||||
ultima: This should probably be "PRE-DEINSTALL". | |||||
Not Done Inline ActionsAccording to this doc https://www.freebsd.org/doc/en/books/porters-handbook/pkg-deinstall.html helen.koike_collabora.com: According to this doc https://www.freebsd.org/doc/en/books/porters-handbook/pkg-deinstall.html… | |||||
${PKG_PREFIX}/bin/google_oslogin_control status | |||||
if [ $? -eq 0 ]; then | |||||
${PKG_PREFIX}/bin/google_oslogin_control deactivate 2>/dev/null | |||||
fi | |||||
else | |||||
echo "Could not find google_oslogin_control. Please run it manually to deactivate" | |||||
fi | |||||
fi | |||||
matUnsubmitted Done Inline ActionsWhat is, exactly, the purpose of this? Ports MUST NOT, by themselves, start, stop, restart, whatever, when being installed/deinstalled/upgraded. mat: What is, exactly, the purpose of this?
Ports MUST NOT, by themselves, start, stop, restart… | |||||
helen.koike_collabora.comAuthorUnsubmitted Done Inline ActionsIt is just because when the user forget to deactivate it before deinstalling it, the user cannot ssh to the machine anymore because the pam module is not removed from /etc/pam.d/sshd and it keeps trying to load a module that doesn't exist anymore helen.koike_collabora.com: It is just because when the user forget to deactivate it before deinstalling it, the user… | |||||
matUnsubmitted Done Inline ActionsThe reason for doing it does not matter at all. Ports MUST NOT start/stop themselves. It is the job of the package manager to do the stopping and starting, which it does, if you enable it by setting HANDLE_RC_SCRIPTS to true in its configuration, or on the command line. With it disabled: # pkg -o HANDLE_RC_SCRIPTS=false delete bind912 Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: bind912-9.12.0.rc1_2 Number of packages to be removed: 1 The operation will free 56 MiB. Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling bind912-9.12.0.rc1_2... You may need to manually remove /usr/local/etc/mtree/BIND.chroot.local.dist if it is no longer needed. You may need to manually remove /usr/local/etc/namedb/named.conf if it is no longer needed. [1/1] Deleting files for bind912-9.12.0.rc1_2: 100% With it enabled: # pkg -o HANDLE_RC_SCRIPTS=true delete bind912 Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 1 packages (of 0 packages in the universe): Installed packages to be REMOVED: bind912-9.12.0.rc1_2 Number of packages to be removed: 1 The operation will free 56 MiB. Proceed with deinstalling packages? [y/N]: y [1/1] Deinstalling bind912-9.12.0.rc1_2... Stopping named. Waiting for PIDS: 53385. You may need to manually remove /usr/local/etc/mtree/BIND.chroot.local.dist if it is no longer needed. You may need to manually remove /usr/local/etc/namedb/named.conf if it is no longer needed. mat: The reason for doing it does not matter at all. Ports MUST NOT start/stop themselves.
It is… | |||||
helen.koike_collabora.comAuthorUnsubmitted Not Done Inline Actionsok, we live and learn :) helen.koike_collabora.com: ok, we live and learn :) |
This should probably be "PRE-DEINSTALL".