|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | 3 | # ---------------------------------------------------------------------------- # |
4 | | -# Copyright 2020, OpenNebula Project, OpenNebula Systems # |
| 4 | +# Copyright 2020-2021, OpenNebula Project, OpenNebula Systems # |
5 | 5 | # # |
6 | 6 | # Licensed under the Apache License, Version 2.0 (the "License"); you may # |
7 | 7 | # not use this file except in compliance with the License. You may obtain # |
|
33 | 33 |
|
34 | 34 | CMD=$(basename "$0") |
35 | 35 | CMDLINE="${0} ${*}" |
36 | | -VERSION='5.13.80' |
37 | 36 |
|
38 | 37 | # here are declared all sysprep operations - keep the following format: |
39 | 38 | # <operation>:<default>:<comment> |
@@ -80,6 +79,7 @@ udev-persistent-net :1: Remove udev persistent net rules |
80 | 79 | user-account :0: Remove the user accounts in the guest |
81 | 80 | utmp :1: Remove the utmp file |
82 | 81 | yum-uuid :1: Remove the yum UUID |
| 82 | +one-cleanup :1: Remove OpenNebula-owned working directories |
83 | 83 | one-shell-history :1: Remove the .history file |
84 | 84 | one-hostname :1: Remove hostname and fix hosts file |
85 | 85 | one-resolvconf :1: Remove nameservers |
@@ -1744,6 +1744,15 @@ op_yum_uuid() |
1744 | 1744 |
|
1745 | 1745 | # extra one operations |
1746 | 1746 |
|
| 1747 | +op_one_cleanup() |
| 1748 | +( |
| 1749 | + run_op() { echo "+ ${*}" ; "$@" ; } |
| 1750 | + |
| 1751 | + run_op rm -vrf \ |
| 1752 | + /var/lib/one-context/ \ |
| 1753 | + ; |
| 1754 | +) |
| 1755 | + |
1747 | 1756 | op_one_shell_history() |
1748 | 1757 | ( |
1749 | 1758 | run_op() { echo "+ ${*}" ; "$@" ; } |
|
2046 | 2055 | cat <<EOF |
2047 | 2056 | ___ _ __ ___ |
2048 | 2057 | / _ \ | '_ \ / _ \ OpenNebula System Preparation Tool |
2049 | | - | (_) || | | || __/ (c) 2002-2020, OpenNebula Project, OpenNebula Systems |
2050 | | - \___/ |_| |_| \___| Version ${VERSION} |
| 2058 | + | (_) || | | || __/ (c) 2002-2021, OpenNebula Project, OpenNebula Systems |
| 2059 | + \___/ |_| |_| \___| Version _PACKAGE_VERSION_ |
2051 | 2060 |
|
2052 | 2061 | EOF |
2053 | 2062 |
|
|
0 commit comments