调整目录
This commit is contained in:
parent
0246225780
commit
0ef3aad23e
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,5 @@
|
|||
build:
|
||||
dpkg -b deepin-installer deepin-installer-dclc.deb
|
||||
|
||||
install:
|
||||
apt install ./deepin-installer-dclc.deb
|
|
@ -0,0 +1,30 @@
|
|||
# 介绍
|
||||
此是在 Deepin 官方 `Deepin Installer` 的基础上,根据 `Deepin Community Live CD Install 版` 的需求定制的安装程序
|
||||
适用系统:只适用于 Deepin 20.X,amd64
|
||||
|
||||
# 如何构建 deb 包
|
||||
```bash
|
||||
git clone https://gitee.com/gfdgd-xi/deepin-installer-for-dclc.git
|
||||
cd deepin-installer-for-dclc
|
||||
make build
|
||||
```
|
||||
# 关于 Deepin Community Live CD Install 版
|
||||
## 介绍
|
||||
这个镜像是接着 Deepin Community Live CD 系列的(Deepin Community Live CD 简称为 `DCLC`,Deepin Community Live CD 系统是什么?传送门:https://bbs.deepin.org/post/242933) ,自然此镜像会同时拥有原 Deepin Community Live CD 的功能和系统安装功能
|
||||
也为了简化安装后的操作,会预装一些软件以及一些配置等等
|
||||
***注意:这个和鸿玩并不一样,不会修改任何有关 deepin 的系统信息,包括但不限于系统版本、系统 logo 等等***
|
||||
***且并不是 deepin 的下游发行版,只是一个定制的镜像***
|
||||
***Live CD 模式下用户默认密码:123456,root 密码:123456,安装到本地的不受此影响***
|
||||

|
||||

|
||||

|
||||

|
||||
## 下载链接
|
||||
鹤川云盘:https://pan.hechuanyun.xyz/s/Weua
|
||||
123 云盘:https://www.123pan.com/s/pDSKVv-yRpWv
|
||||
迅雷云盘:https://pan.xunlei.com/s/VNF2FXAW-Ygci78DPS3b6bVxA1?pwd=5mgs 提取码:5mgs
|
||||

|
||||
百度网盘:链接: [https://pan.baidu.com/s/1n5J8M8iqfI-kMbmHfR-x9w](https://pan.baidu.com/s/1n5J8M8iqfI-kMbmHfR-x9w) 提取码: ejr7
|
||||

|
||||
备用1:http://gfdgdxi.msns.cn/DeepinCommunityLiveCD/1.6.0/
|
||||
备用2:http://gfdgdxi.free.idcfengye.com/DeepinCommunityLiveCD/1.6.0/
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
/etc/live/config.conf.d/deepin-installer.conf
|
|
@ -0,0 +1,14 @@
|
|||
Package: deepin-installer
|
||||
Source: deepin-installer-reborn
|
||||
Version: 5.7.47-1-gfdgdxi-6
|
||||
Architecture: amd64
|
||||
Maintainer: Deepin Packages Builder <packages@deepin.com>, gfdgd xi<3025613752@qq.com>, 为什么您不喜欢熊出没和阿布呢
|
||||
Installed-Size: 146963
|
||||
Depends: libc6 (>= 2.14), libdeepin-pw-check, libdtkcore5 (>= 5.5), libdtkgui5 (>= 5.5), libdtkwidget5 (>= 5.5), libgcc1 (>= 1:3.0), libkf5networkmanagerqt6 (>= 5.6.0), libncursesw6 (>= 6), libparted2 (>= 3.1), libqt5core5a (>= 5.15.1), libqt5dbus5 (>= 5.0.2), libqt5gui5 (>= 5.8.0) | libqt5gui5-gles (>= 5.8.0), libqt5network5 (>= 5.11.0~rc1), libqt5svg5 (>= 5.6.0~beta), libqt5widgets5 (>= 5.15.1), libqt5x11extras5 (>= 5.6.0), libqt5xml5 (>= 5.0.2), libqtermwidget5-0 (>= 0.6.0), libstdc++6 (>= 5.2), libtinfo6 (>= 6), libudisks2-qt5, libutf8proc2 (>= 1.3), libx11-6 (>= 2:1.2.99.901), libxext6, libxi6 (>= 2:1.2.99.4), libxrandr2 (>= 2:1.2.99.3), libxtst6, zlib1g (>= 1:1.1.4), btrfs-progs, deepin-installer-timezones, dosfstools, imagemagick, imageworsener, jfsutils, mtools, ntfs-3g, os-prober, parted, pciutils, reiserfsprogs, squashfs-tools, tshark, udev, x11-xserver-utils, xfsprogs, xinit, xkb-data, deepin-clone, cryptsetup, lvm2, kbd, fbterm, dde-account-faces, dde-qt5integration, deepin-pw-check, python3, python3-pyqt5
|
||||
Conflicts: deepin-installer
|
||||
Replaces: deepin-installer
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Homepage: http://www.deepin.org
|
||||
Description: Release version of deepin installer
|
||||
New version of deepin-installer, rewritten with Qt5.
|
|
@ -0,0 +1,572 @@
|
|||
7edd932bdc6ab0cf2f68855f15f7ca6a lib/live/boot/9991-override-check-dev.sh
|
||||
0e97a3dea156a9f6dc8151e5743414d0 lib/live/boot/9991-override-netbase.sh
|
||||
513cc522564bdfdc99e88d05cc709ed1 lib/live/config/1080-deepin-installer-launcher
|
||||
36bafe434a7dd31d3207a80e48bd23c4 lib/live/config/1081-deepin-auto-install
|
||||
26570e009ede8f6c62e40e39d91b192b lib/live/config/1082-deepin-livecd
|
||||
8310025980ab1eaccb1fd38b5f7e0880 lib/systemd/system/deepin-installer.service
|
||||
f4c1743146b1aa8db29b8ba16a4c2b25 lib/systemd/system/systemd-timesyncd.service.d/disable-timesyncd-with-installer.conf
|
||||
ef18364b128fd62a9c91e99e3eae2457 usr/bin/command-execute-agent
|
||||
0951255c9838f3389ed987065f027fbd usr/bin/deepin-installer
|
||||
1ec1a0efb8114a0bbff356cd6c6da999 usr/bin/deepin-installer-bases
|
||||
1ec9691891c065be19459c2ba6c8c0e8 usr/bin/deepin-installer-both
|
||||
dad9a0bd1b76e536d4e95c10a637cb2d usr/bin/deepin-installer-cli
|
||||
f7cb59546ad2d0da45dfee2e40aa4cfd usr/bin/deepin-installer-cli-install
|
||||
6a399799c09c70171e861e6ea6ef7426 usr/bin/deepin-installer-core
|
||||
6e7ee753385e01e21c3ec5ecae363a8f usr/bin/deepin-installer-first-boot
|
||||
b8fcd0a92717559e0d8c44663b4c4d75 usr/bin/deepin-installer-first-boot-pkexec
|
||||
75acda82c6d91b12b61e18a2d5c50ae2 usr/bin/deepin-installer-init
|
||||
9505f3058fc3e07dd0a8c912a581aeaf usr/bin/deepin-installer-pkexec
|
||||
64ab1ca501ee54d0fc20164ab002fc4c usr/bin/deepin-installer-settings
|
||||
38761f2c37aca72a693dfa5f58d450de usr/bin/deepin-installer-simpleini
|
||||
3ac3f5bb8bb24d07f80879b062e6be11 usr/bin/deepin-installer-start
|
||||
94b1fddf013328f3ba8bfd6a1130df68 usr/bin/deepin-livecd-relaunch
|
||||
32ec8fa6672ac61e976bb9e561e7348b usr/share/applications/deepin-installer-oem.desktop
|
||||
8bdcd0896fe05a6df9de6d9fac5b16b0 usr/share/applications/deepin-installer.desktop
|
||||
4a3f09393163f7e3a1594157df55bbd7 usr/share/deepin-installer/check_hooks/after_check/99_disable_check_mode.job
|
||||
0a9d4f459d0d482dec9e7e27bd4cb6a8 usr/share/deepin-installer/check_hooks/basic_utils.sh
|
||||
208196d5b3a96524888c3722a7d1fb25 usr/share/deepin-installer/check_hooks/before_check/99_create_in_check_file.job
|
||||
9d657760690186fb54e6388c12e00a32 usr/share/deepin-installer/check_hooks/check_start.sh
|
||||
8a9e2bb08dc3d1dc7baa176913b9c75f usr/share/deepin-installer/check_hooks/check_stop.sh
|
||||
cca5e80f345370d7c463c790a95e4699 usr/share/deepin-installer/check_hooks/command.sh
|
||||
02f07ae9a03ceaad4def7dd63b7eb82e usr/share/deepin-installer/check_hooks/lightdm-start.sh
|
||||
3b772313c862f8ed14754ba4e3979ebc usr/share/deepin-installer/check_hooks/lightdm-stop.sh
|
||||
0701de8ee6323f154d7a0adc8285b423 usr/share/deepin-installer/hooks/after_chroot/00_print_deepin_conf.job
|
||||
ef13873e1348888cff3911224f31175d usr/share/deepin-installer/hooks/after_chroot/01_copy_aptcache.job
|
||||
cb3792e2379e4721283d6142f8aa203a usr/share/deepin-installer/hooks/after_chroot/02_generate_fstab.job
|
||||
e66b6640d77db0a78d0d4a33099f499d usr/share/deepin-installer/hooks/after_chroot/03_remove_policy_rc.job
|
||||
5e0ce097cc6c9cf8ba563342384951a5 usr/share/deepin-installer/hooks/after_chroot/03_setup_bootloader_loongarch64.job
|
||||
b586ac5a741e0f6fe96bf3d99be30dbb usr/share/deepin-installer/hooks/after_chroot/87_generate_ab_recovery.job
|
||||
d46473d8c04ff3e43f08b3ca48f6c419 usr/share/deepin-installer/hooks/after_chroot/88_copy_oem_license.job
|
||||
0bd039105640704ea0da9a0155e838fe usr/share/deepin-installer/hooks/after_chroot/89_setup_recovery.job
|
||||
f194c609fc01a49b8aad81de455b5ab0 usr/share/deepin-installer/hooks/after_chroot/89_setup_udisk_rules.job
|
||||
fb6d7d939a6d8fa866dc7e7f2b614b85 usr/share/deepin-installer/hooks/after_chroot/90_unmount.job
|
||||
f2d399ca846e212667624c8b3c641f72 usr/share/deepin-installer/hooks/after_chroot/91_generate_recoverry.job
|
||||
0070a553f8333aae457800b0504ef580 usr/share/deepin-installer/hooks/after_chroot/92_setup_check_mode_user.job
|
||||
f9ba67bfa06e8d6ef6c12554ddd17e51 usr/share/deepin-installer/hooks/after_chroot/99_copy_installer_log.job
|
||||
6826629ddbf207db660b5829ae54dd3a usr/share/deepin-installer/hooks/after_chroot/genfstab
|
||||
42039d69deaf69bd6591deeb71edf799 usr/share/deepin-installer/hooks/auto_part.sh
|
||||
32c793c8acfae73ce25f6232976766d2 usr/share/deepin-installer/hooks/basic_utils.sh
|
||||
77bfa82a72334c2bec6cba87b586dfb2 usr/share/deepin-installer/hooks/before_chroot/00_print_disk_info.job
|
||||
987f8854fa55da210c0392ead2225aca usr/share/deepin-installer/hooks/before_chroot/01_update_time_standard.job
|
||||
9ed43286a33eee815af5f345f463389b usr/share/deepin-installer/hooks/before_chroot/02_detect_liveboot_method.job
|
||||
af3228b6d6b6ad0c4f6221c320e7adc5 usr/share/deepin-installer/hooks/before_chroot/09_inhibit_screensaver.job
|
||||
c0a47afdaaff8cef3ef48d6d1be9315f usr/share/deepin-installer/hooks/before_chroot/11_mount_target.job
|
||||
022905d091291dacb37f22e32212f1af usr/share/deepin-installer/hooks/before_chroot/12_create_swap_file.job
|
||||
3a9653a2c078d98e8a8b51033a28e3a6 usr/share/deepin-installer/hooks/before_chroot/13_setup_data_info.job
|
||||
2ac35e7a52630edc1906f13199353c6f usr/share/deepin-installer/hooks/before_chroot/21_extract_base_filesystem.job
|
||||
f704a8c0216c41821d96d001a9239c95 usr/share/deepin-installer/hooks/before_chroot/31_get_screen_resolution.job
|
||||
6bef13bdd3288ad9e903703cef61815e usr/share/deepin-installer/hooks/before_chroot/41_setup_mount_points.job
|
||||
00c69db302d6b66beb6955d32bb5bb4c usr/share/deepin-installer/hooks/before_chroot/42_create_policy_rc.job
|
||||
0647e9bff0e78f3e14b19a819171a4a3 usr/share/deepin-installer/hooks/before_chroot/85_copy_settings_file.job
|
||||
b122506ea54003e05259724b0127ce9f usr/share/deepin-installer/hooks/before_chroot/90_copy_oem_debug_folder.job
|
||||
2a70a7f4722179f69382af45a0120340 usr/share/deepin-installer/hooks/before_chroot/99_print_info.job
|
||||
b188d5b3c10c2de7b4e4e2238466af4a usr/share/deepin-installer/hooks/before_install/01_multi_system_set.job
|
||||
cb33c737241392976bf3397ba4e9d7f7 usr/share/deepin-installer/hooks/doinstallrecord_first_boot.sh
|
||||
19343ab1db918a62fe996c10d93ec703 usr/share/deepin-installer/hooks/first_boot_setup.sh
|
||||
e85fe987036670786d14f4880d2c3e0d usr/share/deepin-installer/hooks/hook_manager.sh
|
||||
0614cad8e8b46457acd2ac512acf7ed2 usr/share/deepin-installer/hooks/in_chroot/00_print_info.job
|
||||
8db38bc575fdd9675f3562ecdad06ab3 usr/share/deepin-installer/hooks/in_chroot/01_setup_cdrom_repository.job
|
||||
85602c01b32aaa0644d8edd02afd7aed usr/share/deepin-installer/hooks/in_chroot/02_setup_bootloader_arm64.job
|
||||
ded86aa6b75b03171e079423891f18b9 usr/share/deepin-installer/hooks/in_chroot/02_setup_bootloader_loongson.job
|
||||
501f738838b89a7de17d29635632ead9 usr/share/deepin-installer/hooks/in_chroot/02_setup_bootloader_x86.job
|
||||
d3fe0ee1c2e8b9e784d7cfbed9ee8be9 usr/share/deepin-installer/hooks/in_chroot/03_setup_auto_mount.job
|
||||
be670693c124d53111a42b4748c8f60d usr/share/deepin-installer/hooks/in_chroot/03_setup_license_activator.job
|
||||
798925c4d73d914df53a1c2b4ce9fc22 usr/share/deepin-installer/hooks/in_chroot/04_netcfg_network_manager.job
|
||||
fff55893749e9b201266603632b7f14f usr/share/deepin-installer/hooks/in_chroot/05_enable_network_manager.job
|
||||
e6ec493f80fb86d2c727a041c55f23d8 usr/share/deepin-installer/hooks/in_chroot/06_install_drivers.job
|
||||
ae152467839759762a9f1b366eb730dd usr/share/deepin-installer/hooks/in_chroot/07_fix_command_capabilities.job
|
||||
ac156ce0a2ab0691d8f0159bd3a9de7b usr/share/deepin-installer/hooks/in_chroot/09_generate_machine_id.job
|
||||
4d698b3c0f3c9c0c345e1036590cec3a usr/share/deepin-installer/hooks/in_chroot/21_setup_services.job
|
||||
add079d7db4b652f2ba2429199d07d5b usr/share/deepin-installer/hooks/in_chroot/22_setup_grub_menu_x86.job
|
||||
f57b4a0c47be6cf5160579e944887a3d usr/share/deepin-installer/hooks/in_chroot/23_installer_first_boot_deb.job
|
||||
6c195bc2d5176e546c1cc730107a237b usr/share/deepin-installer/hooks/in_chroot/23_setup_component_packages.job
|
||||
eda267efcc19db6de2bc6ccb11a241c3 usr/share/deepin-installer/hooks/in_chroot/23_setup_deb_packages.job
|
||||
53afe2603a682bbb71f8565935021f2d usr/share/deepin-installer/hooks/in_chroot/24_setup_os_version.job
|
||||
4b8da51ebc802f6248f0a1ac72797582 usr/share/deepin-installer/hooks/in_chroot/25_setup_plymouth.job
|
||||
54998415826a27741086236f3f62ddb8 usr/share/deepin-installer/hooks/in_chroot/26_ssd_plymouth_alternatives.job
|
||||
538b060cfafcaeed5e7dc4d50444ffee usr/share/deepin-installer/hooks/in_chroot/27_setup_lightdm.job
|
||||
4ad6a45d7b83acd9c16df26c02c5dda3 usr/share/deepin-installer/hooks/in_chroot/28_generate_font_cache.job
|
||||
ae2377de59f285c7382f7939057d5c09 usr/share/deepin-installer/hooks/in_chroot/29_refresh_desktop_cache.job
|
||||
6d7e39c6ff0381fe8bb9310d3801ee78 usr/share/deepin-installer/hooks/in_chroot/30_setup_cryptdisk.job
|
||||
c8a2c8aab23c35282866c9476c74c785 usr/share/deepin-installer/hooks/in_chroot/30_update_gtk_im_modules.job
|
||||
f71ba1debe1a47254907f0479c5741ab usr/share/deepin-installer/hooks/in_chroot/31_setup_vendor_logo.job
|
||||
b5ae312533d78a5a382dba0d23701f78 usr/share/deepin-installer/hooks/in_chroot/32_setup_user_skel.job
|
||||
0e35b51c52adbbc4005c5c2a2a39b7d3 usr/share/deepin-installer/hooks/in_chroot/34_setup_livefs.job
|
||||
f6918c6e3eee51dc028f85afab489a71 usr/share/deepin-installer/hooks/in_chroot/49_generate_reboot_setup_file.job
|
||||
662fcd80b11301b25595a8aad6256d6c usr/share/deepin-installer/hooks/in_chroot/51_setup_keyboard.job
|
||||
903026da2e0aad0d9e7c3d146b980ad2 usr/share/deepin-installer/hooks/in_chroot/52_setup_locale_timezone.job
|
||||
ba9a78c864454b19f3ade62b4532294e usr/share/deepin-installer/hooks/in_chroot/53_setup_user.job
|
||||
00f4bcf4b44592140a8903474b55d933 usr/share/deepin-installer/hooks/in_chroot/54_prepare_customize_user.job
|
||||
f8a9d1ee41f834374411b80748a83ccd usr/share/deepin-installer/hooks/in_chroot/55_customize_user.job
|
||||
5412c14c051cb86fefdd1f81c042999c usr/share/deepin-installer/hooks/in_chroot/61_override_desktop_schema.job
|
||||
31d4986a50e98158e973d0f075a14798 usr/share/deepin-installer/hooks/in_chroot/90_setup_apt_sources.job
|
||||
5227390d0501fc7adf1444c22d92ded6 usr/share/deepin-installer/hooks/in_chroot/91_remove_unused_packages.job
|
||||
274f82c06599be43711a7d39546b4a4d usr/share/deepin-installer/hooks/in_chroot/92_setup_installer_config.job
|
||||
e41130172c1d29aa8f0b198b0dd39a6b usr/share/deepin-installer/hooks/in_chroot/98_judge_loongson_kernel.job
|
||||
c24fab1431713175f19f425da7170006 usr/share/deepin-installer/hooks/in_chroot/99_setup_system.job
|
||||
f22815170c997851c8ba6cd6b9f63af5 usr/share/deepin-installer/hooks/in_chroot/99_update_initramfs_sw.job
|
||||
af09acc94802dae45c0ca3bd82ccc532 usr/share/deepin-installer/i18n/CMakeFiles/CMakeDirectoryInformation.cmake
|
||||
897316929176464ebc9ad085f31e7284 usr/share/deepin-installer/i18n/CMakeFiles/progress.marks
|
||||
faac60f4ba8ac5c2fe793efd3003104e usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/DependInfo.cmake
|
||||
fa809693b948f60ec42afe83f0effa57 usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/build.make
|
||||
a1cda023526d24a53851e66e3318ec2e usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/cmake_clean.cmake
|
||||
2f4dea9d58911a0d5ad1c7884cce1278 usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/compiler_depend.make
|
||||
5fbd816aa9607089bcad0489c5afaea0 usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/compiler_depend.ts
|
||||
68b329da9893e34099c7d8ad5cb9c940 usr/share/deepin-installer/i18n/CMakeFiles/ts.dir/progress.make
|
||||
c75cf42ba1b41392ae9103e1c75e58a2 usr/share/deepin-installer/i18n/CTestTestfile.cmake
|
||||
9939e062378b27aef39bf5bce0ac2497 usr/share/deepin-installer/i18n/Makefile
|
||||
07c47e048d57c513fccd92d3e62e8f19 usr/share/deepin-installer/i18n/cmake_install.cmake
|
||||
40e2249ddaa74274253e9a5299ae1928 usr/share/deepin-installer/i18n/deepin-installer-az.qm
|
||||
eb4b6b8f879f0f3774a655a3a3e09214 usr/share/deepin-installer/i18n/deepin-installer-bo.qm
|
||||
7c6d5bbd47ebbf3bfb93b25079827ca0 usr/share/deepin-installer/i18n/deepin-installer-ca.qm
|
||||
b5d9e21a30c77f22aa053c5457bb2e6c usr/share/deepin-installer/i18n/deepin-installer-cs.qm
|
||||
344e3251dbcba934a07d0cd9b8390bc3 usr/share/deepin-installer/i18n/deepin-installer-de.qm
|
||||
55bc4a6bab959c618ccba3ed2571fa7a usr/share/deepin-installer/i18n/deepin-installer-es.qm
|
||||
466da106bc34e09838017a3029199b95 usr/share/deepin-installer/i18n/deepin-installer-fi.qm
|
||||
24576e21f79d8917744de669bc23897f usr/share/deepin-installer/i18n/deepin-installer-fr.qm
|
||||
b5d6d437d347dd2939348da5d0744c43 usr/share/deepin-installer/i18n/deepin-installer-gl_ES.qm
|
||||
e66eeae633f29e3fb8fb83565fa15500 usr/share/deepin-installer/i18n/deepin-installer-hu.qm
|
||||
e6816889695154f96833043efbce377a usr/share/deepin-installer/i18n/deepin-installer-it.qm
|
||||
a7d77c53254cd1c6d9bec6329c535c9f usr/share/deepin-installer/i18n/deepin-installer-ko.qm
|
||||
10fe50eb451fc467748853c37de78aaa usr/share/deepin-installer/i18n/deepin-installer-ms.qm
|
||||
57e8dcf880650172085136ba6656f7d3 usr/share/deepin-installer/i18n/deepin-installer-nl.qm
|
||||
16ed766efdef40d84aa990b0c3e03c3b usr/share/deepin-installer/i18n/deepin-installer-pl.qm
|
||||
260d94d9200f9ea075a67d229601bdb6 usr/share/deepin-installer/i18n/deepin-installer-pt.qm
|
||||
370a518df3c497147fabc656ff044c4c usr/share/deepin-installer/i18n/deepin-installer-pt_BR.qm
|
||||
b836e8873f22ead15b634e9d2d0f0e42 usr/share/deepin-installer/i18n/deepin-installer-ru.qm
|
||||
e2032af0807de4ea964f0715924d90ef usr/share/deepin-installer/i18n/deepin-installer-sq.qm
|
||||
f9b8c3793eb8a2f2c4d07a39c2bd8ad2 usr/share/deepin-installer/i18n/deepin-installer-sr.qm
|
||||
0265bcfc5f56f3f355e714633eaaeabc usr/share/deepin-installer/i18n/deepin-installer-tr.qm
|
||||
37f4ca69cfad204ffa17f631fe0d8559 usr/share/deepin-installer/i18n/deepin-installer-ug.qm
|
||||
df24744bafc38e7f9ece58a5abc70b47 usr/share/deepin-installer/i18n/deepin-installer-uk.qm
|
||||
34973adb7e36adb797ad925f5db4d8f4 usr/share/deepin-installer/i18n/deepin-installer-zh_CN.qm
|
||||
cbcd76e0cc306c55195ec6a4755dd8af usr/share/deepin-installer/i18n/deepin-installer-zh_HK.qm
|
||||
30cfc8ec93d81ad94d047a57157ff951 usr/share/deepin-installer/i18n/deepin-installer-zh_TW.qm
|
||||
9d36ad27ccb86db8e1b373ed0a0e81c6 usr/share/deepin-installer/i18n/deepin-installer.qm
|
||||
0109f91681be08b4681ae2d54d1599d2 usr/share/deepin-installer/resources/default_settings.ini
|
||||
7d93f2316be579d75cd8907f5b2ccc0d usr/share/deepin-installer/resources/default_wallpaper.jpg
|
||||
c50baff53682819310bd9ed11e3e6f91 usr/share/deepin-installer/resources/full_disk_policy.json
|
||||
f1ba600d216c916d89629cd95528374e usr/share/deepin-installer/resources/full_disk_policy_device.json
|
||||
dc42e0f94440ada3febc76a0c2a73285 usr/share/deepin-installer/resources/full_disk_policy_server.json
|
||||
7aee6a3f7adc6941702a66a49448c70e usr/share/deepin-installer/resources/language_sort.json
|
||||
5a74f46f08b2ced13adb687f6af97811 usr/share/deepin-installer/resources/languages.json
|
||||
4846764615e4dd0ea70743ecfa73df09 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-community_en_US.txt
|
||||
9df8f1496dcbb9004d79dd56f58dc35d usr/share/deepin-installer/resources/licenses/end-user-license-agreement-community_zh_CN.txt
|
||||
9c4dae10615ae386ac4e744c9ba3647a usr/share/deepin-installer/resources/licenses/end-user-license-agreement-personal_en_US.txt
|
||||
c34718fbfcb879481bdf1f7dc486f7ed usr/share/deepin-installer/resources/licenses/end-user-license-agreement-personal_zh_CN.txt
|
||||
579ca8b70849aadeca2c701f31f54e3f usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_bo_CN.txt
|
||||
40b7885eb43e98d22613cfa98cd4d284 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_en_US.txt
|
||||
eb95dba27a7cdb688779cd33f5106157 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_ug_CN.txt
|
||||
7049fe5f8c64479904d498b20cd2bd43 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_zh_CN.txt
|
||||
8da89d8d0c2cb7f8db791f187c37e913 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_zh_HK.txt
|
||||
7d3e113841f662fa1f9dfaf47ce07b7a usr/share/deepin-installer/resources/licenses/end-user-license-agreement-professional_zh_TW.txt
|
||||
2506676f49ec9ed352a644ec5291b70e usr/share/deepin-installer/resources/licenses/end-user-license-agreement-server_en_US.txt
|
||||
689955ccb8b10b3a5256fe36bed893a9 usr/share/deepin-installer/resources/licenses/end-user-license-agreement-server_zh_CN.txt
|
||||
2d7a565145f9fb2adf46b3cb260d0d0c usr/share/deepin-installer/resources/licenses/privacy-policy-community_en_US.txt
|
||||
73773ba41b5d683ed7a4d6cf9d58eeef usr/share/deepin-installer/resources/licenses/privacy-policy-community_zh_CN.txt
|
||||
49bf45331c30f43049106c1ddbd5d3e4 usr/share/deepin-installer/resources/licenses/privacy-policy-personal_en_US.txt
|
||||
469b9adad0a88ba4aae1a77f45faef73 usr/share/deepin-installer/resources/licenses/privacy-policy-personal_zh_CN.txt
|
||||
8c6f7d72866adebbb401c5c102a4d59a usr/share/deepin-installer/resources/licenses/privacy-policy-professional_bo_CN.txt
|
||||
7b5cbebb266cba1eb219400d248e9886 usr/share/deepin-installer/resources/licenses/privacy-policy-professional_en_US.txt
|
||||
0bb7900953367995a336dffc75d49556 usr/share/deepin-installer/resources/licenses/privacy-policy-professional_ug_CN.txt
|
||||
cf73e0a51114845447e35920023f5252 usr/share/deepin-installer/resources/licenses/privacy-policy-professional_zh_CN.txt
|
||||
76625d2a64c817987b76146081f71e2e usr/share/deepin-installer/resources/licenses/privacy-policy-professional_zh_HK.txt
|
||||
28285cb71f5fb506d4d069ca38e58c86 usr/share/deepin-installer/resources/licenses/privacy-policy-professional_zh_TW.txt
|
||||
da41cf087f86b2c5a1dd59fbd3ac9fb9 usr/share/deepin-installer/resources/licenses/privacy-policy-server_en_US.txt
|
||||
341d9777d06cfa46fa0d9fe96f30a4c2 usr/share/deepin-installer/resources/licenses/privacy-policy-server_zh_CN.txt
|
||||
b320559059c3dc3bd386f14c70778ad6 usr/share/deepin-installer/resources/licenses/user-experience-agreement-community_en_US.txt
|
||||
a351a71714a13cd86e169e6813acda8e usr/share/deepin-installer/resources/licenses/user-experience-agreement-community_zh_CN.txt
|
||||
b3553027a06807ff6f5197fd60a466f3 usr/share/deepin-installer/resources/licenses/user-experience-agreement-personal_en_US.txt
|
||||
7de844893376601960d2792875ce1fda usr/share/deepin-installer/resources/licenses/user-experience-agreement-personal_zh_CN.txt
|
||||
dbdb5041a7095bb4ca880b7358539e6f usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_bo_CN.txt
|
||||
854dcebbc722b90bb8a6e74ee8196269 usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_en_US.txt
|
||||
d94514a422d7f2f50d2bcd0595a7e22f usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_ug_CN.txt
|
||||
2092cd2c9a3b684871ed7d100089c33c usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_zh_CN.txt
|
||||
8311bb1943a8aad4d958ca85f2bd885b usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_zh_HK.txt
|
||||
ef402026c3766f11c72585bf6c74620a usr/share/deepin-installer/resources/licenses/user-experience-agreement-professional_zh_TW.txt
|
||||
c12a0b361a0655e3c3a972c8c48eeb14 usr/share/deepin-installer/resources/oem_settings.json
|
||||
fc909441ca1a9bd5ebd8515bb6f4dcd7 usr/share/deepin-installer/resources/override/community.override
|
||||
d51cb5c012860851611a7230a60a67b3 usr/share/deepin-installer/resources/override/device.override
|
||||
fdcbf32fb34651800be4c42532cc4885 usr/share/deepin-installer/resources/override/personal.override
|
||||
511c0d64a6bd9c9cb17bbbc6e76921ef usr/share/deepin-installer/resources/override/professional.override
|
||||
4295a1c5770923ae737fe64f5aade50f usr/share/deepin-installer/resources/override/server.override
|
||||
c6713a4474b4768562a4fd2dddd62998 usr/share/deepin-installer/resources/packages_choice.json
|
||||
fcbb32ba14ca0efe5e053f9fbb92e305 usr/share/deepin-installer/resources/packages_default.json
|
||||
1d634b7addf6da84eb608c780a775b34 usr/share/deepin-installer/resources/packages_sort.json
|
||||
e3e9f56388f5ad25135c2381a999aeda usr/share/deepin-installer/resources/slide/Default/bo_CN/01-桌面环境.png
|
||||
ea51a9d2487157eb5c980b6351f38c96 usr/share/deepin-installer/resources/slide/Default/bo_CN/02-文件管理器.png
|
||||
ab388a9d4842fe718c6eb869b06e6d41 usr/share/deepin-installer/resources/slide/Default/bo_CN/03-商店.png
|
||||
f5e42276772252c01dadafcb8a29559b usr/share/deepin-installer/resources/slide/Default/bo_CN/04-终端.png
|
||||
b8a235aa9cd9ca7c7cd628debe726c8e usr/share/deepin-installer/resources/slide/Default/bo_CN/05-联系人.png
|
||||
9d3bc608c00ace88d9f0f317509b6553 usr/share/deepin-installer/resources/slide/Default/bo_CN/06-截图录屏.png
|
||||
af52737e4d7079009647a654647db976 usr/share/deepin-installer/resources/slide/Default/bo_CN/07-音乐影院.png
|
||||
8b84dbba2e5ed0603371aeba8b674a95 usr/share/deepin-installer/resources/slide/Default/bo_CN/08-看图相册.png
|
||||
0174bfbbe5d6cfccf5465cba5c95699b usr/share/deepin-installer/resources/slide/Default/bo_CN/09-浏览器.png
|
||||
1b5c3df0fde285aadc20ff519a50ec76 usr/share/deepin-installer/resources/slide/Default/bo_CN/10-实用工具.png
|
||||
05c22abddc76ad3bdee65bff3cbb01fc usr/share/deepin-installer/resources/slide/Default/bo_CN/11-壁纸轮换.png
|
||||
51f482a8ebf2ec3a0f1a3b702e722f7d usr/share/deepin-installer/resources/slide/Default/bo_CN/12-安全更新.png
|
||||
eba508665cef04cf6b46f60a9eac4006 usr/share/deepin-installer/resources/slide/Default/bo_CN/13-兼容多种硬件平台.png
|
||||
4f6577c6777ca3b891202940be03d7d6 usr/share/deepin-installer/resources/slide/Default/bo_CN/14-邮箱.png
|
||||
660115ce37083a20afaca55530cd98df usr/share/deepin-installer/resources/slide/Default/bo_CN/15-安全中心.png
|
||||
aa78bcbb60de129a4546182971949a7a usr/share/deepin-installer/resources/slide/Default/bo_CN/17-远程协助.png
|
||||
be6eab6ee10c44f00736873ef1b4721f usr/share/deepin-installer/resources/slide/Default/default/01-桌面环境.png
|
||||
a9d65cec907133e49bfc05b073fef51b usr/share/deepin-installer/resources/slide/Default/default/02-文件管理器.png
|
||||
1924ac66add61180c126c72fe5f37c50 usr/share/deepin-installer/resources/slide/Default/default/03-商店.png
|
||||
8dfd6082f185c17ef3ee467e82e3cdb3 usr/share/deepin-installer/resources/slide/Default/default/04-终端.png
|
||||
2f40eb4f5bb8fc13456968a554489318 usr/share/deepin-installer/resources/slide/Default/default/05-联系人.png
|
||||
5ccd0fe9673a42383ce3ee86c441beb4 usr/share/deepin-installer/resources/slide/Default/default/06-截图录屏.png
|
||||
51dfb172126aa37e0806981a0c48748e usr/share/deepin-installer/resources/slide/Default/default/07-音乐影院.png
|
||||
e055ed8c075a5da95dc7f1d94d30149d usr/share/deepin-installer/resources/slide/Default/default/08-看图相册.png
|
||||
3bc981727816c0690e8362d5c13b5f52 usr/share/deepin-installer/resources/slide/Default/default/09-浏览器.png
|
||||
caad26e23263bf7fe22b5efafea36d2d usr/share/deepin-installer/resources/slide/Default/default/10-实用工具.png
|
||||
520a35b3aa17f2e10bd58f1d76974e85 usr/share/deepin-installer/resources/slide/Default/default/11-壁纸轮换.png
|
||||
114a392666b17ea8db923affcc21e1b5 usr/share/deepin-installer/resources/slide/Default/default/12-安全更新.png
|
||||
09ea9facef85a503f4f9b8369aac9378 usr/share/deepin-installer/resources/slide/Default/default/13-兼容多种硬件平台.png
|
||||
cc3e16f7f11e5e005939afdf540b58a9 usr/share/deepin-installer/resources/slide/Default/default/14-邮箱.png
|
||||
cd268c4554556bb882c64ef11576b3d5 usr/share/deepin-installer/resources/slide/Default/default/15-安全中心.png
|
||||
4935806ece4b663794398cf36a6c2f6f usr/share/deepin-installer/resources/slide/Default/default/17-远程协助.png
|
||||
be6eab6ee10c44f00736873ef1b4721f usr/share/deepin-installer/resources/slide/Default/en_US/01-桌面环境.png
|
||||
a9d65cec907133e49bfc05b073fef51b usr/share/deepin-installer/resources/slide/Default/en_US/02-文件管理器.png
|
||||
1924ac66add61180c126c72fe5f37c50 usr/share/deepin-installer/resources/slide/Default/en_US/03-商店.png
|
||||
8dfd6082f185c17ef3ee467e82e3cdb3 usr/share/deepin-installer/resources/slide/Default/en_US/04-终端.png
|
||||
2f40eb4f5bb8fc13456968a554489318 usr/share/deepin-installer/resources/slide/Default/en_US/05-联系人.png
|
||||
5ccd0fe9673a42383ce3ee86c441beb4 usr/share/deepin-installer/resources/slide/Default/en_US/06-截图录屏.png
|
||||
51dfb172126aa37e0806981a0c48748e usr/share/deepin-installer/resources/slide/Default/en_US/07-音乐影院.png
|
||||
e055ed8c075a5da95dc7f1d94d30149d usr/share/deepin-installer/resources/slide/Default/en_US/08-看图相册.png
|
||||
3bc981727816c0690e8362d5c13b5f52 usr/share/deepin-installer/resources/slide/Default/en_US/09-浏览器.png
|
||||
caad26e23263bf7fe22b5efafea36d2d usr/share/deepin-installer/resources/slide/Default/en_US/10-实用工具.png
|
||||
520a35b3aa17f2e10bd58f1d76974e85 usr/share/deepin-installer/resources/slide/Default/en_US/11-壁纸轮换.png
|
||||
114a392666b17ea8db923affcc21e1b5 usr/share/deepin-installer/resources/slide/Default/en_US/12-安全更新.png
|
||||
09ea9facef85a503f4f9b8369aac9378 usr/share/deepin-installer/resources/slide/Default/en_US/13-兼容多种硬件平台.png
|
||||
cc3e16f7f11e5e005939afdf540b58a9 usr/share/deepin-installer/resources/slide/Default/en_US/14-邮箱.png
|
||||
cd268c4554556bb882c64ef11576b3d5 usr/share/deepin-installer/resources/slide/Default/en_US/15-安全中心.png
|
||||
4935806ece4b663794398cf36a6c2f6f usr/share/deepin-installer/resources/slide/Default/en_US/17-远程协助.png
|
||||
e3e9f56388f5ad25135c2381a999aeda usr/share/deepin-installer/resources/slide/Default/ug_CN/01-桌面环境.png
|
||||
ea51a9d2487157eb5c980b6351f38c96 usr/share/deepin-installer/resources/slide/Default/ug_CN/02-文件管理器.png
|
||||
ab388a9d4842fe718c6eb869b06e6d41 usr/share/deepin-installer/resources/slide/Default/ug_CN/03-商店.png
|
||||
f5e42276772252c01dadafcb8a29559b usr/share/deepin-installer/resources/slide/Default/ug_CN/04-终端.png
|
||||
b8a235aa9cd9ca7c7cd628debe726c8e usr/share/deepin-installer/resources/slide/Default/ug_CN/05-联系人.png
|
||||
9d3bc608c00ace88d9f0f317509b6553 usr/share/deepin-installer/resources/slide/Default/ug_CN/06-截图录屏.png
|
||||
af52737e4d7079009647a654647db976 usr/share/deepin-installer/resources/slide/Default/ug_CN/07-音乐影院.png
|
||||
8b84dbba2e5ed0603371aeba8b674a95 usr/share/deepin-installer/resources/slide/Default/ug_CN/08-看图相册.png
|
||||
0174bfbbe5d6cfccf5465cba5c95699b usr/share/deepin-installer/resources/slide/Default/ug_CN/09-浏览器.png
|
||||
1b5c3df0fde285aadc20ff519a50ec76 usr/share/deepin-installer/resources/slide/Default/ug_CN/10-实用工具.png
|
||||
05c22abddc76ad3bdee65bff3cbb01fc usr/share/deepin-installer/resources/slide/Default/ug_CN/11-壁纸轮换.png
|
||||
51f482a8ebf2ec3a0f1a3b702e722f7d usr/share/deepin-installer/resources/slide/Default/ug_CN/12-安全更新.png
|
||||
eba508665cef04cf6b46f60a9eac4006 usr/share/deepin-installer/resources/slide/Default/ug_CN/13-兼容多种硬件平台.png
|
||||
4f6577c6777ca3b891202940be03d7d6 usr/share/deepin-installer/resources/slide/Default/ug_CN/14-邮箱.png
|
||||
660115ce37083a20afaca55530cd98df usr/share/deepin-installer/resources/slide/Default/ug_CN/15-安全中心.png
|
||||
aa78bcbb60de129a4546182971949a7a usr/share/deepin-installer/resources/slide/Default/ug_CN/17-远程协助.png
|
||||
e3e9f56388f5ad25135c2381a999aeda usr/share/deepin-installer/resources/slide/Default/zh_CN/01-桌面环境.png
|
||||
ea51a9d2487157eb5c980b6351f38c96 usr/share/deepin-installer/resources/slide/Default/zh_CN/02-文件管理器.png
|
||||
ab388a9d4842fe718c6eb869b06e6d41 usr/share/deepin-installer/resources/slide/Default/zh_CN/03-商店.png
|
||||
f5e42276772252c01dadafcb8a29559b usr/share/deepin-installer/resources/slide/Default/zh_CN/04-终端.png
|
||||
b8a235aa9cd9ca7c7cd628debe726c8e usr/share/deepin-installer/resources/slide/Default/zh_CN/05-联系人.png
|
||||
9d3bc608c00ace88d9f0f317509b6553 usr/share/deepin-installer/resources/slide/Default/zh_CN/06-截图录屏.png
|
||||
af52737e4d7079009647a654647db976 usr/share/deepin-installer/resources/slide/Default/zh_CN/07-音乐影院.png
|
||||
8b84dbba2e5ed0603371aeba8b674a95 usr/share/deepin-installer/resources/slide/Default/zh_CN/08-看图相册.png
|
||||
0174bfbbe5d6cfccf5465cba5c95699b usr/share/deepin-installer/resources/slide/Default/zh_CN/09-浏览器.png
|
||||
1b5c3df0fde285aadc20ff519a50ec76 usr/share/deepin-installer/resources/slide/Default/zh_CN/10-实用工具.png
|
||||
05c22abddc76ad3bdee65bff3cbb01fc usr/share/deepin-installer/resources/slide/Default/zh_CN/11-壁纸轮换.png
|
||||
51f482a8ebf2ec3a0f1a3b702e722f7d usr/share/deepin-installer/resources/slide/Default/zh_CN/12-安全更新.png
|
||||
eba508665cef04cf6b46f60a9eac4006 usr/share/deepin-installer/resources/slide/Default/zh_CN/13-兼容多种硬件平台.png
|
||||
4f6577c6777ca3b891202940be03d7d6 usr/share/deepin-installer/resources/slide/Default/zh_CN/14-邮箱.png
|
||||
660115ce37083a20afaca55530cd98df usr/share/deepin-installer/resources/slide/Default/zh_CN/15-安全中心.png
|
||||
aa78bcbb60de129a4546182971949a7a usr/share/deepin-installer/resources/slide/Default/zh_CN/17-远程协助.png
|
||||
7ebeffece336a87a6847c6fa24cd98fd usr/share/deepin-installer/resources/slide/Default/zh_HK/01-桌面环境.png
|
||||
369b0b8f13803dc7867106d6f7ce94de usr/share/deepin-installer/resources/slide/Default/zh_HK/02-文件管理器.png
|
||||
37350e58676ffc2f043c79bb9707d071 usr/share/deepin-installer/resources/slide/Default/zh_HK/03-商店.png
|
||||
37344f55e7b85269c7f3f860d04341c0 usr/share/deepin-installer/resources/slide/Default/zh_HK/04-终端.png
|
||||
910ac35b04bad09c9cc3d0448b3ff07a usr/share/deepin-installer/resources/slide/Default/zh_HK/05-联系人.png
|
||||
65aa8aeaa1fe483adb6258a07e522b6f usr/share/deepin-installer/resources/slide/Default/zh_HK/06-截图录屏.png
|
||||
27c481406ea37d0d172c594ede2375fd usr/share/deepin-installer/resources/slide/Default/zh_HK/07-音乐影院.png
|
||||
6b5362ad101545ad33d7de132fdc01c6 usr/share/deepin-installer/resources/slide/Default/zh_HK/08-看图相册.png
|
||||
febe91ee18eb80bd0f6c64c7d3fedca2 usr/share/deepin-installer/resources/slide/Default/zh_HK/09-浏览器.png
|
||||
b38df34e5233381b7c5b0ec78906af2d usr/share/deepin-installer/resources/slide/Default/zh_HK/10-实用工具.png
|
||||
e91cfafa970af9ae286eb3754d4812d7 usr/share/deepin-installer/resources/slide/Default/zh_HK/11-壁纸轮换.png
|
||||
c03dcde3589310e32c0b1a1d4bbc8499 usr/share/deepin-installer/resources/slide/Default/zh_HK/12-安全更新.png
|
||||
aed03b029ef4ce8c114db9058cd1d313 usr/share/deepin-installer/resources/slide/Default/zh_HK/13-兼容多种硬件平台.png
|
||||
ddf6b1afd2de6da1aee83dc180bf7459 usr/share/deepin-installer/resources/slide/Default/zh_HK/14-邮箱.png
|
||||
f4ce0e886307f980c781d830059f59b8 usr/share/deepin-installer/resources/slide/Default/zh_HK/15-安全中心.png
|
||||
c1a0f447bd292b741e28fb2de12a053e usr/share/deepin-installer/resources/slide/Default/zh_HK/17-远程协助.png
|
||||
7ebeffece336a87a6847c6fa24cd98fd usr/share/deepin-installer/resources/slide/Default/zh_TW/01-桌面环境.png
|
||||
369b0b8f13803dc7867106d6f7ce94de usr/share/deepin-installer/resources/slide/Default/zh_TW/02-文件管理器.png
|
||||
37350e58676ffc2f043c79bb9707d071 usr/share/deepin-installer/resources/slide/Default/zh_TW/03-商店.png
|
||||
37344f55e7b85269c7f3f860d04341c0 usr/share/deepin-installer/resources/slide/Default/zh_TW/04-终端.png
|
||||
910ac35b04bad09c9cc3d0448b3ff07a usr/share/deepin-installer/resources/slide/Default/zh_TW/05-联系人.png
|
||||
65aa8aeaa1fe483adb6258a07e522b6f usr/share/deepin-installer/resources/slide/Default/zh_TW/06-截图录屏.png
|
||||
27c481406ea37d0d172c594ede2375fd usr/share/deepin-installer/resources/slide/Default/zh_TW/07-音乐影院.png
|
||||
6b5362ad101545ad33d7de132fdc01c6 usr/share/deepin-installer/resources/slide/Default/zh_TW/08-看图相册.png
|
||||
febe91ee18eb80bd0f6c64c7d3fedca2 usr/share/deepin-installer/resources/slide/Default/zh_TW/09-浏览器.png
|
||||
b38df34e5233381b7c5b0ec78906af2d usr/share/deepin-installer/resources/slide/Default/zh_TW/10-实用工具.png
|
||||
e91cfafa970af9ae286eb3754d4812d7 usr/share/deepin-installer/resources/slide/Default/zh_TW/11-壁纸轮换.png
|
||||
c03dcde3589310e32c0b1a1d4bbc8499 usr/share/deepin-installer/resources/slide/Default/zh_TW/12-安全更新.png
|
||||
aed03b029ef4ce8c114db9058cd1d313 usr/share/deepin-installer/resources/slide/Default/zh_TW/13-兼容多种硬件平台.png
|
||||
ddf6b1afd2de6da1aee83dc180bf7459 usr/share/deepin-installer/resources/slide/Default/zh_TW/14-邮箱.png
|
||||
f4ce0e886307f980c781d830059f59b8 usr/share/deepin-installer/resources/slide/Default/zh_TW/15-安全中心.png
|
||||
c1a0f447bd292b741e28fb2de12a053e usr/share/deepin-installer/resources/slide/Default/zh_TW/17-远程协助.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Desktop/bo_CN/2-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Desktop/bo_CN/3-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Desktop/bo_CN/4-邮箱.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Desktop/bo_CN/6-应用商店.png
|
||||
a1aae16dacfc71fcc1ae7d59290d6b8f usr/share/deepin-installer/resources/slide/Desktop/bo_CN/7-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Desktop/bo_CN/8-图文识别.png
|
||||
1a5f8d13bef18bcb171a0ec08d1e82fb usr/share/deepin-installer/resources/slide/Desktop/default/2-生物认证.png
|
||||
26c0bcc2e12a6efa371402d64c7ac961 usr/share/deepin-installer/resources/slide/Desktop/default/3-浏览器.png
|
||||
d7a7026b2dc1c0a22aff2f39c217b0d4 usr/share/deepin-installer/resources/slide/Desktop/default/4-邮箱.png
|
||||
67119be3e0373a3379b269615bdc47cc usr/share/deepin-installer/resources/slide/Desktop/default/6-应用商店.png
|
||||
e20424867ae6b62aba4dea1e27b4e63c usr/share/deepin-installer/resources/slide/Desktop/default/7-全局搜索.png
|
||||
bf1ee5629df7efd0ad070a847de9efb5 usr/share/deepin-installer/resources/slide/Desktop/default/8-图文识别.png
|
||||
1a5f8d13bef18bcb171a0ec08d1e82fb usr/share/deepin-installer/resources/slide/Desktop/en_US/2-生物认证.png
|
||||
26c0bcc2e12a6efa371402d64c7ac961 usr/share/deepin-installer/resources/slide/Desktop/en_US/3-浏览器.png
|
||||
d7a7026b2dc1c0a22aff2f39c217b0d4 usr/share/deepin-installer/resources/slide/Desktop/en_US/4-邮箱.png
|
||||
67119be3e0373a3379b269615bdc47cc usr/share/deepin-installer/resources/slide/Desktop/en_US/6-应用商店.png
|
||||
e20424867ae6b62aba4dea1e27b4e63c usr/share/deepin-installer/resources/slide/Desktop/en_US/7-全局搜索.png
|
||||
bf1ee5629df7efd0ad070a847de9efb5 usr/share/deepin-installer/resources/slide/Desktop/en_US/8-图文识别.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Desktop/ug_CN/2-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Desktop/ug_CN/3-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Desktop/ug_CN/4-邮箱.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Desktop/ug_CN/6-应用商店.png
|
||||
a1aae16dacfc71fcc1ae7d59290d6b8f usr/share/deepin-installer/resources/slide/Desktop/ug_CN/7-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Desktop/ug_CN/8-图文识别.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Desktop/zh_CN/2-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Desktop/zh_CN/3-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Desktop/zh_CN/4-邮箱.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Desktop/zh_CN/6-应用商店.png
|
||||
a1aae16dacfc71fcc1ae7d59290d6b8f usr/share/deepin-installer/resources/slide/Desktop/zh_CN/7-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Desktop/zh_CN/8-图文识别.png
|
||||
17ee483b1e4131b261041d03602374f7 usr/share/deepin-installer/resources/slide/Desktop/zh_HK/2-生物认证.png
|
||||
eb749f020c8316ddf7b571f4e29dfa58 usr/share/deepin-installer/resources/slide/Desktop/zh_HK/3-浏览器.png
|
||||
41f8ee547c812c7efc25d9c4e10c1d9e usr/share/deepin-installer/resources/slide/Desktop/zh_HK/4-邮箱.png
|
||||
74423373d1441467bd2f725414b34d0e usr/share/deepin-installer/resources/slide/Desktop/zh_HK/6-应用商店.png
|
||||
43a442b94b562b7f0b3603562ae3e1cc usr/share/deepin-installer/resources/slide/Desktop/zh_HK/7-全局搜索.png
|
||||
ef908c17b226630f2e3fd36479f1d5c5 usr/share/deepin-installer/resources/slide/Desktop/zh_HK/8-图文识别.png
|
||||
17ee483b1e4131b261041d03602374f7 usr/share/deepin-installer/resources/slide/Desktop/zh_TW/2-生物认证.png
|
||||
eb749f020c8316ddf7b571f4e29dfa58 usr/share/deepin-installer/resources/slide/Desktop/zh_TW/3-浏览器.png
|
||||
41f8ee547c812c7efc25d9c4e10c1d9e usr/share/deepin-installer/resources/slide/Desktop/zh_TW/4-邮箱.png
|
||||
74423373d1441467bd2f725414b34d0e usr/share/deepin-installer/resources/slide/Desktop/zh_TW/6-应用商店.png
|
||||
43a442b94b562b7f0b3603562ae3e1cc usr/share/deepin-installer/resources/slide/Desktop/zh_TW/7-全局搜索.png
|
||||
ef908c17b226630f2e3fd36479f1d5c5 usr/share/deepin-installer/resources/slide/Desktop/zh_TW/8-图文识别.png
|
||||
a2cffdfa0bd437eb86706dae0b0d0835 usr/share/deepin-installer/resources/slide/Device/default/01.png
|
||||
555a116be20c73830b1d056c48df9ccf usr/share/deepin-installer/resources/slide/Device/default/02.png
|
||||
a2705cac4c90e3ec2faf72d2320c1e0c usr/share/deepin-installer/resources/slide/Device/default/03.png
|
||||
677fb358dc978fca0425289c5b8cd397 usr/share/deepin-installer/resources/slide/Device/default/04.png
|
||||
d9ad82270a5f0b76e03aec0f0728275a usr/share/deepin-installer/resources/slide/Personal/bo_CN/01-桌面环境.png
|
||||
903abb5e0d782a7cdff214894ff6d077 usr/share/deepin-installer/resources/slide/Personal/bo_CN/02-文件管理器.png
|
||||
47f49fdc153435a4d53a294e37dbd7a8 usr/share/deepin-installer/resources/slide/Personal/bo_CN/03-商店.png
|
||||
33f9bbc74f411c31149963d24224f145 usr/share/deepin-installer/resources/slide/Personal/bo_CN/04-终端.png
|
||||
7a3a74c856b866c783ed9e259c9023d8 usr/share/deepin-installer/resources/slide/Personal/bo_CN/05-联系人.png
|
||||
3cdf3a4079f8a1669c414a41a1924feb usr/share/deepin-installer/resources/slide/Personal/bo_CN/06-截图录屏.png
|
||||
2243df52302099c06c625ec55c72994a usr/share/deepin-installer/resources/slide/Personal/bo_CN/07-音乐影院.png
|
||||
a4606e8d4d30635fe4c32fbf83de2ec8 usr/share/deepin-installer/resources/slide/Personal/bo_CN/08-看图.png
|
||||
8eb262a8ac7343177a1edb52b1eebab5 usr/share/deepin-installer/resources/slide/Personal/bo_CN/09-浏览器.png
|
||||
ed03cf2f1fbe5e972a0ef9dc449eb764 usr/share/deepin-installer/resources/slide/Personal/bo_CN/10-实用工具.png
|
||||
c6a2c83167fac94fac3bd4aac08d1657 usr/share/deepin-installer/resources/slide/Personal/bo_CN/11-壁纸轮换.png
|
||||
5d1e3e518c36c08f330ed954470acc2c usr/share/deepin-installer/resources/slide/Personal/bo_CN/12-安全更新.png
|
||||
d8b88998adc6c74cf960276b74fe842e usr/share/deepin-installer/resources/slide/Personal/bo_CN/14-邮箱.png
|
||||
c5d5a897d5bab2bf7c84bc3b82291bbd usr/share/deepin-installer/resources/slide/Personal/bo_CN/15-安全中心.png
|
||||
79f444dad935d79c46dc8963076d0db7 usr/share/deepin-installer/resources/slide/Personal/default/01-桌面环境.png
|
||||
36467ab82c51c18afb99e0e9cea7dccc usr/share/deepin-installer/resources/slide/Personal/default/02-文件管理器.png
|
||||
3d9439562844e83a87d3b6d3e709a171 usr/share/deepin-installer/resources/slide/Personal/default/03-商店.png
|
||||
9a4fea2c273b3cd0854299cd72c7a4b1 usr/share/deepin-installer/resources/slide/Personal/default/04-终端.png
|
||||
f5f7d00af7f0e6411bf64c19e803e365 usr/share/deepin-installer/resources/slide/Personal/default/05-联系人.png
|
||||
2978a37a836a2f10339a35b257027fc5 usr/share/deepin-installer/resources/slide/Personal/default/06-截图录屏.png
|
||||
d9408de1747874320c652bcaecf127be usr/share/deepin-installer/resources/slide/Personal/default/07-音乐影院.png
|
||||
a2d0142aaeb878c3cc3f994d1b0525a9 usr/share/deepin-installer/resources/slide/Personal/default/08-看图.png
|
||||
511ca1b2fdbcc3bbec75fefcb330d35c usr/share/deepin-installer/resources/slide/Personal/default/09-浏览器.png
|
||||
31ba4ccc260bddfdfe0d46565a55d8ef usr/share/deepin-installer/resources/slide/Personal/default/10-实用工具.png
|
||||
bc9973e0cce5cb1fbe302cec201a3ecb usr/share/deepin-installer/resources/slide/Personal/default/11-壁纸轮换.png
|
||||
d5babab7a7045d2fc5c5c822c4484f30 usr/share/deepin-installer/resources/slide/Personal/default/12-安全更新.png
|
||||
e3a6890625d0fb0496fb19b6093931cd usr/share/deepin-installer/resources/slide/Personal/default/14-邮箱.png
|
||||
b0e74c804700ba69a0fbcfd4181d2552 usr/share/deepin-installer/resources/slide/Personal/default/15-安全中心.png
|
||||
79f444dad935d79c46dc8963076d0db7 usr/share/deepin-installer/resources/slide/Personal/en_US/01-桌面环境.png
|
||||
36467ab82c51c18afb99e0e9cea7dccc usr/share/deepin-installer/resources/slide/Personal/en_US/02-文件管理器.png
|
||||
3d9439562844e83a87d3b6d3e709a171 usr/share/deepin-installer/resources/slide/Personal/en_US/03-商店.png
|
||||
9a4fea2c273b3cd0854299cd72c7a4b1 usr/share/deepin-installer/resources/slide/Personal/en_US/04-终端.png
|
||||
f5f7d00af7f0e6411bf64c19e803e365 usr/share/deepin-installer/resources/slide/Personal/en_US/05-联系人.png
|
||||
2978a37a836a2f10339a35b257027fc5 usr/share/deepin-installer/resources/slide/Personal/en_US/06-截图录屏.png
|
||||
d9408de1747874320c652bcaecf127be usr/share/deepin-installer/resources/slide/Personal/en_US/07-音乐影院.png
|
||||
a2d0142aaeb878c3cc3f994d1b0525a9 usr/share/deepin-installer/resources/slide/Personal/en_US/08-看图.png
|
||||
511ca1b2fdbcc3bbec75fefcb330d35c usr/share/deepin-installer/resources/slide/Personal/en_US/09-浏览器.png
|
||||
31ba4ccc260bddfdfe0d46565a55d8ef usr/share/deepin-installer/resources/slide/Personal/en_US/10-实用工具.png
|
||||
bc9973e0cce5cb1fbe302cec201a3ecb usr/share/deepin-installer/resources/slide/Personal/en_US/11-壁纸轮换.png
|
||||
d5babab7a7045d2fc5c5c822c4484f30 usr/share/deepin-installer/resources/slide/Personal/en_US/12-安全更新.png
|
||||
e3a6890625d0fb0496fb19b6093931cd usr/share/deepin-installer/resources/slide/Personal/en_US/14-邮箱.png
|
||||
b0e74c804700ba69a0fbcfd4181d2552 usr/share/deepin-installer/resources/slide/Personal/en_US/15-安全中心.png
|
||||
d9ad82270a5f0b76e03aec0f0728275a usr/share/deepin-installer/resources/slide/Personal/ug_CN/01-桌面环境.png
|
||||
903abb5e0d782a7cdff214894ff6d077 usr/share/deepin-installer/resources/slide/Personal/ug_CN/02-文件管理器.png
|
||||
47f49fdc153435a4d53a294e37dbd7a8 usr/share/deepin-installer/resources/slide/Personal/ug_CN/03-商店.png
|
||||
33f9bbc74f411c31149963d24224f145 usr/share/deepin-installer/resources/slide/Personal/ug_CN/04-终端.png
|
||||
7a3a74c856b866c783ed9e259c9023d8 usr/share/deepin-installer/resources/slide/Personal/ug_CN/05-联系人.png
|
||||
3cdf3a4079f8a1669c414a41a1924feb usr/share/deepin-installer/resources/slide/Personal/ug_CN/06-截图录屏.png
|
||||
2243df52302099c06c625ec55c72994a usr/share/deepin-installer/resources/slide/Personal/ug_CN/07-音乐影院.png
|
||||
a4606e8d4d30635fe4c32fbf83de2ec8 usr/share/deepin-installer/resources/slide/Personal/ug_CN/08-看图.png
|
||||
8eb262a8ac7343177a1edb52b1eebab5 usr/share/deepin-installer/resources/slide/Personal/ug_CN/09-浏览器.png
|
||||
ed03cf2f1fbe5e972a0ef9dc449eb764 usr/share/deepin-installer/resources/slide/Personal/ug_CN/10-实用工具.png
|
||||
c6a2c83167fac94fac3bd4aac08d1657 usr/share/deepin-installer/resources/slide/Personal/ug_CN/11-壁纸轮换.png
|
||||
5d1e3e518c36c08f330ed954470acc2c usr/share/deepin-installer/resources/slide/Personal/ug_CN/12-安全更新.png
|
||||
d8b88998adc6c74cf960276b74fe842e usr/share/deepin-installer/resources/slide/Personal/ug_CN/14-邮箱.png
|
||||
c5d5a897d5bab2bf7c84bc3b82291bbd usr/share/deepin-installer/resources/slide/Personal/ug_CN/15-安全中心.png
|
||||
d9ad82270a5f0b76e03aec0f0728275a usr/share/deepin-installer/resources/slide/Personal/zh_CN/01-桌面环境.png
|
||||
903abb5e0d782a7cdff214894ff6d077 usr/share/deepin-installer/resources/slide/Personal/zh_CN/02-文件管理器.png
|
||||
47f49fdc153435a4d53a294e37dbd7a8 usr/share/deepin-installer/resources/slide/Personal/zh_CN/03-商店.png
|
||||
33f9bbc74f411c31149963d24224f145 usr/share/deepin-installer/resources/slide/Personal/zh_CN/04-终端.png
|
||||
7a3a74c856b866c783ed9e259c9023d8 usr/share/deepin-installer/resources/slide/Personal/zh_CN/05-联系人.png
|
||||
3cdf3a4079f8a1669c414a41a1924feb usr/share/deepin-installer/resources/slide/Personal/zh_CN/06-截图录屏.png
|
||||
2243df52302099c06c625ec55c72994a usr/share/deepin-installer/resources/slide/Personal/zh_CN/07-音乐影院.png
|
||||
a4606e8d4d30635fe4c32fbf83de2ec8 usr/share/deepin-installer/resources/slide/Personal/zh_CN/08-看图.png
|
||||
8eb262a8ac7343177a1edb52b1eebab5 usr/share/deepin-installer/resources/slide/Personal/zh_CN/09-浏览器.png
|
||||
ed03cf2f1fbe5e972a0ef9dc449eb764 usr/share/deepin-installer/resources/slide/Personal/zh_CN/10-实用工具.png
|
||||
c6a2c83167fac94fac3bd4aac08d1657 usr/share/deepin-installer/resources/slide/Personal/zh_CN/11-壁纸轮换.png
|
||||
5d1e3e518c36c08f330ed954470acc2c usr/share/deepin-installer/resources/slide/Personal/zh_CN/12-安全更新.png
|
||||
d8b88998adc6c74cf960276b74fe842e usr/share/deepin-installer/resources/slide/Personal/zh_CN/14-邮箱.png
|
||||
c5d5a897d5bab2bf7c84bc3b82291bbd usr/share/deepin-installer/resources/slide/Personal/zh_CN/15-安全中心.png
|
||||
7c1343530da9c0bbe3af351fcfa5693c usr/share/deepin-installer/resources/slide/Personal/zh_HK/01-桌面环境.png
|
||||
36eea615abc76979d19512805e5f0c4e usr/share/deepin-installer/resources/slide/Personal/zh_HK/02-文件管理器.png
|
||||
eef2dda6646d734c74c5cd89caca15dd usr/share/deepin-installer/resources/slide/Personal/zh_HK/03-商店.png
|
||||
6157381e38084bec2e7d206663a0cb81 usr/share/deepin-installer/resources/slide/Personal/zh_HK/04-终端.png
|
||||
7c28917459238d8042ab4e8e42aa5ddc usr/share/deepin-installer/resources/slide/Personal/zh_HK/05-联系人.png
|
||||
a2adf04c22aac1f767570f57b520c016 usr/share/deepin-installer/resources/slide/Personal/zh_HK/06-截图录屏.png
|
||||
d3d586c750e0d980dc1a7d653c19af23 usr/share/deepin-installer/resources/slide/Personal/zh_HK/07-音乐影院.png
|
||||
3217f93661925f14bea1115991aeb98a usr/share/deepin-installer/resources/slide/Personal/zh_HK/08-看图.png
|
||||
1975b6cd57f05bd11205e3137b3edc29 usr/share/deepin-installer/resources/slide/Personal/zh_HK/08-看图相册.png
|
||||
0e4b3270485cc99ce06da96d1afd2e1f usr/share/deepin-installer/resources/slide/Personal/zh_HK/09-浏览器.png
|
||||
30e2f3f249fa03204ade7fc12986b332 usr/share/deepin-installer/resources/slide/Personal/zh_HK/10-实用工具.png
|
||||
2dab82de46df7ef439cdd3a882c83ad1 usr/share/deepin-installer/resources/slide/Personal/zh_HK/11-壁纸轮换.png
|
||||
3f40da5ad2fb4c86d92818364b16d249 usr/share/deepin-installer/resources/slide/Personal/zh_HK/12-安全更新.png
|
||||
4df2414f5f4efe47f9c453bc08c4f24e usr/share/deepin-installer/resources/slide/Personal/zh_HK/14-邮箱.png
|
||||
e3400a3608a00d24242a435bd2d33a39 usr/share/deepin-installer/resources/slide/Personal/zh_HK/15-安全中心.png
|
||||
7c1343530da9c0bbe3af351fcfa5693c usr/share/deepin-installer/resources/slide/Personal/zh_TW/01-桌面环境.png
|
||||
36eea615abc76979d19512805e5f0c4e usr/share/deepin-installer/resources/slide/Personal/zh_TW/02-文件管理器.png
|
||||
eef2dda6646d734c74c5cd89caca15dd usr/share/deepin-installer/resources/slide/Personal/zh_TW/03-商店.png
|
||||
6157381e38084bec2e7d206663a0cb81 usr/share/deepin-installer/resources/slide/Personal/zh_TW/04-终端.png
|
||||
7c28917459238d8042ab4e8e42aa5ddc usr/share/deepin-installer/resources/slide/Personal/zh_TW/05-联系人.png
|
||||
a2adf04c22aac1f767570f57b520c016 usr/share/deepin-installer/resources/slide/Personal/zh_TW/06-截图录屏.png
|
||||
d3d586c750e0d980dc1a7d653c19af23 usr/share/deepin-installer/resources/slide/Personal/zh_TW/07-音乐影院.png
|
||||
3217f93661925f14bea1115991aeb98a usr/share/deepin-installer/resources/slide/Personal/zh_TW/08-看图.png
|
||||
1975b6cd57f05bd11205e3137b3edc29 usr/share/deepin-installer/resources/slide/Personal/zh_TW/08-看图相册.png
|
||||
0e4b3270485cc99ce06da96d1afd2e1f usr/share/deepin-installer/resources/slide/Personal/zh_TW/09-浏览器.png
|
||||
30e2f3f249fa03204ade7fc12986b332 usr/share/deepin-installer/resources/slide/Personal/zh_TW/10-实用工具.png
|
||||
2dab82de46df7ef439cdd3a882c83ad1 usr/share/deepin-installer/resources/slide/Personal/zh_TW/11-壁纸轮换.png
|
||||
3f40da5ad2fb4c86d92818364b16d249 usr/share/deepin-installer/resources/slide/Personal/zh_TW/12-安全更新.png
|
||||
4df2414f5f4efe47f9c453bc08c4f24e usr/share/deepin-installer/resources/slide/Personal/zh_TW/14-邮箱.png
|
||||
e3400a3608a00d24242a435bd2d33a39 usr/share/deepin-installer/resources/slide/Personal/zh_TW/15-安全中心.png
|
||||
4ab8aa25e1306b7f4118c0a412ecf3fe usr/share/deepin-installer/resources/slide/Professional/bo_CN/01-硬件平台.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Professional/bo_CN/02-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Professional/bo_CN/03-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Professional/bo_CN/04-邮箱.png
|
||||
98c23aeb77b58f3a0f4713a813e9e1c2 usr/share/deepin-installer/resources/slide/Professional/bo_CN/05-联系人.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Professional/bo_CN/06-应用商店.png
|
||||
cd076e963e1fcce46891569b78af3b20 usr/share/deepin-installer/resources/slide/Professional/bo_CN/07-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Professional/bo_CN/08-图文识别.png
|
||||
fe2557ef2b7f74d329e0e85b9d915cf4 usr/share/deepin-installer/resources/slide/Professional/bo_CN/09-安全中心.png
|
||||
b9fb2fbf14c1c7b2b96cbd98e96be5f6 usr/share/deepin-installer/resources/slide/Professional/bo_CN/10-安全更新.png
|
||||
7622fec95e7af06310f8880b6c2b2eca usr/share/deepin-installer/resources/slide/Professional/default/01-硬件平台.png
|
||||
1a5f8d13bef18bcb171a0ec08d1e82fb usr/share/deepin-installer/resources/slide/Professional/default/02-生物认证.png
|
||||
26c0bcc2e12a6efa371402d64c7ac961 usr/share/deepin-installer/resources/slide/Professional/default/03-浏览器.png
|
||||
d7a7026b2dc1c0a22aff2f39c217b0d4 usr/share/deepin-installer/resources/slide/Professional/default/04-邮箱.png
|
||||
8e833f1b72e6556b1e6c376ee6b348c6 usr/share/deepin-installer/resources/slide/Professional/default/05-联系人.png
|
||||
67119be3e0373a3379b269615bdc47cc usr/share/deepin-installer/resources/slide/Professional/default/06-应用商店.png
|
||||
14aa9dda735e65d22418825da2cffaa0 usr/share/deepin-installer/resources/slide/Professional/default/07-全局搜索.png
|
||||
bf1ee5629df7efd0ad070a847de9efb5 usr/share/deepin-installer/resources/slide/Professional/default/08-图文识别.png
|
||||
3d32f339c95f033b8f3c4b6eae9150dd usr/share/deepin-installer/resources/slide/Professional/default/09-安全中心.png
|
||||
a7e6d5fbfb31902dad2d269b48767c00 usr/share/deepin-installer/resources/slide/Professional/default/10-安全更新.png
|
||||
7622fec95e7af06310f8880b6c2b2eca usr/share/deepin-installer/resources/slide/Professional/en_US/01-硬件平台.png
|
||||
1a5f8d13bef18bcb171a0ec08d1e82fb usr/share/deepin-installer/resources/slide/Professional/en_US/02-生物认证.png
|
||||
26c0bcc2e12a6efa371402d64c7ac961 usr/share/deepin-installer/resources/slide/Professional/en_US/03-浏览器.png
|
||||
d7a7026b2dc1c0a22aff2f39c217b0d4 usr/share/deepin-installer/resources/slide/Professional/en_US/04-邮箱.png
|
||||
8e833f1b72e6556b1e6c376ee6b348c6 usr/share/deepin-installer/resources/slide/Professional/en_US/05-联系人.png
|
||||
67119be3e0373a3379b269615bdc47cc usr/share/deepin-installer/resources/slide/Professional/en_US/06-应用商店.png
|
||||
14aa9dda735e65d22418825da2cffaa0 usr/share/deepin-installer/resources/slide/Professional/en_US/07-全局搜索.png
|
||||
bf1ee5629df7efd0ad070a847de9efb5 usr/share/deepin-installer/resources/slide/Professional/en_US/08-图文识别.png
|
||||
3d32f339c95f033b8f3c4b6eae9150dd usr/share/deepin-installer/resources/slide/Professional/en_US/09-安全中心.png
|
||||
a7e6d5fbfb31902dad2d269b48767c00 usr/share/deepin-installer/resources/slide/Professional/en_US/10-安全更新.png
|
||||
4ab8aa25e1306b7f4118c0a412ecf3fe usr/share/deepin-installer/resources/slide/Professional/ug_CN/01-硬件平台.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Professional/ug_CN/02-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Professional/ug_CN/03-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Professional/ug_CN/04-邮箱.png
|
||||
98c23aeb77b58f3a0f4713a813e9e1c2 usr/share/deepin-installer/resources/slide/Professional/ug_CN/05-联系人.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Professional/ug_CN/06-应用商店.png
|
||||
cd076e963e1fcce46891569b78af3b20 usr/share/deepin-installer/resources/slide/Professional/ug_CN/07-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Professional/ug_CN/08-图文识别.png
|
||||
fe2557ef2b7f74d329e0e85b9d915cf4 usr/share/deepin-installer/resources/slide/Professional/ug_CN/09-安全中心.png
|
||||
b9fb2fbf14c1c7b2b96cbd98e96be5f6 usr/share/deepin-installer/resources/slide/Professional/ug_CN/10-安全更新.png
|
||||
4ab8aa25e1306b7f4118c0a412ecf3fe usr/share/deepin-installer/resources/slide/Professional/zh_CN/01-硬件平台.png
|
||||
078e1dfb834ff1cc109bd17c82474b6c usr/share/deepin-installer/resources/slide/Professional/zh_CN/02-生物认证.png
|
||||
fe9c98a17b193375c5fafe6374e3c096 usr/share/deepin-installer/resources/slide/Professional/zh_CN/03-浏览器.png
|
||||
7f3496149e0cbfc6a2d972c3f7284600 usr/share/deepin-installer/resources/slide/Professional/zh_CN/04-邮箱.png
|
||||
98c23aeb77b58f3a0f4713a813e9e1c2 usr/share/deepin-installer/resources/slide/Professional/zh_CN/05-联系人.png
|
||||
c22be6d44a81d538286babcd924a1a16 usr/share/deepin-installer/resources/slide/Professional/zh_CN/06-应用商店.png
|
||||
cd076e963e1fcce46891569b78af3b20 usr/share/deepin-installer/resources/slide/Professional/zh_CN/07-全局搜索.png
|
||||
4203e8bf70473e6a84acc87de1e63ea1 usr/share/deepin-installer/resources/slide/Professional/zh_CN/08-图文识别.png
|
||||
fe2557ef2b7f74d329e0e85b9d915cf4 usr/share/deepin-installer/resources/slide/Professional/zh_CN/09-安全中心.png
|
||||
b9fb2fbf14c1c7b2b96cbd98e96be5f6 usr/share/deepin-installer/resources/slide/Professional/zh_CN/10-安全更新.png
|
||||
5e36b7f6c06c1970bb72ccec530a61fe usr/share/deepin-installer/resources/slide/Professional/zh_HK/01-硬件平台.png
|
||||
17ee483b1e4131b261041d03602374f7 usr/share/deepin-installer/resources/slide/Professional/zh_HK/02-生物认证.png
|
||||
eb749f020c8316ddf7b571f4e29dfa58 usr/share/deepin-installer/resources/slide/Professional/zh_HK/03-浏览器.png
|
||||
41f8ee547c812c7efc25d9c4e10c1d9e usr/share/deepin-installer/resources/slide/Professional/zh_HK/04-邮箱.png
|
||||
f5337fad76351f6c2afe133d1e4d43ba usr/share/deepin-installer/resources/slide/Professional/zh_HK/05-联系人.png
|
||||
74423373d1441467bd2f725414b34d0e usr/share/deepin-installer/resources/slide/Professional/zh_HK/06-应用商店.png
|
||||
d74992a08c9303925e00ed7844356b2e usr/share/deepin-installer/resources/slide/Professional/zh_HK/07-全局搜索.png
|
||||
ef908c17b226630f2e3fd36479f1d5c5 usr/share/deepin-installer/resources/slide/Professional/zh_HK/08-图文识别.png
|
||||
f3ea1b80bcb41c071eb39fe6763194e3 usr/share/deepin-installer/resources/slide/Professional/zh_HK/09-安全中心.png
|
||||
9ee23c417b9412b4035472c2e66f946b usr/share/deepin-installer/resources/slide/Professional/zh_HK/10-安全更新.png
|
||||
5e36b7f6c06c1970bb72ccec530a61fe usr/share/deepin-installer/resources/slide/Professional/zh_TW/01-硬件平台.png
|
||||
17ee483b1e4131b261041d03602374f7 usr/share/deepin-installer/resources/slide/Professional/zh_TW/02-生物认证.png
|
||||
eb749f020c8316ddf7b571f4e29dfa58 usr/share/deepin-installer/resources/slide/Professional/zh_TW/03-浏览器.png
|
||||
41f8ee547c812c7efc25d9c4e10c1d9e usr/share/deepin-installer/resources/slide/Professional/zh_TW/04-邮箱.png
|
||||
f5337fad76351f6c2afe133d1e4d43ba usr/share/deepin-installer/resources/slide/Professional/zh_TW/05-联系人.png
|
||||
74423373d1441467bd2f725414b34d0e usr/share/deepin-installer/resources/slide/Professional/zh_TW/06-应用商店.png
|
||||
d74992a08c9303925e00ed7844356b2e usr/share/deepin-installer/resources/slide/Professional/zh_TW/07-全局搜索.png
|
||||
ef908c17b226630f2e3fd36479f1d5c5 usr/share/deepin-installer/resources/slide/Professional/zh_TW/08-图文识别.png
|
||||
f3ea1b80bcb41c071eb39fe6763194e3 usr/share/deepin-installer/resources/slide/Professional/zh_TW/09-安全中心.png
|
||||
9ee23c417b9412b4035472c2e66f946b usr/share/deepin-installer/resources/slide/Professional/zh_TW/10-安全更新.png
|
||||
e70875d1f5d6cdb076548f05017fa046 usr/share/deepin-installer/resources/timezone_alias
|
||||
6791882f1a30e6b4f9965263b824c51e usr/share/deepin-installer/tools/blur_image.sh
|
||||
1ca68e2d0fea4976348c08c8bebce852 usr/share/deepin-installer/tools/generate_backward_timezone.py
|
||||
3e3178a24d6ab9407e0c27d3527842f3 usr/share/deepin-installer/tools/generate_qrc.py
|
||||
ea26e4e864c70e6dc6e47bb1a18b3cc1 usr/share/deepin-installer/tools/install_deps.sh
|
||||
86bec74607ac3acd756bc498b157054e usr/share/deepin-installer/tools/language_list_csv_to_json.py
|
||||
78a80ecb9268119edcd260271ca5a8ef usr/share/deepin-installer/tools/pretty_log.sh
|
||||
ea9fa983715e1136206e2cf8646fe000 usr/share/deepin-installer/tools/regenerate_oem_iso.sh
|
||||
7424273f2a344089571035500d376135 usr/share/deepin-installer/tools/replace_dash_with_underscore.py
|
||||
81c11014292fe5f0290be2375b3ae833 usr/share/deepin-installer/tools/scale_slide_images.sh
|
||||
4eae2f3a30abb642c232d5bae5385b67 usr/share/deepin-installer/tools/scan_regdomain.sh
|
||||
249c04e19d8f77c057037573839ed1db usr/share/deepin-installer/tools/start_deepin_repair_tools.sh
|
||||
46da3522d922455034e44985346593b2 usr/share/deepin-installer/tools/sync_repo.sh
|
||||
7d7879e4f55e1de5941540307b502ab6 usr/share/deepin-installer/tools/update_default_settings.py
|
||||
fe5429f193aa96c7351a55c5d075fa36 usr/share/doc/deepin-installer/changelog.Debian.gz
|
||||
71b109f13b6ac641dbab8a24415ba2a9 usr/share/doc/deepin-installer/changelog.gz
|
||||
251c59ac0ec71a5be068ec099f3a6a26 usr/share/doc/deepin-installer/copyright
|
||||
4f95a572929f2662146600f3c82dc4f6 usr/share/doc/deepin-installer/docs/deepin-installer-first-boot.md
|
||||
2222471a8c3589885f3a4255bd4ec33f usr/share/doc/deepin-installer/docs/deepin-installer.conf.md
|
||||
e016ae0b4229ec75719d8d7f61c86d5a usr/share/doc/deepin-installer/docs/deepin-installer.md
|
||||
fe046cca2ef8bf6e3a6b97d46fd0b284 usr/share/doc/deepin-installer/docs/hooks.md
|
||||
f9da45851a564c8cab9177ac1d9a9646 usr/share/doc/deepin-installer/docs/i18n.md
|
||||
8460d4a95720a35486cdf6c7a8b33134 usr/share/doc/deepin-installer/docs/lightdm.md
|
||||
d91cea51ab1efa3321b2ab71e20cb4e5 usr/share/doc/deepin-installer/docs/oem.md.gz
|
||||
45629e0d0ed1575d23477a1c7d6ddb5e usr/share/doc/deepin-installer/docs/partition.faq.md
|
||||
e4f3574815fb9385069a4b28182efd78 usr/share/doc/deepin-installer/docs/partition.md.gz
|
||||
09d4e60fbb2db5e1829de9c747d9c11f usr/share/doc/deepin-installer/docs/slide.md
|
||||
27537bfe1a29211109a23282f2d6f14b usr/share/doc/deepin-installer/docs/sw.md
|
||||
6e6eade27ef064713b0c9353a5fde2a4 usr/share/doc/deepin-installer/docs/timezone.md
|
||||
e9cfe984fb3e3922e95d222caf9065a7 usr/share/doc/deepin-installer/docs/uefi.md
|
||||
9c1bc5c16a377442e288d42e264f6dd3 usr/share/doc/deepin-installer/docs/ui.md
|
||||
e5616c62c9831ea88899cd9b0924f3f8 usr/share/doc/deepin-installer/docs/wifi_regulatory_domain.md
|
||||
7dbc8d6a0a9229d532ef41d5d3edb6c0 usr/share/icons/hicolor/scalable/apps/deepin-installer-oem.svg
|
||||
7dbc8d6a0a9229d532ef41d5d3edb6c0 usr/share/icons/hicolor/scalable/apps/deepin-installer.svg
|
||||
629389c592c7ce2d6c7503bb864ceda6 usr/share/man/man1/deepin-installer-bases.1.gz
|
||||
33ed5f079951992523aef0b78e2b8ae7 usr/share/man/man1/deepin-installer-both.1.gz
|
||||
4b9108c4356b44c4fe3f115563568e1f usr/share/man/man1/deepin-installer-cli-install.1.gz
|
||||
1cd3d89d5bc79a477ba9335a3ee359cf usr/share/man/man1/deepin-installer-cli.1.gz
|
||||
de8e588b7cac9424ff72753f61c49b36 usr/share/man/man1/deepin-installer-first-boot-pkexec.1.gz
|
||||
bb1ac1cb00ef47be52ad371927a45f90 usr/share/man/man1/deepin-installer-first-boot.1.gz
|
||||
0594cb0788b1c2dbc088df662c9e60dc usr/share/man/man1/deepin-installer-init.1.gz
|
||||
77690f5ee8fd5805821f8f51e6698741 usr/share/man/man1/deepin-installer-pkexec.1.gz
|
||||
7f012042e6c675cae800bccf63659ed8 usr/share/man/man1/deepin-installer-settings.1.gz
|
||||
86170a40a99835f73dcc8bd6ccdd3ed3 usr/share/man/man1/deepin-installer-simpleini.1.gz
|
||||
0594cb0788b1c2dbc088df662c9e60dc usr/share/man/man1/deepin-installer.1.gz
|
||||
da365418dabc608531737e9c8a0a638f usr/share/man/man1/deepin-livecd-relaunch.1.gz
|
||||
d0bfe696547f7c2de594c862624d5869 usr/share/polkit-1/actions/com.deepin.pkexec.installer-first-boot.policy
|
||||
a6f641e9be0b684b12780c9ad744d681 usr/share/polkit-1/actions/com.deepin.pkexec.installer.policy
|
||||
22ac1608a35fe8bd360a821cc0dd49fa usr/share/xgreeters/lightdm-installer-greeter.desktop
|
|
@ -0,0 +1,109 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
# Copyright (c) 2016 Deepin Ltd. All rights reserved.
|
||||
# Use of this source is governed by General Public License that can be found
|
||||
# in the LICENSE file.
|
||||
|
||||
# Generate background image of installer with blur effect.
|
||||
# Enable all locales defined in language list.
|
||||
|
||||
# NOTE(xushaohua): This script is used to speed up installer program.
|
||||
# Also it is ok to generate blur-image when installer program starts up,
|
||||
# it takes some seconds to minutes to finish this job.
|
||||
# Call service/system_language::GenerateLocale() in SystemLanguageFrame
|
||||
# may also update system locale based on using settings, it is not so fluent
|
||||
# before switching to SystemInfoFrame.
|
||||
|
||||
# Absolute path to installer misc folder.
|
||||
SHARE_DIR=/usr/share/deepin-installer
|
||||
|
||||
# Update /etc/locale.gen and generate new locale cache.
|
||||
# Or else neither timezone page nor keyboard layout page work well with
|
||||
# gettext.
|
||||
# Only enable en_US and zh_CN on non-x86 platform.
|
||||
generate_locale() {
|
||||
local JSON="${SHARE_DIR}/resources/languages.json"
|
||||
local LOCALES="$(grep 'locale' "${JSON}" | awk '{ print $2 }' | \
|
||||
sed 's/"//g' | sed 's/,//g')"
|
||||
echo "locales: ${LOCALES}"
|
||||
for LOCALE_NAME in $(echo "${LOCALES}"); do
|
||||
sed -i "s/# \(${LOCALE_NAME}\.UTF-8.*$\)/\1/g" /etc/locale.gen
|
||||
done
|
||||
|
||||
locale-gen
|
||||
|
||||
}
|
||||
|
||||
generate_extral_locales() {
|
||||
localedef --no-archive -i zh_CN -c -f GB2312 -A /usr/share/locale/locale.alias zh_CN
|
||||
localedef --no-archive -i zh_CN -c -f GB18030 -A /usr/share/locale/locale.alias zh_CN.GB18030
|
||||
localedef --no-archive -i zh_CN -c -f GBK -A /usr/share/locale/locale.alias zh_CN.GBK
|
||||
}
|
||||
|
||||
# Bluring image from $1 to $2
|
||||
blur_image() {
|
||||
local SRC=$1
|
||||
local DST=$2
|
||||
local TMP=/tmp/installer-$(date +%s)-$(basename "${SRC}")
|
||||
|
||||
if which image-worsener >/dev/null; then
|
||||
image-worsener -crop -x1/4 ${SRC} ${TMP} && \
|
||||
image-worsener -blur 40 -filter gaussian ${TMP} ${TMP} && \
|
||||
image-worsener -crop -x4/1 ${TMP} ${TMP}
|
||||
elif which convert >/dev/null; then
|
||||
convert "${SRC}" -resize 25% -brightness-contrast -10 \
|
||||
-modulate 100,120,100 -blur 0x16 -resize 400% "${TMP}"
|
||||
else
|
||||
echo "Please install imagemaic or image-worsener to blur image" >&2
|
||||
fi
|
||||
|
||||
[ -f "${DST}" ] && mv -f "${TMP}" "${DST}"
|
||||
}
|
||||
|
||||
# Generate new background image.
|
||||
generate_background_image() {
|
||||
local SRC="/usr/share/backgrounds/default_background.jpg"
|
||||
local TMP_SRC="/tmp/installer_default_background.jpg"
|
||||
local DST="${SHARE_DIR}/resources/default_wallpaper.jpg"
|
||||
|
||||
if [ -f "${TMP_SRC}" ]; then
|
||||
# Copy pre-generated background image.
|
||||
install -Dm644 "${TMP_SRC}" "${DST}"
|
||||
elif [ -f "${SRC}" ]; then
|
||||
echo "Generate default wallpaper.."
|
||||
blur_image "${SRC}" "${DST}"
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
generate_locale
|
||||
generate_extral_locales
|
||||
generate_background_image
|
||||
# Update initramfs to include current boot scripts.
|
||||
update-initramfs -u
|
||||
;;
|
||||
esac
|
||||
|
||||
# Automatically added by dh_systemd_enable/13.3.3~bpo10+1
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
||||
# This will only remove masks created by d-s-h on package removal.
|
||||
deb-systemd-helper unmask 'deepin-installer.service' >/dev/null || true
|
||||
|
||||
# was-enabled defaults to true, so new installations run enable.
|
||||
if deb-systemd-helper --quiet was-enabled 'deepin-installer.service'; then
|
||||
# Enables the unit on first installation, creates new
|
||||
# symlinks on upgrades if the unit file has changed.
|
||||
deb-systemd-helper enable 'deepin-installer.service' >/dev/null || true
|
||||
else
|
||||
# Update the statefile to add new symlinks (if any), which need to be
|
||||
# cleaned up on purge. Also remove old symlinks.
|
||||
deb-systemd-helper update-state 'deepin-installer.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
||||
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
# Automatically added by dh_systemd_start/13.3.3~bpo10+1
|
||||
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
||||
systemctl --system daemon-reload >/dev/null || true
|
||||
fi
|
||||
# End automatically added section
|
||||
# Automatically added by dh_systemd_enable/13.3.3~bpo10+1
|
||||
if [ "$1" = "remove" ]; then
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper mask 'deepin-installer.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
if [ -x "/usr/bin/deb-systemd-helper" ]; then
|
||||
deb-systemd-helper purge 'deepin-installer.service' >/dev/null || true
|
||||
deb-systemd-helper unmask 'deepin-installer.service' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
# End automatically added section
|
|
@ -0,0 +1,3 @@
|
|||
LIVE_HOSTNAME="UOS"
|
||||
LIVE_USERNAME="uos"
|
||||
LIVE_USER_FULLNAME="UOS Live User"
|
|
@ -0,0 +1,200 @@
|
|||
#!/bin/sh
|
||||
|
||||
is_supported_fs ()
|
||||
{
|
||||
fstype="${1}"
|
||||
|
||||
# Validate input first
|
||||
if [ -z "${fstype}" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists
|
||||
if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ]
|
||||
then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ "${fstype}" = "ntfs" ]
|
||||
then
|
||||
# FIXME: deepin installer should handle ntfs fstype
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Try to look if it is already supported by the kernel
|
||||
if grep -q ${fstype} /proc/filesystems
|
||||
then
|
||||
return 0
|
||||
else
|
||||
# Then try to add support for it the gentle way using the initramfs capabilities
|
||||
modprobe -q -b ${fstype}
|
||||
if grep -q ${fstype} /proc/filesystems
|
||||
then
|
||||
return 0
|
||||
# Then try the hard way if /root is already reachable
|
||||
else
|
||||
kmodule="/root/lib/modules/`uname -r`/${fstype}/${fstype}.ko"
|
||||
if [ -e "${kmodule}" ]
|
||||
then
|
||||
insmod "${kmodule}"
|
||||
if grep -q ${fstype} /proc/filesystems
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
check_dev ()
|
||||
{
|
||||
local force fix
|
||||
sysdev="${1}"
|
||||
devname="${2}"
|
||||
skip_uuid_check="${3}"
|
||||
|
||||
if [ -z "${devname}" ]
|
||||
then
|
||||
devname=$(sys2dev "${sysdev}")
|
||||
fi
|
||||
|
||||
if [ -d "${devname}" ]
|
||||
then
|
||||
mount -o bind "${devname}" $mountpoint || continue
|
||||
|
||||
if is_live_path $mountpoint
|
||||
then
|
||||
echo $mountpoint
|
||||
return 0
|
||||
else
|
||||
umount $mountpoint
|
||||
fi
|
||||
fi
|
||||
|
||||
IFS=","
|
||||
for device in ${devname}
|
||||
do
|
||||
case "$device" in
|
||||
*mapper*)
|
||||
# Adding lvm support
|
||||
if [ -x /scripts/local-top/lvm2 ]
|
||||
then
|
||||
ROOT="$device" resume="" /scripts/local-top/lvm2 >>/boot.log
|
||||
fi
|
||||
;;
|
||||
|
||||
/dev/md*)
|
||||
# Adding raid support
|
||||
if [ -x /scripts/local-top/mdadm ]
|
||||
then
|
||||
[ -r /conf/conf.d/md ] && cp /conf/conf.d/md /conf/conf.d/md.orig
|
||||
echo "MD_DEVS=$device " >> /conf/conf.d/md
|
||||
/scripts/local-top/mdadm >>/boot.log
|
||||
[ -r /conf/conf.d/md.orig ] && mv /conf/conf.d/md.orig /conf/conf.d/md
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
unset IFS
|
||||
|
||||
[ -n "$device" ] && devname="$device"
|
||||
|
||||
[ -e "$devname" ] || continue
|
||||
|
||||
if [ -n "${LIVE_MEDIA_OFFSET}" ]
|
||||
then
|
||||
loopdevname=$(setup_loop "${devname}" "loop" "/sys/block/loop*" "${LIVE_MEDIA_OFFSET}" '')
|
||||
devname="${loopdevname}"
|
||||
fi
|
||||
|
||||
fstype=$(get_fstype "${devname}")
|
||||
|
||||
if is_supported_fs ${fstype}
|
||||
then
|
||||
devuid=$(blkid -o value -s UUID "$devname")
|
||||
[ -n "$devuid" ] && grep -qs "\<$devuid\>" /var/lib/live/boot/devices-already-tried-to-mount && continue
|
||||
|
||||
for _PARAMETER in ${LIVE_BOOT_CMDLINE}
|
||||
do
|
||||
case "${_PARAMETER}" in
|
||||
forcefsck)
|
||||
FORCEFSCK="true"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${PERSISTENCE_FSCK}" = "true" ] || [ "${PERSISTENCE_FSCK}" = "yes" ] || [ "${FORCEFSCK}" = "true" ]
|
||||
then
|
||||
force=""
|
||||
if [ "$FORCEFSCK" = "true" ]
|
||||
then
|
||||
force="-f"
|
||||
fi
|
||||
|
||||
fix="-a"
|
||||
if [ "$FSCKFIX" = "true" ] || [ "$FSCKFIX" = "yes" ]
|
||||
then
|
||||
fix="-y"
|
||||
fi
|
||||
|
||||
fsck $fix $force ${devname} >> fsck.log 2>&1
|
||||
fi
|
||||
|
||||
mount -t ${fstype} -o ro,noatime "${devname}" ${mountpoint} || continue
|
||||
[ -n "$devuid" ] && echo "$devuid" >> /var/lib/live/boot/devices-already-tried-to-mount
|
||||
|
||||
if [ -n "${FROMISO}" ]
|
||||
then
|
||||
if [ -f ${mountpoint}/${FROMISO} ]
|
||||
then
|
||||
umount ${mountpoint}
|
||||
mkdir -p /run/live/findiso
|
||||
for _p in $(cat /proc/cmdline);do
|
||||
case ${_p} in
|
||||
auto-deepin-installer|auto-installer)
|
||||
RWFLAG="rw"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ "${RWFLAG}" = "rw" ];then
|
||||
if [ "${fstype}" = "ntfs" ];then
|
||||
modprobe fuse
|
||||
# Remove windows hibernatioin files, or else ntfs-3g
|
||||
# will mount volume with read-only permission.
|
||||
#mount.ntfs-3g -o remove_hiberfile,rw "${devname}" /live/findiso
|
||||
mount.ntfs-3g -o rw "${devname}" /run/live/findiso
|
||||
else
|
||||
mount -t ${fstype} -o rw,noatime "${devname}" /run/live/findiso
|
||||
fi
|
||||
else
|
||||
mount -t ${fstype} -o ro,noatime "${devname}" /run/live/findiso
|
||||
fi
|
||||
loopdevname=$(setup_loop "/run/live/findiso/${FROMISO}" "loop" "/sys/block/loop*" 0 "")
|
||||
devname="${loopdevname}"
|
||||
mount -t iso9660 -o ro,noatime "${devname}" ${mountpoint}
|
||||
else
|
||||
umount ${mountpoint}
|
||||
fi
|
||||
fi
|
||||
|
||||
if is_live_path ${mountpoint} && \
|
||||
([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
|
||||
then
|
||||
echo ${mountpoint}
|
||||
return 0
|
||||
else
|
||||
umount ${mountpoint} 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "${LIVE_MEDIA_OFFSET}" ]
|
||||
then
|
||||
losetup -d "${loopdevname}"
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
#!/bin/sh
|
||||
|
||||
#set -e
|
||||
Netbase ()
|
||||
{
|
||||
_Nvidia
|
||||
_Netbase
|
||||
}
|
||||
|
||||
_Nvidia ()
|
||||
{
|
||||
for _PARAMETER in ${LIVE_BOOT_CMDLINE}
|
||||
do
|
||||
case "${_PARAMETER}" in
|
||||
live-boot.nvidia-install|nvidia-install)
|
||||
NVIDIA_INSTALL="true"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "${NVIDIA_INSTALL}" in
|
||||
true)
|
||||
;;
|
||||
|
||||
*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# apt-cdrom would fail otherwise
|
||||
if [ ! -s /root/lib/live/mount/medium/.disk/info ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
cat > "/root/etc/modprobe.d/nvidia-live.conf" << EOF
|
||||
# auto generate by deepin-installer with nvidia support
|
||||
blacklist nouveau
|
||||
blacklist lbm-nouveau
|
||||
|
||||
alias nouveau off
|
||||
alias lbm-nouveau off
|
||||
EOF
|
||||
|
||||
chroot /root dpkg-divert --rename --quiet --add /usr/sbin/update-initramfs
|
||||
cat > /root/usr/sbin/update-initramfs << EOF
|
||||
#!/bin/sh
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
chmod 0755 /chroot/usr/sbin/update-initramfs
|
||||
|
||||
: > /root/etc/apt/sources.list
|
||||
|
||||
for name in $(ls /root/lib/live/mount/medium/dists);do
|
||||
echo "deb [trusted=yes] file:/lib/live/mount/medium ${name} main" >> /root/etc/apt/sources.list
|
||||
done
|
||||
|
||||
mount -n -o bind /sys /root/sys
|
||||
mount -n -o bind /proc /root/proc
|
||||
mount -n -o bind /dev /root/dev
|
||||
chroot /root apt-get update
|
||||
chroot /root apt-get -y install --no-install-recommends nvidia-driver || true
|
||||
umount /root/dev
|
||||
umount /root/proc
|
||||
umount /root/sys
|
||||
}
|
||||
|
||||
_Netbase ()
|
||||
{
|
||||
if [ -n "${NONETWORKING}" ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
log_begin_msg "Preconfiguring networking"
|
||||
|
||||
IFFILE="/root/etc/network/interfaces"
|
||||
if [ -L /root/etc/resolv.conf ] ; then
|
||||
# assume we have resolvconf
|
||||
DNSFILE="/root/etc/resolvconf/resolv.conf.d/base"
|
||||
else
|
||||
DNSFILE="/root/etc/resolv.conf"
|
||||
fi
|
||||
|
||||
if [ "${STATICIP}" = "frommedia" ] && [ -e "${IFFILE}" ]
|
||||
then
|
||||
# will use existent /etc/network/interfaces
|
||||
log_end_msg
|
||||
return
|
||||
fi
|
||||
|
||||
cat > "${IFFILE}" << EOF
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
EOF
|
||||
|
||||
udevadm trigger
|
||||
udevadm settle
|
||||
|
||||
if [ -z "${NETBOOT}" ] && [ -n "${STATICIP}" ] && [ "${STATICIP}" != "frommedia" ]
|
||||
then
|
||||
parsed=$(echo "${STATICIP}" | sed -e 's|,| |g')
|
||||
|
||||
for ifline in ${parsed}
|
||||
do
|
||||
ifname="$(echo ${ifline} | cut -f1 -d ':')"
|
||||
ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
|
||||
ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
|
||||
ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
|
||||
nameserver="$(echo ${ifline} | cut -f5 -d ':')"
|
||||
|
||||
cat >> "${IFFILE}" << EOF
|
||||
allow-hotplug ${ifname}
|
||||
iface ${ifname} inet static
|
||||
address ${ifaddress}
|
||||
netmask ${ifnetmask}
|
||||
EOF
|
||||
|
||||
if [ -n "${ifgateway}" ]
|
||||
then
|
||||
|
||||
cat >> "${IFFILE}" << EOF
|
||||
gateway ${ifgateway}
|
||||
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
if [ -n "${nameserver}" ]
|
||||
then
|
||||
if [ -e "${DNSFILE}" ]
|
||||
then
|
||||
grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
|
||||
mv "${DNSFILE}.tmp" "${DNSFILE}"
|
||||
fi
|
||||
|
||||
echo "nameserver ${nameserver}" >> "${DNSFILE}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
if [ -n "${NODHCP}" ]
|
||||
then
|
||||
# force DHCP off
|
||||
method="manual"
|
||||
elif [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
|
||||
then
|
||||
# default, dhcp assigned
|
||||
method="dhcp"
|
||||
else
|
||||
# make sure that the preconfigured interface would not get reassigned by dhcp
|
||||
# on startup by ifup script - otherwise our root fs might be disconnected!
|
||||
method="manual"
|
||||
fi
|
||||
|
||||
# iterate the physical interfaces and add them to the interfaces list and also add when ethdevice= called on cmdline
|
||||
if [ "${method}" != dhcp ] || ([ ! -x /root/usr/sbin/NetworkManager ] && [ ! -x /root/usr/sbin/wicd ]) || [ ! -z "${ETHDEVICE}" ]
|
||||
then
|
||||
for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan* /sys/class/net/en*
|
||||
do
|
||||
[ -e ${interface} ] || continue
|
||||
i="$(basename ${interface})"
|
||||
|
||||
cat >> "${IFFILE}" << EOF
|
||||
allow-hotplug ${i}
|
||||
iface ${i} inet ${method}
|
||||
|
||||
EOF
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -f "${DNSFILE}" ] || [ -z "$(cat ${DNSFILE})" ]
|
||||
then
|
||||
if [ -f /netboot.config ]
|
||||
then
|
||||
# create a resolv.conf if it is not present or empty
|
||||
cp /netboot.config /root/var/log/netboot.config
|
||||
|
||||
rc_search=$(cat netboot.config | awk '/domain/ { print $3 }')
|
||||
rc_server0="$(cat netboot.config | awk '/dns0/ { print $5 }')"
|
||||
|
||||
cat > $DNSFILE << EOF
|
||||
search ${rc_search}
|
||||
domain ${rc_search}
|
||||
nameserver ${rc_server0}
|
||||
EOF
|
||||
|
||||
rc_server1=$(cat netboot.config | awk '/dns0/ { print $8 }')
|
||||
|
||||
if [ "${rc_server1}" != "0.0.0.0" ]
|
||||
then
|
||||
echo "nameserver ${rc_server1}" >> $DNSFILE
|
||||
fi
|
||||
|
||||
cat $DNSFILE >> /root/var/log/netboot.config
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
log_end_msg
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#set -e
|
||||
|
||||
# Parse live username from cmdline.
|
||||
Cmdline () {
|
||||
# Reading kernel command line
|
||||
for _PARAMETER in ${LIVE_CONFIG_CMDLINE}; do
|
||||
case "${_PARAMETER}" in
|
||||
live-config.username=*|username=*)
|
||||
LIVE_USERNAME="${_PARAMETER#*username=}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Copy installer launcher file to Desktop.
|
||||
Config () {
|
||||
local file=/usr/share/applications/deepin-installer.desktop
|
||||
if [ -f "$file" ]; then
|
||||
install -d -o $LIVE_USERNAME -g $LIVE_USERNAME /home/$LIVE_USERNAME/Desktop
|
||||
install -D -o $LIVE_USERNAME -g $LIVE_USERNAME $file /home/$LIVE_USERNAME/Desktop/$(basename "$file")
|
||||
fi
|
||||
|
||||
install -d -o $LIVE_USERNAME -g $LIVE_USERNAME /home/$LIVE_USERNAME/.config
|
||||
cat > /home/$LIVE_USERNAME/.config/not_first_run_dde << EOF
|
||||
Generate by deepin-installer.
|
||||
Timestamp: `LC_ALL=C date`
|
||||
EOF
|
||||
chown $LIVE_USERNAME:$LIVE_USERNAME /home/$LIVE_USERNAME/.config/not_first_run_dde
|
||||
}
|
||||
|
||||
Cmdline
|
||||
Config
|
|
@ -0,0 +1,100 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# If in auto-install mode, replace default lightdm.conf and launch installer.
|
||||
|
||||
prereqs() {
|
||||
echo "$PREREQ"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
prereqs)
|
||||
prereqs
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Modify lightdm config file.
|
||||
generate_lightdm_conf() {
|
||||
local CONF_FILE="$1"
|
||||
local HELPER_FILE="$2"
|
||||
cat > "${CONF_FILE}" <<EOF
|
||||
[Seat:*]
|
||||
greeter-setup-script=$HELPER_FILE
|
||||
EOF
|
||||
}
|
||||
|
||||
generate_installer_helper() {
|
||||
local HELPER_FILE="$1"
|
||||
local LOCALE="$2"
|
||||
local CONF_FILE="$3"
|
||||
local LOG_FILE="$4"
|
||||
|
||||
cat > "${HELPER_FILE}" <<EOF
|
||||
#!/bin/sh
|
||||
##gconftool-2 --set --type=bool /apps/gksu/display-no-pass-info false || true
|
||||
/usr/bin/deepin-installer --conf "${CONF_FILE}" --log "${LOG_FILE}" --auto-install
|
||||
EOF
|
||||
}
|
||||
|
||||
# Read kernel parameter and set global variables.
|
||||
parse_cmdline() {
|
||||
for x in $(cat /proc/cmdline); do
|
||||
case $x in
|
||||
auto-deepin-installer)
|
||||
auto_mode=true
|
||||
;;
|
||||
install-path=*)
|
||||
install_path="${x#install-path=}"
|
||||
;;
|
||||
deepin-installer/locale=*)
|
||||
locale=${x#deepin-installer/locale=}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
config_auto_mode() {
|
||||
local installer_conf installer_log installer_helper
|
||||
if [ x"$auto_mode" = xtrue ]; then
|
||||
#fix install_path
|
||||
#if use boot config, iso mount on /lib/live/mount/findiso
|
||||
iso_root=/lib/live/mount/findiso
|
||||
install_path=$iso_root/$install_path
|
||||
|
||||
lang=$(echo $locale | awk -F '.' '{print $1}')
|
||||
# set locale
|
||||
echo $locale
|
||||
printf 'LANG="%s"\nLANGUAGE="%s"\n' "$locale" "$lang" > /etc/default/locale
|
||||
printf 'LANG="%s"\nLANGUAGE="%s"\n' "$locale" "$lang" >> /etc/environment
|
||||
sed -i "s/# \(en_US\.UTF-8.*$\)/\1/g" /etc/locale.gen
|
||||
sed -i "s/# \(${locale}.*$\)/\1/g" /etc/locale.gen
|
||||
/usr/sbin/locale-gen || true
|
||||
|
||||
installer_conf=$install_path/install/deepin-installer.conf
|
||||
installer_log=$install_path/install/deepin-installer.log
|
||||
installer_helper=/usr/lib/deepin-installer-helper
|
||||
generate_installer_helper $installer_helper $locale $installer_conf $installer_log
|
||||
generate_lightdm_conf /etc/lightdm/lightdm.conf $installer_helper
|
||||
|
||||
chmod +x $installer_helper
|
||||
fi
|
||||
}
|
||||
|
||||
parse_cmdline
|
||||
config_auto_mode
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# If in live mode, replace default lightdm.conf, launch installer instead of
|
||||
# default lightdm greeter.
|
||||
|
||||
generate_lightdm_conf() {
|
||||
local CONF_FILE="$1"
|
||||
cat > "${CONF_FILE}" <<EOF
|
||||
[Seat:*]
|
||||
display-setup-script=/usr/bin/deepin-installer-bases
|
||||
greeter-session=lightdm-installer-greeter
|
||||
greeter-setup-script=bash /usr/bin/deepin-installer-core /usr/bin/deepin-installer
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse live config cmdline to check whether in live mode.
|
||||
parse_cmdline () {
|
||||
# Reading kernel command line
|
||||
for _PARAMETER in $(cat /proc/cmdline); do
|
||||
case "${_PARAMETER}" in
|
||||
live-config.livecd-installer|livecd-installer)
|
||||
LIVE_MODE=true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Setup lightdm if in live mode.
|
||||
config_live_mode() {
|
||||
if [ x"$LIVE_MODE" = "xtrue" ]; then
|
||||
generate_lightdm_conf /etc/lightdm/lightdm.conf
|
||||
fi
|
||||
}
|
||||
|
||||
if [ x"$1" == "xtrue" ];then
|
||||
parse_cmdline
|
||||
config_live_mode
|
||||
fi
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Launch installer in normal mode
|
||||
DefaultDependencies=no
|
||||
ConditionKernelCommandLine=|livecd-installer
|
||||
ConditionKernelCommandLine=|auto-deepin-installer
|
||||
Conflicts=shutdown.target
|
||||
Wants=systemd-udevd.service systemd-udev-trigger.service
|
||||
After=basic.target
|
||||
Before=lightdm.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/bin/deepin-installer-start
|
||||
User=root
|
||||
[Install]
|
||||
WantedBy=basic.target
|
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
# Don't run timesyncd if installer is installed
|
||||
# 1. 安装器阶段启动时间同步服务会导致无法设置时间
|
||||
# 2. 安装器阶段NTP关闭后的一小段时间内(例如5~8秒),用户设置时间会失败(https://github.com/systemd/systemd/issues/11420)
|
||||
# 3. 所以安装阶段不启动时间同步服务,安装器卸载该文件被移除后,时间同步服务则可正常启动
|
||||
ConditionFileIsExecutable=!/usr/bin/deepin-installer
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,231 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Read kernel parameter and set global variables.
|
||||
|
||||
# 获取活动屏幕输出个数
|
||||
monitors_cnt() {
|
||||
local out=`xrandr --listactivemonitors | grep ^Monitors:`
|
||||
out=${out##Monitors:}
|
||||
echo ${out:-0}
|
||||
}
|
||||
|
||||
# 获取主屏幕
|
||||
monitors_primary() {
|
||||
## 通过前后空格精准匹配
|
||||
local out=`xrandr | grep ' connected primary ' | awk '{print $1}'`
|
||||
echo -n $out
|
||||
}
|
||||
|
||||
# 获取其他屏幕数据列表
|
||||
monitors_othe_list() {
|
||||
local out1=`xrandr | grep ' connected ' | grep -v 'connected primary' | awk '{print $1}' | grep -v "DisplayPort-"`
|
||||
local out2=`xrandr | grep ' connected ' | awk '{print $1}' | grep "DisplayPort-" | awk 'END {print}' | grep -v $(monitors_primary)`
|
||||
[ -n "$out1" ] || out2=`xrandr | grep ' connected ' | awk '{print $1}' | grep "DisplayPort-" | grep -v $(monitors_primary)`
|
||||
echo -n $out1 $out2
|
||||
}
|
||||
|
||||
|
||||
# 获取屏幕数据列表
|
||||
monitors_list() {
|
||||
local out=`xrandr | grep ' connected ' | awk '{print $1}'`
|
||||
echo -n $out
|
||||
}
|
||||
|
||||
# 处理1k情况,安装器最高以1k显示
|
||||
monitors_mode_1k() {
|
||||
local mode="1920x1080"
|
||||
local cnt=`xrandr -q | awk '{print $1}' | grep -E [0-9]+x[0-9]+ | grep -E "^$mode$" | wc -l`
|
||||
if [ $cnt -eq $(monitors_cnt) ]; then
|
||||
echo $mode
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# 获取所有屏幕共同支持的显示模式
|
||||
monitors_mode() {
|
||||
local mode_1k=$(monitors_mode_1k)
|
||||
## 如果支持1k,最以1k屏显示
|
||||
if [ -n "$mode_1k" ]; then
|
||||
echo $mode_1k
|
||||
else
|
||||
local list=`xrandr -q | awk '{print $1}' | grep -E [0-9]+x[0-9]+`
|
||||
for line in $list; do
|
||||
local cnt=`xrandr -q | awk '{print $1}' | grep -E [0-9]+x[0-9]+ | grep -E "^$line$" | wc -l`
|
||||
if [ $cnt -eq $(monitors_cnt) ]; then
|
||||
echo $line
|
||||
return;
|
||||
fi
|
||||
done
|
||||
|
||||
# 最低的默认分辨率,防止如果所有分辨率都不满足的情况下使用800x600
|
||||
echo "800x600"
|
||||
fi
|
||||
}
|
||||
|
||||
print_log() {
|
||||
xrandr
|
||||
monitors_list | xargs -d" " -I {} echo "xrandr --output {} --auto --primary"
|
||||
monitors_primary | xargs -d" " -I {} echo "xrandr --output {} --mode $(monitors_mode)"
|
||||
monitors_othe_list | xargs -d" " -I {} echo "xrandr --output $(monitors_primary) --same-as {} --mode $(monitors_mode)"
|
||||
monitors_othe_list | xargs -d" " -I {} echo "xrandr --output {} --mode $(monitors_mode)"
|
||||
}
|
||||
|
||||
# 获取最高分辨率
|
||||
max_mode() {
|
||||
local mode=`xrandr -q | awk '{print $1}' | grep -E '[0-9]+x[0-9]+$' | sort -rn | sed -n 1p`
|
||||
echo ${mode}
|
||||
}
|
||||
|
||||
# 获取最优分辨率
|
||||
optimal_mode() {
|
||||
local mode=`xrandr -q | grep + | awk '{print $1}' | grep -E [0-9]+[0-9] | sort -rn | sed -n 1p`
|
||||
echo ${mode}
|
||||
}
|
||||
|
||||
# 处理设置屏幕
|
||||
setup_monitors() {
|
||||
local pri_mon=$(monitors_primary)
|
||||
if [ ! -n "$pri_mon" ];then
|
||||
# 设置主屏幕,兼容都是dpi输出且输出屏幕位置重合的情况,兼容无主屏输出的情况
|
||||
monitors_list | xargs -d" " -I {} xrandr --output {} --auto --primary || xrandr
|
||||
fi
|
||||
|
||||
local cnt=$(monitors_cnt)
|
||||
local system_monitor_enable=$(installer_get system_monitor_enable)
|
||||
echo "system_monitor_enable=$system_monitor_enable"
|
||||
if [ "x$system_monitor_enable" = "xtrue" ] && [ $cnt -gt 1 ]; then
|
||||
# 设置主屏分辨率
|
||||
monitors_primary | xargs -d" " -I {} xrandr --output {} --mode $(monitors_mode)
|
||||
# 克隆模式
|
||||
monitors_othe_list | xargs -d" " -I {} xrandr --output $(monitors_primary) --same-as {} --mode $(monitors_mode)
|
||||
# 设置多屏共同支持的最大分辨率
|
||||
monitors_othe_list | xargs -d" " -I {} xrandr --output {} --mode $(monitors_mode)
|
||||
|
||||
## 输出调试日志
|
||||
print_log
|
||||
else
|
||||
echo "Single output"
|
||||
if [ -n "$(optimal_mode)" ]; then
|
||||
# 设置屏幕的最优分辨率
|
||||
echo "optimal mode:$(optimal_mode)"
|
||||
xrandr -s $(optimal_mode)
|
||||
else
|
||||
# 设置屏幕的最高分辨率
|
||||
echo "max mode:$(max_mode)"
|
||||
xrandr -s $(max_mode)
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# 将安装器后配置的运行目录改为/usr/share/deepin-installer-exec
|
||||
first_boot_move() {
|
||||
|
||||
installerRunDir=/usr/share/deepin-installer-exec/
|
||||
mkdir -p ${installerRunDir}
|
||||
|
||||
firstBoot="/usr/bin/deepin-installer-first-boot"
|
||||
hookPath="/usr/share/deepin-installer/hooks"
|
||||
|
||||
if [ -f ${firstBoot} ]; then
|
||||
cp -vrf /usr/bin/deepin-installer-first-boot ${installerRunDir}
|
||||
fi
|
||||
|
||||
if [ -d ${hookPath} ]; then
|
||||
cp -vrf /usr/share/deepin-installer/hooks/ ${installerRunDir}
|
||||
fi
|
||||
}
|
||||
|
||||
setup_kwin_env() {
|
||||
export HOME=/root
|
||||
|
||||
#识别到景嘉微显卡屏蔽窗口特效
|
||||
#lshw -c video | grep "driver=mwv206"
|
||||
#if [ $? -eq 0 ]; then
|
||||
# export KWIN_COMPOSE=N
|
||||
#fi
|
||||
|
||||
env
|
||||
}
|
||||
|
||||
installer_get() {
|
||||
local key="$1"
|
||||
local CONF_FILE=/etc/deepin-installer.conf
|
||||
[ -z "${CONF_FILE}" ] && exit "CONF_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings get "${CONF_FILE}" "${key}"
|
||||
}
|
||||
|
||||
|
||||
is_empty_dir() {
|
||||
local dir=$1
|
||||
[ ! -d $dir ] && return 0
|
||||
|
||||
local count=$(ls $dir | wc -w)
|
||||
if [ $count -ne 0 ];then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
setup_live_workdir() {
|
||||
# 光驱安装时,启动盘的挂载点可能会是/run/live/medium
|
||||
local live_dir=$1
|
||||
if is_empty_dir $live_dir; then
|
||||
info "$live_dir is empty dir"
|
||||
mount -v --bind /run/live/medium/ $live_dir
|
||||
fi
|
||||
|
||||
info "$live_dir not empty dir"
|
||||
}
|
||||
|
||||
setup_oem_squashfs() {
|
||||
echo "setup oem squashfs start..."
|
||||
local live_dir=$1
|
||||
if [ -f $live_dir/oem.squashfs ]; then
|
||||
mount -v $live_dir/oem.squashfs $live_dir/oem
|
||||
fi
|
||||
echo "setup oem squashfs end!"
|
||||
}
|
||||
|
||||
main() {
|
||||
## 挂载oem.squashfs
|
||||
local live_dir="/usr/lib/live/mount/medium/"
|
||||
setup_live_workdir "$live_dir"
|
||||
setup_oem_squashfs "$live_dir"
|
||||
|
||||
## 初始化安装配置和环境
|
||||
/usr/bin/deepin-installer-init
|
||||
cat /etc/deepin-installer.conf
|
||||
|
||||
## 处理后配置卸载自己后有小概率启动不了桌面问题,安装器后配置运行路径变为/usr/share/deepin-installer-exec
|
||||
first_boot_move
|
||||
|
||||
## 处理多屏的情况,安装器以克隆模式运行多屏的情况
|
||||
setup_monitors
|
||||
|
||||
# 启动窗管,解决部分机型上界面花屏问题, 窗管启动失败不影响安装器本身程序的启动
|
||||
setup_kwin_env
|
||||
kwin_x11 -platform dde-kwin-xcb || true &
|
||||
}
|
||||
|
||||
main >> /var/log/deepin-installer-init.log 2>&1
|
||||
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Read kernel parameter and set global variables.
|
||||
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
auto_install_mode=0
|
||||
|
||||
cd_rom() {
|
||||
if [ -d /lib/live/mount/medium/live ]; then
|
||||
CDROM=/lib/live/mount/medium
|
||||
else
|
||||
CDROM=/run/live/medium
|
||||
fi
|
||||
echo ${CDROM}
|
||||
}
|
||||
|
||||
parse_cmdline() {
|
||||
for x in $(cat /proc/cmdline); do
|
||||
case $x in
|
||||
install-mode-cli=true)
|
||||
echo $x
|
||||
cli_mode=true
|
||||
;;
|
||||
auto-deepin-installer)
|
||||
auto_install_mode=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
parse_cmdline
|
||||
|
||||
if [ x"$cli_mode" = xtrue ]; then
|
||||
systemctl stop lightdm
|
||||
chvt 2
|
||||
systemctl restart deepin-installer-cli
|
||||
else
|
||||
if [ $auto_install_mode -eq 1 ]; then
|
||||
/usr/lib/live/config/1081-deepin-auto-install
|
||||
else
|
||||
/usr/lib/live/config/1082-deepin-livecd true
|
||||
fi
|
||||
fi
|
||||
|
BIN
cd-tools/deepin-installer-for-dclc/deepin-installer/usr/bin/deepin-installer-cli
Executable file
BIN
cd-tools/deepin-installer-for-dclc/deepin-installer/usr/bin/deepin-installer-cli
Executable file
Binary file not shown.
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Read kernel parameter and set global variables.
|
||||
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
sed -i '$d' /etc/profile
|
||||
echo "tty | egrep -q tty[2] && export LC_ALL=zh_CN.UTF-8" >> /etc/profile
|
||||
source /etc/profile
|
||||
/usr/bin/fbterm --font-size=11 /usr/bin/deepin-installer-cli
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/bash
|
||||
|
||||
installer_get() {
|
||||
local key="$1"
|
||||
local CONF_FILE=/etc/deepin-installer.conf
|
||||
[ -z "${CONF_FILE}" ] && exit "CONF_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings get "${CONF_FILE}" "${key}"
|
||||
}
|
||||
|
||||
monitors_cnt() {
|
||||
local out=`xrandr --listactivemonitors | grep ^Monitors:`
|
||||
out=${out##Monitors:}
|
||||
echo ${out:-0}
|
||||
}
|
||||
|
||||
setup_install_env() {
|
||||
local l_dpi=$(installer_get "DI_LOGICAL_DPI")
|
||||
local p_dpi=$(installer_get "DI_PHYSICAL_DPI")
|
||||
|
||||
local offset=$(( p_dpi - l_dpi))
|
||||
echo "l_dpi=$l_dpi p_dpi=$p_dpi offset=$offset"
|
||||
|
||||
## 通过逻辑dpi和物理dpi探测qt自动获取的缩放是否错误来开启自定义缩放处理
|
||||
local auto_scale=1
|
||||
local scale=1
|
||||
if [ $offset -gt 20 ] && [ $offset -lt 96 ];then
|
||||
auto_scale=0
|
||||
scale=1.25
|
||||
elif [ $offset -ge 96 ] && [ $offset -lt 172 ];then
|
||||
auto_scale=0
|
||||
scale=1.75
|
||||
elif [ $offset -ge 172 ]; then
|
||||
auto_scale=0
|
||||
scale=2
|
||||
fi
|
||||
|
||||
export QT_AUTO_SCREEN_SCALE_FACTOR=$auto_scale
|
||||
export QT_SCALE_FACTOR=$scale
|
||||
echo "QT_AUTO_SCREEN_SCALE_FACTOR=$QT_AUTO_SCREEN_SCALE_FACTOR QT_SCALE_FACTOR=$scale"
|
||||
}
|
||||
|
||||
## 主函数
|
||||
main() {
|
||||
## 设置环境变量
|
||||
local system_dpi_enable=$(installer_get "system_dpi_enable")
|
||||
local system_monitor_enable=$(installer_get system_monitor_enable)
|
||||
local mon_cnt=$(monitors_cnt)
|
||||
echo "system_dpi_enable=$system_dpi_enable system_monitor_enable=$system_monitor_enable mon_cnt=$mon_cnt"
|
||||
if [ "x$system_dpi_enable" = "xtrue" ];then
|
||||
## 多屏场景下禁止自定义缩放处理
|
||||
if [ "x$system_monitor_enable" = "xfalse" ] || [ $mon_cnt -lt 2 ];then
|
||||
setup_install_env
|
||||
fi
|
||||
fi
|
||||
|
||||
## 执行命令
|
||||
local install_command=$1
|
||||
$install_command
|
||||
}
|
||||
|
||||
main $1 >> /var/log/deepin-installer-init.log 2>&1
|
|
@ -0,0 +1,64 @@
|
|||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 更新时间:2022年10月29日
|
||||
# 感谢:感谢 deepin 的 deepin installer
|
||||
# 根据 GPLV3 协议开源
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#################################################################################################################
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import PyQt5.QtGui as QtGui
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
apps = QtWidgets.QApplication(sys.argv)
|
||||
defultBash = """#!/bin/bash
|
||||
##########################################################
|
||||
# Power By Deepin Installer
|
||||
# Installer DIY By gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# WebSize: https://gfdgd-xi.github.io
|
||||
# 介绍:你可以在这里输入需要在安装过程中需要添加运行的脚本以便执行
|
||||
########################################################## """
|
||||
|
||||
if os.getuid() != 0:
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "请用 root 权限运行")
|
||||
sys.exit(1)
|
||||
|
||||
def SaveButton():
|
||||
try:
|
||||
if not os.path.exists(f"/usr/share/deepin-installer"):
|
||||
os.makedirs("/usr/share/deepin-installer")
|
||||
with open("/usr/share/deepin-installer/diy-shell", "w") as file:
|
||||
file.write(text.toPlainText())
|
||||
QtWidgets.QMessageBox.information(window, "提示", "保存成功!")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
|
||||
window = QtWidgets.QMainWindow()
|
||||
widget = QtWidgets.QWidget()
|
||||
layout = QtWidgets.QGridLayout()
|
||||
text = QtWidgets.QTextEdit()
|
||||
saveButton = QtWidgets.QPushButton("保存")
|
||||
saveButton.clicked.connect(SaveButton)
|
||||
if os.path.exists("/usr/share/deepin-installer/diy-shell"):
|
||||
try:
|
||||
with open("/usr/share/deepin-installer/diy-shell", "r") as file:
|
||||
text.setText(file.read())
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())
|
||||
text.setText(defultBash)
|
||||
else:
|
||||
if os.path.exists("/usr/share/deepin-installer/diy-shell"):
|
||||
text.setText(defultBash)
|
||||
layout.addWidget(text, 0, 0)
|
||||
layout.addWidget(saveButton, 1, 0)
|
||||
widget.setLayout(layout)
|
||||
window.setCentralWidget(widget)
|
||||
window.setWindowTitle("Deepin Installer 添加自定义脚本")
|
||||
window.setWindowIcon(QtGui.QIcon("/usr/share/icons/hicolor/scalable/apps/deepin-installer-oem.svg"))
|
||||
window.resize(int(window.frameSize().width() * 1.2), int(window.frameSize().height() * 1.1))
|
||||
window.show()
|
||||
apps.exec_()
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY python3 /usr/bin/deepin-installer-diy
|
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
pkexec "/usr/bin/deepin-installer-first-boot" "$@"
|
Binary file not shown.
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Disable disk-mount plugin.
|
||||
deepin-installer-settings set \
|
||||
"$HOME/.config/dde-file-manager/dde-file-manager.conf" \
|
||||
"advance.mount.auto_mount" value false
|
||||
|
||||
deepin-installer-settings set \
|
||||
"$HOME/.config/deepin/dde-file-manager/dde-file-manager.conf" \
|
||||
"advance.mount.auto_mount" value false
|
||||
|
||||
# Kill docker process.
|
||||
pkill -f dde-dock
|
||||
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
if [ x$(whoami) == 'xroot' ]; then
|
||||
/usr/bin/deepin-installer $@
|
||||
else
|
||||
pkexec "/usr/bin/deepin-installer" "$@"
|
||||
fi
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /usr/share/deepin-installer/hooks/basic_utils.sh
|
||||
|
||||
start_checkmode() {
|
||||
echo "start checkmode..."
|
||||
init_checkmode
|
||||
}
|
||||
|
||||
start_backup() {
|
||||
echo "start backup..."
|
||||
init_backup
|
||||
# /sbin/shutdown -r now
|
||||
}
|
||||
|
||||
start_firstboot() {
|
||||
echo "start first boot..."
|
||||
init_firstboot
|
||||
systemctl disable deepin-installer
|
||||
}
|
||||
|
||||
start_system() {
|
||||
echo "start systemd..."
|
||||
}
|
||||
|
||||
init_start() {
|
||||
local arg1=$1
|
||||
local system_backup_disable=$(installer_get "system_backup_disable")
|
||||
local system_check_mode=$(installer_get "system_check_mode")
|
||||
|
||||
## 判断是否进入审核模式
|
||||
if [ "x$system_check_mode" = "xtrue" ]; then
|
||||
start_checkmode
|
||||
fi
|
||||
|
||||
## 判断是否备份
|
||||
if [ ! -f /recovery/backup.flag ] && [ "x$system_backup_disable" != "xtrue" ]; then
|
||||
start_backup
|
||||
fi
|
||||
|
||||
## 判断是否进入后配置
|
||||
if [ "$arg1" = "0" ]; then
|
||||
start_firstboot
|
||||
elif [ "$arg1" = "2" ]; then
|
||||
start_system
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local mode=$(installer_get "system_installer_start_mode")
|
||||
echo "install mode: $mode"
|
||||
|
||||
if [ ! -n "$mode" ]; then
|
||||
echo "installer start..."
|
||||
/usr/bin/deepin-installer-both # 正常安装系统
|
||||
else
|
||||
echo "init start..."
|
||||
init_start $mode # 启动烧录流程
|
||||
fi
|
||||
}
|
||||
|
||||
main >> /var/log/deepin-installer-init.log 2>&1
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
. /lib/live/init-config.sh
|
||||
|
||||
cat > /etc/lightdm/lightdm.conf <<EOF
|
||||
[Seat:*]
|
||||
greeter-session=lightdm-deepin-greeter
|
||||
user-session=deepin
|
||||
autologin-user=${LIVE_USERNAME}
|
||||
autologin-user-timeout=0
|
||||
EOF
|
||||
|
||||
# enable develop mode
|
||||
mkdir -p /var/lib/deepin/developer-mode
|
||||
echo -n 1 > /var/lib/deepin/developer-mode/enabled
|
||||
|
||||
file=/usr/share/applications/deepin-repair-tools.desktop
|
||||
if [ -f "$file" ]; then
|
||||
install -d -o $LIVE_USERNAME -g $LIVE_USERNAME /home/$LIVE_USERNAME/Desktop
|
||||
install -D -o $LIVE_USERNAME -g $LIVE_USERNAME $file /home/$LIVE_USERNAME/Desktop/$(basename "$file")
|
||||
fi
|
||||
|
||||
install -d -o $LIVE_USERNAME -g $LIVE_USERNAME /home/$LIVE_USERNAME/.config
|
||||
cat > /home/$LIVE_USERNAME/.config/not_first_run_dde << EOF
|
||||
Generate by deepin-installer.
|
||||
Timestamp: `LC_ALL=C date`
|
||||
EOF
|
||||
chown $LIVE_USERNAME:$LIVE_USERNAME /home/$LIVE_USERNAME/.config/not_first_run_dde
|
||||
|
||||
systemctl restart lightdm
|
|
@ -0,0 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Comment=Installer for Linux Deepin
|
||||
Exec=/usr/bin/deepin-installer-diy-pkexec
|
||||
Icon=deepin-installer-oem
|
||||
Name=Deepin Installer 添加自定义脚本
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Terminal=false
|
|
@ -0,0 +1,9 @@
|
|||
[desktop]
|
||||
Categories=Settings;
|
||||
Comment=OEM tool for deepin installer
|
||||
Exec=deepin-installer-oem
|
||||
Icon=deepin-installer-oem
|
||||
Name=Deepin Installer OEM
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
|
@ -0,0 +1,83 @@
|
|||
[Desktop Entry]
|
||||
Categories=Settings;
|
||||
Comment=Installer for Linux Deepin
|
||||
Exec=deepin-installer-pkexec
|
||||
Icon=deepin-installer
|
||||
Name=Install Deepin
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-Desktop-File-Install-Version=0.21
|
||||
X-MultipleArgs=false
|
||||
|
||||
# Translations
|
||||
Comment[am]=ለ ሊነክስ መግጠሚያ
|
||||
Name[am]=መግጠሚያ
|
||||
Comment[ar]= تثبيت إلى لينكس دييبن
|
||||
Name[ar]=تنصيب دييبن
|
||||
Comment[az]=Linux Deepin üçün quraşdırıcı
|
||||
Name[az]=Deepin-i Quraşdır
|
||||
Comment[cs]=Instalátor pro Linux Deepin
|
||||
Name[cs]=Nainstalovat Deepin
|
||||
Comment[da]=Installationsprogram for Linux Deepin
|
||||
Name[da]=Installer Deepin
|
||||
Comment[de]=Linux Deepin Installationsprogramm
|
||||
Name[de]=Deepin installieren
|
||||
Comment[el]=Βοηθός Εγκατάστασης για το Linux Deepin
|
||||
Name[el]=Εγκατάσταση του Deepin
|
||||
Comment[es]=Instalador para Linux Deepin
|
||||
Name[es]=Instalar Deepin
|
||||
Comment[fi]=Linux Deepin asennusohjelma
|
||||
Name[fi]=Asenna Deepin
|
||||
Comment[fr]=Installateur pour Linux Deepin
|
||||
Name[fr]=Installer Deepin
|
||||
Comment[es_CL]=Instalar Linux Deepin
|
||||
Name[es_CL]=Instalar Deepin
|
||||
Comment[he]=מתקין עבור Linux Deepin
|
||||
Name[he]=התקן את Deepin
|
||||
Comment[hr]=Instalacijski program za Linux Deepin
|
||||
Name[hr]=Instaliraj Deepin
|
||||
Comment[hu]=Linux Deepin telepítő
|
||||
Name[hu]=Deepin telepítése
|
||||
Comment[hy]=Linux Deepin-ի տեղադրիչ
|
||||
Name[hy]=Տեղադրել Deepin
|
||||
Comment[id]=Installer untuk Linux Deepin
|
||||
Name[id]=Pasang Deepin
|
||||
Comment[it]=Installer per Deepin Linux
|
||||
Name[it]=Installa Deepin OS
|
||||
Comment[ja]=インストーラー
|
||||
Name[ja]=インストール
|
||||
Comment[ms]=Pemasang untuk Linux Deepin
|
||||
Name[ms]=Pasang Deepin
|
||||
Comment[nl]=Linux Deepin-installatieprogramma
|
||||
Name[nl]=Deepin installeren
|
||||
Comment[es_419]=Instalador para Linux Deepin
|
||||
Name[es_419]=Instalar Deepin
|
||||
Comment[pl]=Instalator Linux Deepin
|
||||
Name[pl]=Zainstaluj Deepin
|
||||
Comment[pt]=Instalador de Linux Deepin
|
||||
Name[pt]=Instalar Deepin
|
||||
Comment[pt_BR]=Instalador para Linux Deepin
|
||||
Name[pt_BR]=Instalar Deepin
|
||||
Comment[ro]=Instalator Linux Deepin
|
||||
Name[ro]=Instalarea Deepin
|
||||
Comment[ru]=Установщик Linux Deepin
|
||||
Name[ru]=Установить Deepin
|
||||
Comment[sk]=Inštalátor pre Linux Deepin
|
||||
Name[sk]=Inštalovať Deepin
|
||||
Comment[sl]=Installer za Linux Deepin
|
||||
Name[sl]=Namesti Deepin
|
||||
Comment[tr]=Linux Deepin için Kurucu
|
||||
Name[tr]=Deepin Kur
|
||||
Comment[uk]=Встановлювач Linux Deepin
|
||||
Name[uk]=Встановити Deepin
|
||||
Comment[zh_CN]=Linux Deepin安装器
|
||||
Name[zh_CN]=安装Deepin
|
||||
Comment[zh_TW]=Deepin 作業系統安裝程式
|
||||
Name[zh_TW]=安裝 Deepin
|
||||
Comment[es_AR]=Instalador de Linux Deepin
|
||||
Name[es_AR]=Instalar Deepin
|
||||
Comment[en_AU]=Linux Deepin Installer
|
||||
Name[en_AU]=Install Deepin
|
||||
Comment[es_ES]=Instalador de Linux Deepin
|
||||
Name[es_ES]=Instalar Deepin
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
cat > "${LIGHTD_CONF_FILE}" <<EOF
|
||||
[Seat:*]
|
||||
display-setup-script=/usr/bin/deepin-installer-bases
|
||||
greeter-setup-script=bash /usr/bin/deepin-installer-core /usr/bin/deepin-installer-first-boot
|
||||
greeter-session=lightdm-gtk-greeter
|
||||
EOF
|
||||
|
||||
## 解决服务器上设置审核模式后,重启进入后配置无法自动切换到tty7
|
||||
BAK_LIGHTDM_FILE=/etc/lightdm/lightdm.conf.real
|
||||
if [ -f /etc/lightdm/lightdm.conf.real ]; then
|
||||
echo "[LightDM]" >> "${LIGHTD_CONF_FILE}"
|
||||
grep -r "minimum-vt" "$BAK_LIGHTDM_FILE" >> "${LIGHTD_CONF_FILE}"
|
||||
fi
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Absolute path to config file.
|
||||
# Do not read from/write to this file, call installer_get/installer_set instead.
|
||||
CONF_FILE=/etc/deepin-installer.conf
|
||||
LIGHTD_CONF_FILE=/etc/lightdm/lightdm.conf
|
||||
|
||||
installer_get() {
|
||||
local key="$1"
|
||||
[ -z "${CONF_FILE}" ] && exit "CONF_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings get "${CONF_FILE}" "${key}"
|
||||
}
|
||||
|
||||
# Set value in conf file. Section name is ignored.
|
||||
installer_set() {
|
||||
local key="$1"
|
||||
local value="$2"
|
||||
[ -z "${CONF_FILE}" ] && exit "CONF_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings set "${CONF_FILE}" "${key}" "${value}"
|
||||
}
|
||||
|
||||
SI_USERNAME=$(installer_get "system_info_si_user")
|
||||
SI_PASSWORD=$(installer_get "system_info_si_password")
|
||||
|
||||
setNetworkBoot() {
|
||||
NETWORK_EFI=$(efibootmgr |grep -i network |awk -F'*' '{print $1}' |sed 's#Boot##')
|
||||
efibootmgr -n ${NETWORK_EFI}
|
||||
}
|
||||
|
||||
# 使用sudo权限执行审核模式的过程的函数,该函数可以将脚本执行日志写入到安装器日志中
|
||||
exec_check() {
|
||||
local cmd=$@
|
||||
bash /deepin-installer/command.sh $cmd
|
||||
}
|
||||
|
||||
# 判断是否存在桌面
|
||||
is_desktopexist() {
|
||||
HSASTARTDDE=$(dpkg -l | grep dde-desktop)
|
||||
if [ -z "${HSASTARTDDE}" ]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# 创建日志文件
|
||||
addfile_checkmode_log() {
|
||||
touch /var/tmp/deepin-installer-checkmode.log
|
||||
chmod 777 /var/tmp/deepin-installer-checkmode.log
|
||||
}
|
||||
|
||||
# 删除日志文件
|
||||
deletefile_checkmode_log() {
|
||||
rm -rf /var/tmp/deepin-installer-checkmode.log
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
# 如果存在桌面
|
||||
if ! is_desktopexist; then
|
||||
echo "is_desktopexist = false"
|
||||
/deepin-installer/check_start.sh
|
||||
else
|
||||
echo "is_desktopexist = true"
|
||||
mkdir -p /home/${SI_USERNAME}/.config/autostart/
|
||||
cat > /home/${SI_USERNAME}/.config/autostart/check_test.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Exec=/deepin-installer/check_start.sh
|
||||
Name=check mode
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
EOF
|
||||
fi
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
exec_check "/deepin-installer/in_check/"
|
||||
|
||||
# logout to run lightdm-stop.sh
|
||||
qdbus --system --literal org.freedesktop.login1 /org/freedesktop/login1/session/self org.freedesktop.login1.Session.Terminate
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
clean_disk_cryption() {
|
||||
local crypt_initramfs=$workspace/etc/cryptsetup-initramfs/conf-hook
|
||||
local cryp_conf_file=/etc/crypttab
|
||||
local key_file=/etc/deepin/crypt_keyfile_*.key
|
||||
|
||||
[ -f ${crypt_initramfs}.real ] && mv ${crypt_initramfs}.real ${crypt_initramfs}
|
||||
[ -f ${cryp_conf_file}.real ] && mv ${cryp_conf_file}.real ${cryp_conf_file}
|
||||
rm -fr $key_file
|
||||
/usr/sbin/update-initramfs -u
|
||||
}
|
||||
|
||||
# remove check mode files and test user
|
||||
clean_check_mode() {
|
||||
userdel -rf ${SI_USERNAME}
|
||||
rm -rf /deepin-installer
|
||||
installer_set "system_check_mode" "false"
|
||||
}
|
||||
|
||||
[ -n "$(installer_get "DI_CRYPT_PASSWD")" ] && clean_disk_cryption
|
||||
clean_check_mode
|
||||
reboot
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
run() {
|
||||
local file=$1
|
||||
echo "run script: $file"
|
||||
bash $file
|
||||
if [ $? != 0 ]; then
|
||||
echo "Check Mode faild: $JOB_SRP"
|
||||
reboot
|
||||
fi
|
||||
}
|
||||
|
||||
run_job() {
|
||||
local in=$1
|
||||
if [ -d "$in" ];then
|
||||
echo "run dir: $in"
|
||||
JOBS=$(ls "$in/")
|
||||
for job in $JOBS; do
|
||||
local JOB_SRP=$in/$job
|
||||
run $JOB_SRP
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f "$in" ];then
|
||||
run $in
|
||||
fi
|
||||
}
|
||||
|
||||
run_job $@ >> /var/tmp/deepin-installer-checkmode.log 2>&1 # 用于执行目录下或者独立的脚本文件,会将脚本输出的日志写入到安装日志中
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SI = System Integrity
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
# 创建审核模式日志文件
|
||||
addfile_checkmode_log
|
||||
|
||||
exec_check "/deepin-installer/before_check/"
|
||||
# wait for lightdm
|
||||
sleep 5
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
# SI = System Integrity
|
||||
|
||||
. "/deepin-installer/basic_utils.sh"
|
||||
|
||||
exec_check "/deepin-installer/after_check/"
|
||||
exec_check "/deepin-installer/check_stop.sh" # 清理审核模式,使用exec_check可以将日志写入到安装器日志中
|
||||
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
#!/bin/bash
|
||||
##########################################################
|
||||
# Power By Deepin Installer
|
||||
# Installer DIY By gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# WebSize: https://gfdgd-xi.github.io
|
||||
# 介绍:你可以在这里输入需要在安装过程中需要添加运行的脚本以便执行
|
||||
##########################################################
|
||||
# 如果想要的话请删除对应命令前面的 #
|
||||
# 一般情况下命令越多安装所需时间越长(卡在 81% 的时间),请根据实际情况设置
|
||||
# 提示:此是在 chroot 环境下操作,所以不要输入不能在 chroot 环境下运行的命令
|
||||
|
||||
######### 默认安装
|
||||
# 先安装镜像内自带的镜像
|
||||
# 安装需要定制安装的 deb
|
||||
if [ -d /usr/share/deepin-installer/deb ]; then
|
||||
echo 安装自定义 deb
|
||||
dpkg -i /usr/share/deepin-installer/deb/*.deb | true
|
||||
apt install -f -y | true
|
||||
fi
|
||||
if [ -d /media/cdrom/DIY/DEB ]; then
|
||||
echo 安装自定义 deb
|
||||
dpkg -i /media/cdrom/DIY/DEB/*.deb | true
|
||||
apt install -f -y | true
|
||||
fi
|
||||
# 判断是否能连接到镜像源
|
||||
curl https://mirrors.sdu.edu.cn/spark-store-repository --connect-timeout 2 -m 2
|
||||
if [[ $? == "0" ]]; then
|
||||
# 安装星火里面的 QQ、微信(wine 版本)
|
||||
# 不使用 aptss,因为在 chroot 环境难以使用
|
||||
apt install com.qq.weixin.spark -y | true
|
||||
else
|
||||
# 安装官方应用商店里面的 QQ、微信(wine 版本)
|
||||
apt install com.qq.weixin.deepin deepin-mobile-assistant -y | true
|
||||
fi
|
||||
# 安装/更新部分程序版本
|
||||
aptss install com.gitee.deepin-opensource.desktop-entry-editor spark-simple-remote-desktop-accessor ms-core-fonts winfonts uos-remote-assistance spark-deepin-wine-runner spark-store com.uostools.udom timeshift -y | true
|
||||
aptss install linuxqq com.gitee.uengine.runner.spark uengine cn.wps.wps-office com.alibabainc.dingtalk -y
|
||||
|
||||
|
||||
###### 常见软件套组
|
||||
# 安装 Android 模拟器
|
||||
#apt install com.gitee.uengine.runner.spark uengine -y
|
||||
# 安装 Microsoft Office 2007 Professional Plus(Wine)全家桶
|
||||
#apt install com.microsoft.access.deepin spark-microsoftsharepoint spark-microsoft-visio spark-microsoft-powerpoint spark.microsoft.excel spark-microsoft-word -y
|
||||
# UOS 原生应用全家桶(只移植成功部分)
|
||||
#apt install org.deepin.chineseime org.deepin.contacts deepin-pc-butler-spark -y
|
||||
# 安装 winehq stable(下面好几行都需要取消注释)
|
||||
# apt install winehq-devel -y
|
||||
|
||||
###### 单独软件
|
||||
# Microsoft Edge
|
||||
#apt install microsoft-edge-stable -y
|
||||
# 腾讯会议
|
||||
#apt install wemeet -y
|
||||
# Visual Studio Code(vscode)
|
||||
#apt install code -y
|
||||
# git
|
||||
#apt install git -y
|
||||
# Steam
|
||||
#apt install steam-launcher -y
|
||||
# 星火商店投稿器
|
||||
#apt install spark-store-submitter -y
|
||||
# 酷狗音乐(wine)
|
||||
#apt install com.kugou.spark -y
|
||||
# 数学公式字体
|
||||
#apt install symbol-fonts -y
|
||||
# TIM
|
||||
#apt install com.qq.tim.spark -y
|
||||
# 应用管理器
|
||||
#apt install com.github.ccc-app-manager -y
|
||||
# 百度翻译(Linux)
|
||||
#apt install com.baidu.translateclient -y
|
||||
# 深度中文输入法
|
||||
#apt install org.deepin.chineseime -y
|
||||
# 同花顺免费版(wine7)
|
||||
#apt install cn.com.10jqka.tonghuashun.spark -y
|
||||
# Wine游戏助手
|
||||
#apt install net.winegame.client -y
|
||||
# 360杀毒
|
||||
#apt install 360sd -y
|
||||
# 百度Linux输入法
|
||||
#apt install fcitx-baidupinyin -y
|
||||
# 讯飞输入法
|
||||
#apt install com.iflytek.iflyime -y
|
||||
# 几何画板(wine6)
|
||||
#apt install com.jihehuaban.cn -y
|
||||
# 迅雷(linux版)
|
||||
#apt install com.xunlei.download -y
|
||||
# 希沃白板5
|
||||
#apt install com.seewo.easinote5 -y
|
||||
# 火绒安全
|
||||
#apt install cn.huorong.esm -y
|
||||
# 桌面快捷方式编辑器
|
||||
#apt install com.gitee.deepin-opensource.desktop-entry-editor -y
|
||||
# DDE配置助手(oh my dde)
|
||||
#apt install top.yzzi.youjian -y
|
||||
# Adobe Illustrator CC 2015(Wine)
|
||||
#apt install com.sugarcane.adobe.illustrator -y
|
||||
# Adobe Photoshop CC 2018
|
||||
#apt install com.sugarcane.adobe.photoshop -y
|
||||
# Adobe Photoshop CS6
|
||||
#apt install com.photoshopcs6.deepin -y
|
||||
# bilibili客户端(Linux)
|
||||
#apt install io.github.msojocs.bilibili -y
|
||||
# QQ音乐
|
||||
#apt install qqmusic -y
|
||||
# blossom图标主题
|
||||
#apt install blossom -y
|
||||
# 官方壁纸分享
|
||||
#apt install deepin-wallpapers-bbs-spark -y
|
||||
# 音乐小部件
|
||||
#apt install top.yzzi.musicwidget -y
|
||||
# 动态图片屏保
|
||||
#apt install picture-screensaver -y
|
||||
# 向日葵远程控制
|
||||
#apt install com.oray.sunlogin.client -y
|
||||
# 金山打字通 2008(wine)
|
||||
#apt install spark-typeeasy -y
|
||||
# QtScrcpy
|
||||
#apt install qtscrcpy -y
|
||||
# 任务栏系统监视器
|
||||
#apt install dde-dock-monitor-plugin -y
|
||||
# 必剪(wine)
|
||||
#apt install com.drawyoo.bcut.spark -y
|
||||
# 千千音乐(wine)
|
||||
#apt install com.taihe.music.spark -y
|
||||
# 深谈(UOS联系人)
|
||||
#apt install org.deepin.contacts -y
|
||||
# Microsoft Office Word 2007(wine)
|
||||
#apt install spark-microsoft-word -y
|
||||
# Microsoft Office Excel 2007 Professional(wine)
|
||||
#apt install spark.microsoft.excel -y
|
||||
# Microsoft Office PowerPoint 2007(wine)
|
||||
#apt install spark-microsoft-powerpoint -y
|
||||
# Microsoft Office Visio 2007
|
||||
#apt install spark-microsoft-visio -y
|
||||
# Microsoft Office SharePoint Designer 2007
|
||||
#apt install spark-microsoftsharepoint -y
|
||||
# Microsoft Office Access 2007 Professional Plus(Wine)
|
||||
#apt install com.microsoft.access.deepin -y
|
||||
# CrossOver for deepin
|
||||
#apt install crossover-deepin -y
|
||||
# Mind+
|
||||
#apt install mindplus -y
|
||||
# PhotoGIMP
|
||||
#apt install photogimp -y
|
||||
# PhotoZoom Pro 8(wine)
|
||||
#apt install spark-photozoom -y
|
||||
# Spark Wine7 Devel
|
||||
#apt install spark-wine7-devel -y
|
||||
# 金山词霸
|
||||
#apt install com.kingsoft.powerword -y
|
||||
# 金山PDF(wine)
|
||||
#apt install com.wpspdf.spark -y
|
||||
# 金山词霸2022(Wine)
|
||||
#apt install com.iciba.powerword.spark -y
|
||||
# Bandizip
|
||||
#apt install com.deepin.bandizip -y
|
||||
# 系统助手
|
||||
#apt install sysbro -y
|
||||
# qemu
|
||||
#apt install qemu-system -y
|
||||
# 电脑管家(不推荐安装)
|
||||
#apt install deepin-pc-butler-spark -y
|
||||
# 更新系统(建议系统安装后自行手动更新)
|
||||
#apt dist-upgrade
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
msg "====== /etc/deepin-installer.conf ======"
|
||||
cat /etc/deepin-installer.conf
|
||||
msg "====== /etc/deepin-version ======"
|
||||
cat /target/etc/deepin-version
|
||||
msg "====== kernel info ======"
|
||||
file /target/boot/vmlinuz*
|
||||
msg "====== installed packages list ======"
|
||||
chroot /target dpkg -l
|
||||
return 0
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Copy apt-cache list
|
||||
|
||||
[ -d /target/var/lib/apt/lists ] && rm -rf /target/var/lib/apt/lists
|
||||
[ -d /target/deepinhost/var/lib/apt/lists ] && \
|
||||
cp -rvfp /target/deepinhost/var/lib/apt/lists /target/var/lib/apt
|
||||
|
||||
return 0
|
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# generate fstab
|
||||
|
||||
DI_LUPIN=$(installer_get "DI_LUPIN")
|
||||
DI_LOOP_ROOT_FILE=$(installer_get "DI_LOOP_ROOT_FILE")
|
||||
DI_LOOP_SWAP_FILE=$(installer_get "DI_LOOP_SWAP_FILE")
|
||||
DATA_MOUNT_POINT=$(installer_get "DI_DATA_MOUNT_POINT")
|
||||
|
||||
#fstab for lupin
|
||||
if [ x${DI_LUPIN} = xtrue ]; then
|
||||
echo "# <file system> <mount point> <type> <options> <dump> <pass>" > /target/etc/fstab
|
||||
echo "${DI_LOOP_ROOT_FILE} / ext4 loop,errors=remount-ro 0 1" >> /target/etc/fstab
|
||||
echo "${DI_LOOP_SWAP_FILE} none swap loop,sw 0 0" >> /target/etc/fstab
|
||||
return 0
|
||||
fi
|
||||
|
||||
readonly GENFSTAB="${HOOKS_DIR}/after_chroot/genfstab"
|
||||
[ -f "${GENFSTAB}" ] || \
|
||||
error "require genfstab but it's not found. Abort!"
|
||||
umount -l /target/media/cdrom/oem
|
||||
umount -v /target/media/cdrom
|
||||
"${GENFSTAB}" -p -U /target > /target/etc/fstab
|
||||
|
||||
lsblk -f -o FSTYPE,UUID |
|
||||
while read -r type uuid; do
|
||||
if [ "x$type" = "xswap" ] && [ $(grep -c swap /target/etc/fstab) -eq 0 ]; then
|
||||
printf '%s\t%-10s\t%-10s\t%-10s\t0 0\n\n' "UUID=${uuid}" 'none' 'swap' 'defaults,pri=-2' >> /target/etc/fstab
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -d /target/${DATA_MOUNT_POINT} ];then
|
||||
sed -i '$!N;/\n.*home/!P;D' /target/etc/fstab
|
||||
sed -i '/home/d' /target/etc/fstab
|
||||
|
||||
sed -i '$!N;/\n.*opt/!P;D' /target/etc/fstab
|
||||
sed -i '/opt/d' /target/etc/fstab
|
||||
|
||||
sed -i '$!N;/\n.*root/!P;D' /target/etc/fstab
|
||||
sed -i '/root/d' /target/etc/fstab
|
||||
|
||||
sed -i '$!N;/\n.*var/!P;D' /target/etc/fstab
|
||||
sed -i '/var/d' /target/etc/fstab
|
||||
|
||||
echo "${DATA_MOUNT_POINT}/home /home none defaults,bind 0 0" >> /target/etc/fstab
|
||||
echo "${DATA_MOUNT_POINT}/opt /opt none defaults,bind 0 0" >> /target/etc/fstab
|
||||
echo "${DATA_MOUNT_POINT}/root /root none defaults,bind 0 0" >> /target/etc/fstab
|
||||
echo "${DATA_MOUNT_POINT}/var /var none defaults,bind 0 0" >> /target/etc/fstab
|
||||
fi
|
||||
|
||||
msg "Content of /etc/fstab"
|
||||
cat /target/etc/fstab
|
||||
|
||||
# Add swap file option if it is set.
|
||||
SWAP_FILE_REQUIRED=$(installer_get "DI_SWAP_FILE_REQUIRED")
|
||||
SWAP_FILE_PATH=$(installer_get "partition_swap_file_path")
|
||||
if [ x"${SWAP_FILE_REQUIRED}" = "xtrue" ]; then
|
||||
echo "${SWAP_FILE_PATH} none swap defaults 0 0" >> /target/etc/fstab
|
||||
fi
|
||||
|
||||
chroot /target /usr/sbin/update-initramfs -u
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# delete policy-rc.d script if it already exist.
|
||||
|
||||
RC="/target/usr/sbin/policy-rc.d"
|
||||
|
||||
if [ -f "${RC}" ]; then
|
||||
msg "policy-rc.d exists.Will remove it..."
|
||||
rm "$RC"
|
||||
else
|
||||
msg "policy-rc.d not exists"
|
||||
fi
|
||||
|
||||
rm -f /target/etc/apt/apt.conf.d/00deepin-installer
|
||||
|
||||
return 0
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install grub to disk. Only used in x86 based platforms
|
||||
|
||||
if ! is_loongarch; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 处理grub.cfg
|
||||
TAGER_BOOT_GRUB=/target/boot/efi/boot/EFI/
|
||||
USB_EFI_FILE=/usr/lib/live/mount/medium/EFI/BOOT/BOOTLOONGARCH.EFI
|
||||
CDROM_EFI_FILE=/run/live/medium/EFI/BOOT/BOOTLOONGARCH.EFI
|
||||
SYS_EFI_FILE=/EFI/BOOT/BOOTLOONGARCH.EFI
|
||||
mkdir ${TAGER_BOOT_GRUB} -p
|
||||
cp -f /target/boot/grub.cfg ${TAGER_BOOT_GRUB}
|
||||
if [ -f $SYS_EFI_FILE ];then
|
||||
echo "[START]====[SYS]======COPY BOOTLOONGARCH FILE ======"
|
||||
cp -fvr $SYS_EFI_FILE /target/boot/efi/EFI/BOOT/
|
||||
if [ $? -ne 0 ];then
|
||||
echo [ERROR]:COPY FAILD
|
||||
exit 1
|
||||
fi
|
||||
echo "[END]=====[SYS]=====COPY BOOTLOONGARCH FILE ======"
|
||||
fi
|
||||
if [ -f $USB_EFI_FILE ];then
|
||||
echo "[START]====[USB]======COPY BOOTLOONGARCH FILE ======"
|
||||
cp -fvr $USB_EFI_FILE /target/boot/efi/EFI/BOOT/
|
||||
if [ $? -ne 0 ];then
|
||||
echo [ERROR]:COPY FAILD
|
||||
exit 1
|
||||
fi
|
||||
echo "[END]=====[USB]=====COPY BOOTLOONGARCH FILE ======"
|
||||
fi
|
||||
if [ -f $CDROM_EFI_FILE ];then
|
||||
echo "[START]====[CDROM]======COPY BOOTLOONGARCH FILE ======"
|
||||
cp -fvr $CDROM_EFI_FILE /target/boot/efi/EFI/BOOT/
|
||||
if [ $? -ne 0 ];then
|
||||
echo [ERROR]:COPY FAILD
|
||||
exit 1
|
||||
fi
|
||||
echo "[END]=====[CDROM]=====COPY BOOTLOONGARCH FILE ======"
|
||||
fi
|
||||
|
||||
if [ ! -f "/target/boot/efi/EFI/BOOT/BOOTLOONGARCH.EFI" ];then
|
||||
echo [ERROR]:COPY BOOTLOONGARCH FAILD!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# setup pmon bootloader
|
||||
ROOT_UUID=$(lsblk -o UUID,MOUNTPOINT | grep -E "/target$" | awk '{print $1}')
|
||||
cat >> /target/boot/boot.cfg << EOF
|
||||
default 0
|
||||
timeout 3
|
||||
showmenu 0
|
||||
|
||||
title $(system_name)
|
||||
kernel /dev/fs/ext2@wd0a/vmlinuz-$(uname -r)
|
||||
initrd /dev/fs/ext2@wd0a/initrd.img-$(uname -r)
|
||||
args console=tty loglevel=0 quiet splash root=UUID=${ROOT_UUID} locales=zh_CN.UTF-8
|
||||
EOF
|
||||
|
||||
echo "update loongarch bootloader!"
|
|
@ -0,0 +1,93 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2019 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# generate a file: ab_recovery.json
|
||||
# 步骤:
|
||||
# 1.从配置文件取得当前根分区的label。
|
||||
# 2.假定备用根分区的label为"Rootb"(见full_disk_policy.json)。
|
||||
# 3.取得两个根分区的uuid。
|
||||
# 4.将两个uuid写入ab_recovery.json文件中。
|
||||
|
||||
declare ab_condition="false"
|
||||
declare ab_recovery_file="/target/etc/deepin/ab-recovery.json"
|
||||
declare current_label="", backup_label=""
|
||||
|
||||
check_install_mode()
|
||||
{
|
||||
local fulldisk_mode=$(installer_get "DI_FULLDISK_MODE")
|
||||
if [ "x${fulldisk_mode}" == "xtrue" ]; then
|
||||
ab_condition="true"
|
||||
fi
|
||||
DI_ROOT_PARTITION=$(installer_get "DI_ROOT_PARTITION")
|
||||
current_label=${DI_ROOT_PARTITION}
|
||||
backup_label="/dev/disk/by-label/Rootb"
|
||||
if [ "x${current_label}" == "x" ]; then
|
||||
ab_condition="false"
|
||||
fi
|
||||
|
||||
echo "current:{${current_label}}"
|
||||
echo "backup:{${backup_label}}"
|
||||
echo "ab_condition:{${ab_condition}}"
|
||||
}
|
||||
|
||||
do_generate()
|
||||
{
|
||||
local current_uuid="$(blkid -o value -s UUID ${current_label})"
|
||||
local backup_uuid="$(blkid -o value -s UUID ${backup_label})"
|
||||
echo "current:{${current_label}} {${current_uuid}}"
|
||||
echo "backup:{${backup_label}} {${backup_uuid}}"
|
||||
|
||||
local current_uuid_count="$(blkid -o value -s UUID ${current_label}|wc -l)"
|
||||
local backup_uuid_count="$(blkid -o value -s UUID ${backup_label}|wc -l)"
|
||||
|
||||
if [[ -z ${current_uuid} || "x${current_uuid_count}" != "x1" ]]; then
|
||||
echo "Failed to get current uuid of {${current_label}}"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -z ${backup_uuid} || "x${backup_uuid_count}" != "x1" ]]; then
|
||||
echo "Failed to get backup uuid of {${backup_label}}"
|
||||
return
|
||||
fi
|
||||
|
||||
mkdir -p $(dirname ${ab_recovery_file})
|
||||
cat > ${ab_recovery_file} <<EOF
|
||||
{
|
||||
"Current": "${current_uuid}",
|
||||
"Backup" : "${backup_uuid}"
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
do_output_error()
|
||||
{
|
||||
echo "Maybe not in FULLDISK installation mode!"
|
||||
}
|
||||
|
||||
echo "Generating ${ab_recovery_file} ..."
|
||||
|
||||
check_install_mode
|
||||
|
||||
if [ x${ab_condition} == xtrue ]; then
|
||||
do_generate
|
||||
else
|
||||
do_output_error
|
||||
fi
|
||||
|
||||
echo "done."
|
||||
|
||||
return 0
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2019 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# copy oem license files to target system.
|
||||
|
||||
OEM_TARGET_DIR=/target/oem_license
|
||||
|
||||
if [ -d ${OEM_DIR}/license ]; then
|
||||
mkdir -p ${OEM_TARGET_DIR}
|
||||
cp -fr ${OEM_DIR}/license ${OEM_TARGET_DIR}/.
|
||||
fi
|
||||
|
||||
# add activation for wubi support
|
||||
DI_LUPIN=$(installer_get "DI_LUPIN")
|
||||
if [ x${DI_LUPIN} = xtrue ]; then
|
||||
if [ -e /host/deepin/install/boot/grub/data.bin ];then
|
||||
install -Dm644 /host/deepin/install/boot/grub/data.bin /target/var/uos/.kta
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2011 ~ 2019 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# set recovery partition
|
||||
|
||||
installer_set "DI_INSTALL_STATUS" 4
|
||||
|
||||
DI_UEFI=$(installer_get "DI_UEFI")
|
||||
DATA_MOUNT_POINT=$(installer_get "DI_DATA_MOUNT_POINT")
|
||||
|
||||
if [ ! -d "/target/recovery" ];then
|
||||
return 0
|
||||
fi
|
||||
|
||||
DI_IF_DO_RECOVERY=$(installer_get "DI_IF_DO_RECOVERY")
|
||||
|
||||
if [ "x${DI_IF_DO_RECOVERY}" != "xtrue" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir /target/recovery/backup
|
||||
|
||||
echo "UUID=$(lsblk -o UUID,MOUNTPOINT -f | grep -i /target/recovery$ | awk '{print $1}')" > /target/etc/deepin/system-recovery.conf
|
||||
|
||||
installer_set DI_BOOT_PARTITION $(df -h | grep /boot$ | awk '{print $1}')
|
||||
installer_set DI_RECOVERY_PATH $(df -h | grep /recovery$ | awk '{print $1}')
|
||||
|
||||
|
||||
# 备份boot的UUID
|
||||
echo $(lsblk -o UUID,MOUNTPOINT -f | grep -i /boot$ | awk '{print $1}') > /target/recovery/backup/boot.info
|
||||
|
||||
# 备份efi的UUID
|
||||
if [ x${DI_UEFI} = xtrue ]; then
|
||||
echo $(lsblk -o UUID,MOUNTPOINT -f | grep -i /boot/efi$ | awk '{print $1}') > /target/recovery/backup/efi.info
|
||||
fi
|
||||
|
||||
# 备份系统的UUID
|
||||
echo $(lsblk -o UUID,MOUNTPOINT -f | grep /target$ | awk '{print $1}') > /target/recovery/backup/system.info
|
||||
|
||||
# 备份data的UUID
|
||||
echo $(lsblk -o UUID,MOUNTPOINT -f | grep "${DATA_MOUNT_POINT}$" | awk '{print $1}') > /target/recovery/backup/_dde_data.info
|
||||
|
||||
return $?
|
|
@ -0,0 +1,71 @@
|
|||
#!/bin/bash
|
||||
|
||||
setup_udisks_rules() {
|
||||
local UDISK_FILE="/target/etc/udev/rules.d/80-udisks-installer.rules"
|
||||
|
||||
# 隐藏efi分区
|
||||
local EFI_ID=$(lsblk -o UUID,MOUNTPOINT -f | grep -i /target/boot/efi$ | awk '{print $1}')
|
||||
if [ -n "$EFI_ID" ]; then
|
||||
echo "# hide efi" >> ${UDISK_FILE}
|
||||
echo "ENV{ID_FS_UUID}==\"${EFI_ID}\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
fi
|
||||
|
||||
# 隐藏boot分区
|
||||
local BOOT_ID=$(lsblk -o UUID,MOUNTPOINT -f | grep -i /target/boot$ | awk '{print $1}')
|
||||
if [ -n "$BOOT_ID" ]; then
|
||||
echo "# hide boot" >> ${UDISK_FILE}
|
||||
echo "ENV{ID_FS_UUID}==\"${BOOT_ID}\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
fi
|
||||
|
||||
# 隐藏recovery分区
|
||||
local RECOVERY_ID=$(lsblk -o UUID,MOUNTPOINT -f | grep -i /target/recovery$ | awk '{print $1}')
|
||||
if [ -n "$RECOVERY_ID" ]; then
|
||||
echo "# hide recovery" >> ${UDISK_FILE}
|
||||
echo "ENV{ID_FS_UUID}==\"${RECOVERY_ID}\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
fi
|
||||
|
||||
# 处理roota 根分区规则
|
||||
# ## 设置根分区为linux filesystem,防止sw平台上根分区为引导出现问题
|
||||
# ## udev中存在一条默认规则:当磁盘格式是gpt,分区类型为EFI的磁盘会被隐藏,
|
||||
# ## 所以当系统是uefi引导时,sw平台手动创建根分区为第一个分区,默认该分区的类型是EFI类型,故会被隐藏
|
||||
local ROOT_DEVICE=$(installer_get DI_ROOT_DISK)
|
||||
local ROOT_NUM="${ROOT_DEVICE##/dev/}"
|
||||
local MULTIPLE_PART=$(lsblk -lfo NAME $ROOT_DEVICE | grep -i "${ROOT_NUM}[p]2" | awk '{print $1}')
|
||||
if [ ! -n "$EFI_ID" ] && [ ! -n "$BOOT_ID" ]; then
|
||||
echo "# Roota rule debug"
|
||||
echo "# fdisk ${ROOT_DEVICE} t 20 $/dev/{MULTIPLE_PART}"
|
||||
[ -n "$MULTIPLE_PART" ] && fdisk ${ROOT_DEVICE} << EOF
|
||||
t
|
||||
1
|
||||
20
|
||||
w
|
||||
EOF
|
||||
[ -n "$MULTIPLE_PART" ] || fdisk ${ROOT_DEVICE} << EOF
|
||||
t
|
||||
20
|
||||
w
|
||||
EOF
|
||||
fi
|
||||
|
||||
# 隐藏rootb分区
|
||||
local ROOTB_ID=$(blkid -o value -s UUID /target/dev/disk/by-label/Rootb)
|
||||
if [ -n "$ROOTB_ID" ]; then
|
||||
echo "# hide rootb" >> ${UDISK_FILE}
|
||||
echo "ENV{ID_FS_UUID}==\"${ROOTB_ID}\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
fi
|
||||
|
||||
# 隐藏swap分区
|
||||
echo "# hide swap" >> ${UDISK_FILE}
|
||||
echo "ENV{ID_FS_TYPE}==\"swap\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
|
||||
# 隐藏加密磁盘分区
|
||||
local DISKS=$(installer_get "DI_FULLDISK_MULTIDISK_DEVICE" | tr -s ";" " ") # 获取安装器中操作的磁盘
|
||||
local LUKS_IDS=$(lsblk -o UUID,NAME,FSTYPE -lf $DISKS | grep -i crypto_luks | awk '{print $1}')
|
||||
echo "DISKS=$DISKS, LUKS_IDS=$LUKS_IDS"
|
||||
if [ -n "$LUKS_IDS" ]; then
|
||||
echo "# hide crypto_luks" >> ${UDISK_FILE}
|
||||
echo "$LUKS_IDS" | xargs -I {} echo "ENV{ID_FS_UUID}==\"{}\", ENV{UDISKS_IGNORE}=\"1\"" >> ${UDISK_FILE}
|
||||
fi
|
||||
}
|
||||
|
||||
setup_udisks_rules
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Umount /target recursively.
|
||||
|
||||
target='/target'
|
||||
chown root:root ${target}
|
||||
|
||||
# sync data to disk
|
||||
sync
|
||||
|
||||
[ -d /target/deepinhost ] && umount -l /target/deepinhost
|
||||
rm -rf /target/deepinhost
|
||||
|
||||
for i in $(cat /proc/mounts | awk '{print $2}' | grep -e ^$target | sort -r); do
|
||||
umount -v $i
|
||||
done
|
||||
|
||||
SWAP_MOUNTPOIN=$(installer_get "DI_SWAP_MOUNTPOINT")
|
||||
if [ -n "$SWAP_MOUNTPOIN" ]; then
|
||||
swapoff $SWAP_MOUNTPOIN
|
||||
fi
|
||||
|
||||
sync
|
||||
return 0
|
|
@ -0,0 +1,85 @@
|
|||
#!/bin/bash
|
||||
DI_RECOVERY_PATH=$(installer_get "DI_RECOVERY_PATH")
|
||||
DI_BOOT_PARTITION=$(installer_get "DI_BOOT_PARTITION")
|
||||
DI_ROOT_PARTITION=$(installer_get "DI_ROOT_PARTITION")
|
||||
DI_SYSTEM_CHECK_MODE=$(installer_get "system_check_mode")
|
||||
DATA_MOUNT_POINT=$(installer_get "DI_DATA_MOUNT_POINT")
|
||||
|
||||
if [ -z ${DI_RECOVERY_PATH} ];then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
DI_FULLDISK_MODE=$(installer_get "DI_FULLDISK_MODE")
|
||||
if [ x${DI_FULLDISK_MODE} != "xtrue" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
DI_IS_INIT_RECOVERY=$(installer_get "DI_IS_INIT_RECOVERY")
|
||||
if [ x${DI_IS_INIT_RECOVERY} != "xtrue" ]; then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
variable_done_data_var_opt_copy=0
|
||||
|
||||
# mount all point
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/before_chroot/11_mount_target.job
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/before_chroot/41_setup_mount_points.job
|
||||
|
||||
if [ -d /target/${DATA_MOUNT_POINT} ];then
|
||||
mount ${DI_ROOT_PARTITION} /mnt
|
||||
rm -rf /mnt/var
|
||||
rm -rf /mnt/opt
|
||||
|
||||
# copy /data/var => /var
|
||||
cp -a /target/${DATA_MOUNT_POINT}/var /mnt/
|
||||
|
||||
# copy /data/opt => /opt
|
||||
cp -a /target/${DATA_MOUNT_POINT}/opt /mnt/
|
||||
|
||||
umount /mnt
|
||||
|
||||
variable_done_data_var_opt_copy=1
|
||||
fi
|
||||
|
||||
# umount all point
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/after_chroot/90_unmount.job
|
||||
|
||||
# force umount /target point
|
||||
umount -l /target
|
||||
|
||||
mkdir -p /target/recovery
|
||||
mount ${DI_RECOVERY_PATH} /target/recovery || error "Faild to mount recovery"
|
||||
|
||||
# 备份boot分区
|
||||
if [ ! -z ${DI_BOOT_PARTITION} ];then
|
||||
deepin-clone --tui ${DI_BOOT_PARTITION} /target/recovery/backup/boot.dim
|
||||
|
||||
if [ ! -f "/target/recovery/backup/boot.dim" ];then
|
||||
return -1
|
||||
fi
|
||||
|
||||
cd /target/recovery/backup
|
||||
md5sum boot.dim > boot.md5
|
||||
fi
|
||||
|
||||
deepin-clone --tui ${DI_ROOT_PARTITION} /target/recovery/backup/system.dim
|
||||
|
||||
if [ ${variable_done_data_var_opt_copy} == 1 ];then
|
||||
mount ${DI_ROOT_PARTITION} /mnt
|
||||
rm -rf /mnt/var/*
|
||||
rm -rf /mnt/opt/*
|
||||
umount /mnt
|
||||
fi
|
||||
|
||||
if [ ! -f "/target/recovery/backup/system.dim" ];then
|
||||
return -1
|
||||
fi
|
||||
|
||||
cd /target/recovery/backup
|
||||
md5sum system.dim > system.md5
|
||||
|
||||
cd /
|
||||
umount -R /target/recovery
|
||||
|
||||
sync
|
||||
return 0
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
|
||||
installer_set "DI_INSTALL_STATUS" 5
|
||||
|
||||
setup_check_mode_user() {
|
||||
local USERNAME=$(installer_get "system_info_si_user")
|
||||
local PASSWORD=$(installer_get "system_info_si_password")
|
||||
local GROUP=$(installer_get "system_info_si_group")
|
||||
|
||||
# 在保留用户数据的场景下,如果原始的用户中存在test用户,则审核模式会重新生成一个唯一的用户名
|
||||
if [ -d /target/home/${USERNAME} ]; then
|
||||
USERNAME="${USERNAME}-$(date "+%s")"
|
||||
installer_set system_info_si_user "$USERNAME" /target
|
||||
fi
|
||||
chroot /target useradd -m -G sudo ${USERNAME}
|
||||
|
||||
# 解决定制群组时,原来的命令报错的情况
|
||||
if [ -n "${GROUP}" ]; then
|
||||
usermod -a -G ${GROUP} ${USERNAME}
|
||||
fi
|
||||
chroot /target passwd "${USERNAME}" << EOF
|
||||
${PASSWORD}
|
||||
${PASSWORD}
|
||||
EOF
|
||||
|
||||
|
||||
# 进入审核模式
|
||||
LIGHTDM_CONF_FILE=/target/etc/lightdm/lightdm.conf
|
||||
cat > "${LIGHTDM_CONF_FILE}" <<EOF
|
||||
|
||||
[Seat:*]
|
||||
autologin-user=${USERNAME}
|
||||
user-session=deepin
|
||||
display-setup-script=/deepin-installer/lightdm-start.sh
|
||||
display-stopped-script=/deepin-installer/lightdm-stop.sh
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
setup_workspace() {
|
||||
# 审核模式的工作目录不可以在备份脚本之前就创建,否则会导致系统还原后会多出/deepin-installer目录
|
||||
local workspace="/target/deepin-installer/"
|
||||
if [ ! -d $workspace ]; then
|
||||
mkdir -p $workspace
|
||||
cp -r /usr/share/deepin-installer/check_hooks/* $workspace
|
||||
cp -r $OEM_DIR/check_hooks/* $workspace
|
||||
fi
|
||||
}
|
||||
|
||||
# User will delete when run check_hooks/lightdm_stop.sh
|
||||
if [ x$(installer_get "system_check_mode") == "xtrue" ]; then
|
||||
# mount all point
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/before_chroot/11_mount_target.job
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/before_chroot/41_setup_mount_points.job
|
||||
setup_workspace
|
||||
setup_check_mode_user
|
||||
skip_disk_crypt /target
|
||||
# umount all point
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/after_chroot/90_unmount.job
|
||||
fi
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Backup log to disk.
|
||||
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/before_chroot/11_mount_target.job
|
||||
|
||||
# 记录安装结束时间
|
||||
timer_end=`date "+%Y-%m-%d %H:%M:%S"`
|
||||
chroot /target deepin-installer-settings set "/etc/deepin-installer.conf" "DI_INSTALL_ENDTIME" "$timer_end"
|
||||
|
||||
if [ -f /var/log/deepin-installer.log ]; then
|
||||
install -v -Dm600 /var/log/deepin-installer.log \
|
||||
/target/var/log/deepin-installer.log
|
||||
fi
|
||||
/tmp/installer/hook_manager.sh /tmp/installer/after_chroot/90_unmount.job
|
|
@ -0,0 +1,337 @@
|
|||
#!/bin/bash
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
# generated from util-linux source: libmount/src/utils.c
|
||||
declare -A pseudofs_types=([anon_inodefs]=1
|
||||
[autofs]=1
|
||||
[bdev]=1
|
||||
[binfmt_misc]=1
|
||||
[cgroup]=1
|
||||
[configfs]=1
|
||||
[cpuset]=1
|
||||
[debugfs]=1
|
||||
[devfs]=1
|
||||
[devpts]=1
|
||||
[devtmpfs]=1
|
||||
[dlmfs]=1
|
||||
[fuse.gvfs-fuse-daemon]=1
|
||||
[fuse.gvfsd-fuse]=1
|
||||
[fusectl]=1
|
||||
[hugetlbfs]=1
|
||||
[mqueue]=1
|
||||
[nfsd]=1
|
||||
[none]=1
|
||||
[pipefs]=1
|
||||
[proc]=1
|
||||
[pstore]=1
|
||||
[ramfs]=1
|
||||
[rootfs]=1
|
||||
[rpc_pipefs]=1
|
||||
[securityfs]=1
|
||||
[sockfs]=1
|
||||
[spufs]=1
|
||||
[sysfs]=1
|
||||
[tmpfs]=1
|
||||
[overlayfs]=1
|
||||
[overlay]=1
|
||||
[iso9660]=1)
|
||||
# Also remove overlay which points to /deepinhost
|
||||
|
||||
# generated from: pkgfile -vbr '/fsck\..+' | awk -F. '{ print $NF }' | sort
|
||||
declare -A fsck_types=([cramfs]=1
|
||||
[exfat]=1
|
||||
[ext2]=1
|
||||
[ext3]=1
|
||||
[ext4]=1
|
||||
[ext4dev]=1
|
||||
[jfs]=1
|
||||
[minix]=1
|
||||
[msdos]=1
|
||||
[reiserfs]=1
|
||||
[vfat]=1
|
||||
[xfs]=1)
|
||||
|
||||
out() { printf "$1 $2\n" "${@:3}"; }
|
||||
error() { out "==> ERROR:" "$@"; } >&2
|
||||
msg() { out "==>" "$@"; }
|
||||
msg2() { out " ->" "$@";}
|
||||
die() { error "$@"; exit 1; }
|
||||
|
||||
ignore_error() {
|
||||
"$@" 2>/dev/null
|
||||
return 0
|
||||
}
|
||||
|
||||
track_mount() {
|
||||
if [[ -z $CHROOT_ACTIVE_MOUNTS ]]; then
|
||||
CHROOT_ACTIVE_MOUNTS=()
|
||||
trap 'chroot_umount' EXIT
|
||||
fi
|
||||
|
||||
mount "$@" && CHROOT_ACTIVE_MOUNTS=("$2" "${CHROOT_ACTIVE_MOUNTS[@]}")
|
||||
}
|
||||
|
||||
mount_conditionally() {
|
||||
local cond=$1; shift
|
||||
if eval "$cond"; then
|
||||
track_mount "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
api_fs_mount() {
|
||||
mount_conditionally "! mountpoint -q '$1'" "$1" "$1" --bind &&
|
||||
track_mount proc "$1/proc" -t proc -o nosuid,noexec,nodev &&
|
||||
track_mount sys "$1/sys" -t sysfs -o nosuid,noexec,nodev,ro &&
|
||||
ignore_error mount_conditionally "[[ -d '$1/sys/firmware/efi/efivars' ]]" \
|
||||
efivarfs "$1/sys/firmware/efi/efivars" -t efivarfs -o nosuid,noexec,nodev &&
|
||||
track_mount udev "$1/dev" -t devtmpfs -o mode=0755,nosuid &&
|
||||
track_mount devpts "$1/dev/pts" -t devpts -o mode=0620,gid=5,nosuid,noexec &&
|
||||
track_mount shm "$1/dev/shm" -t tmpfs -o mode=1777,nosuid,nodev &&
|
||||
track_mount run "$1/run" -t tmpfs -o nosuid,nodev,mode=0755 &&
|
||||
track_mount tmp "$1/tmp" -t tmpfs -o mode=1777,strictatime,nodev,nosuid
|
||||
}
|
||||
|
||||
chroot_umount() {
|
||||
umount "${CHROOT_ACTIVE_MOUNTS[@]}"
|
||||
}
|
||||
|
||||
valid_number_of_base() {
|
||||
local base=$1 len=${#2} i=
|
||||
|
||||
for (( i = 0; i < len; i++ )); do
|
||||
{ _=$(( $base#${2:i:1} )) || return 1; } 2>/dev/null
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
mangle() {
|
||||
local i= chr= out=
|
||||
|
||||
unset {a..f} {A..F}
|
||||
|
||||
for (( i = 0; i < ${#1}; i++ )); do
|
||||
chr=${1:i:1}
|
||||
case $chr in
|
||||
[[:space:]\\])
|
||||
printf -v chr '%03o' "'$chr"
|
||||
out+=\\
|
||||
;;
|
||||
esac
|
||||
out+=$chr
|
||||
done
|
||||
|
||||
printf '%s' "$out"
|
||||
}
|
||||
|
||||
unmangle() {
|
||||
local i= chr= out= len=$(( ${#1} - 4 ))
|
||||
|
||||
unset {a..f} {A..F}
|
||||
|
||||
for (( i = 0; i < len; i++ )); do
|
||||
chr=${1:i:1}
|
||||
case $chr in
|
||||
\\)
|
||||
if valid_number_of_base 8 "${1:i+1:3}" ||
|
||||
valid_number_of_base 16 "${1:i+1:3}"; then
|
||||
printf -v chr '%b' "${1:i:4}"
|
||||
(( i += 3 ))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
out+=$chr
|
||||
done
|
||||
|
||||
printf '%s' "$out${1:i}"
|
||||
}
|
||||
|
||||
dm_name_for_devnode() {
|
||||
read dm_name <"/sys/class/block/${1#/dev/}/dm/name"
|
||||
if [[ $dm_name ]]; then
|
||||
printf '/dev/mapper/%s' "$dm_name"
|
||||
else
|
||||
# don't leave the caller hanging, just print the original name
|
||||
# along with the failure.
|
||||
print '%s' "$1"
|
||||
error 'Failed to resolve device mapper name for: %s' "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
fstype_is_pseudofs() {
|
||||
(( pseudofs_types["$1"] ))
|
||||
}
|
||||
|
||||
fstype_has_fsck() {
|
||||
(( fsck_types["$1"] ))
|
||||
}
|
||||
|
||||
|
||||
write_source() {
|
||||
local src=$1 spec= label= uuid= comment=()
|
||||
|
||||
label=$(blkid -s PARTLABEL -o value "$1" 2>/dev/null)
|
||||
uuid=$(blkid -s UUID -o value "$1" 2>/dev/null)
|
||||
|
||||
# bind mounts do not have a UUID!
|
||||
|
||||
case $bytag in
|
||||
'')
|
||||
[[ $uuid ]] && comment=("UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
;;
|
||||
LABEL)
|
||||
spec=$label
|
||||
[[ $uuid ]] && comment=("$src" "UUID=$uuid")
|
||||
;;
|
||||
UUID)
|
||||
spec=$uuid
|
||||
comment=("$src")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
;;
|
||||
*)
|
||||
[[ $uuid ]] && comment=("$1" "UUID=$uuid")
|
||||
[[ $label ]] && comment+=("LABEL=$(mangle "$label")")
|
||||
[[ $bytag ]] && spec=$(lsblk -rno "$bytag" "$1" 2>/dev/null)
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ $comment ]] && printf '# %s\n' "${comment[*]}"
|
||||
|
||||
if [[ $spec ]]; then
|
||||
printf '%-20s' "$bytag=$(mangle "$spec")"
|
||||
else
|
||||
printf '%-20s' "$(mangle "$src")"
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
usage: ${0##*/} [options] root
|
||||
|
||||
Options:
|
||||
-L Use labels for source identifiers (shortcut for -t LABEL)
|
||||
-p Avoid printing pseudofs mounts
|
||||
-t TAG Use TAG for source identifiers
|
||||
-U Use UUIDs for source identifiers (shortcut for -t UUID)
|
||||
|
||||
-h Print this help message
|
||||
|
||||
genfstab generates output suitable for addition to an fstab file based on the
|
||||
devices mounted under the mountpoint specified by the given root.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
if [[ -z $1 || $1 = @(-h|--help) ]]; then
|
||||
usage
|
||||
exit $(( $# ? 0 : 1 ))
|
||||
fi
|
||||
|
||||
while getopts ':Lpt:U' flag; do
|
||||
case $flag in
|
||||
L)
|
||||
bytag=LABEL
|
||||
;;
|
||||
U)
|
||||
bytag=UUID
|
||||
;;
|
||||
p)
|
||||
nopseudofs=1
|
||||
;;
|
||||
t)
|
||||
bytag=${OPTARG^^}
|
||||
;;
|
||||
:)
|
||||
die '%s: option requires an argument -- '\''%s'\' "${0##*/}" "$OPTARG"
|
||||
;;
|
||||
?)
|
||||
die '%s: invalid option -- '\''%s'\' "${0##*/}" "$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $(( OPTIND - 1 ))
|
||||
|
||||
(( $# )) || die "No root directory specified"
|
||||
root=$1; shift
|
||||
|
||||
if ! mountpoint -q "$root"; then
|
||||
die "$root is not a mountpoint"
|
||||
fi
|
||||
|
||||
# handle block devices
|
||||
findmnt -Recvruno SOURCE,TARGET,FSTYPE,OPTIONS "$root" |
|
||||
while read -r src target fstype opts; do
|
||||
if (( nopseudofs )) && fstype_is_pseudofs "$fstype"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# default 5th and 6th columns
|
||||
dump=0 pass=2
|
||||
|
||||
src=$(unmangle "$src")
|
||||
target=$(unmangle "$target")
|
||||
target=${target#$root}
|
||||
|
||||
if (( !foundroot )) && findmnt "$src" "$root" >/dev/null; then
|
||||
# this is root. we can't possibly have more than one...
|
||||
pass=1 foundroot=1
|
||||
fi
|
||||
|
||||
# if there's no fsck tool available, then only pass=0 makes sense.
|
||||
if ! fstype_has_fsck "$fstype"; then
|
||||
pass=0
|
||||
fi
|
||||
|
||||
# filesystem quirks
|
||||
case $fstype in
|
||||
fuseblk)
|
||||
# well-behaved FUSE filesystems will report themselves as fuse.$fstype.
|
||||
# this is probably NTFS-3g, but let's just make sure.
|
||||
if ! newtype=$(lsblk -no FSTYPE "$src") || [[ -z $newtype ]]; then
|
||||
# avoid blanking out fstype, leading to an invalid fstab
|
||||
error 'Failed to derive real filesystem type for FUSE device on %s' "$target"
|
||||
else
|
||||
fstype=$newtype
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# write one line
|
||||
write_source "$src"
|
||||
printf '\t%-10s' "/$(mangle "${target#/}")" "$fstype" "$opts"
|
||||
printf '\t%s %s' "$dump" "$pass"
|
||||
printf '\n\n'
|
||||
done
|
||||
|
||||
# handle swaps devices
|
||||
{
|
||||
# ignore header
|
||||
read
|
||||
|
||||
while read -r device type _ _ prio; do
|
||||
options=defaults
|
||||
if [[ $prio != -1 ]]; then
|
||||
options+=,pri=$prio
|
||||
fi
|
||||
|
||||
# skip files marked deleted by the kernel
|
||||
[[ $device = *'\040(deleted)' ]] && continue
|
||||
|
||||
if [[ $type = file ]]; then
|
||||
printf '%-20s' "$device"
|
||||
elif [[ $device = /dev/dm-+([0-9]) ]]; then
|
||||
# device mapper doesn't allow characters we need to worry
|
||||
# about being mangled, and it does the escaping of dashes
|
||||
# for us in sysfs.
|
||||
write_source "$(dm_name_for_devnode "$device")"
|
||||
else
|
||||
write_source "$(unmangle "$device")"
|
||||
fi
|
||||
|
||||
printf '\t%-10s\t%-10s\t%-10s\t0 0\n\n' 'none' 'swap' "$options"
|
||||
done
|
||||
} </proc/swaps
|
||||
|
||||
# vim: et ts=2 sw=2 ft=sh:
|
|
@ -0,0 +1,622 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Automatically create disk partitions.
|
||||
# Partition policy is defined in settings.ini.
|
||||
declare -i DEVICE_SIZE AVL_SIZE PART_NUM=0 LVM_NUM=0 LAST_END=1 LOGICAL_SECTORS_PER_MB
|
||||
declare CRYPT_INFO DEVICE PART_POLICY PART_LABEL MP_LIST VG_NAME="vg0" PART_TYPE="primary" \
|
||||
LARGE="false" EFI="false" LVM="false"
|
||||
|
||||
# Check device capacity of $DEVICE.
|
||||
check_device_size(){
|
||||
local index=$1
|
||||
echo "index={${index}}"
|
||||
local minimum_disk_size=$(installer_get disk_minimum_space_required)
|
||||
local large_disk_threshold=$(installer_get partition_full_disk_large_disk_threshold)
|
||||
DEVICE_SIZE=$(($(blockdev --getsize64 "$DEVICE") / 1024**2))
|
||||
|
||||
if ((DEVICE_SIZE < minimum_disk_size * 1024 && index == 0)); then
|
||||
error "At least ${minimum_disk_size}Gib is required to install system!"
|
||||
elif ((DEVICE_SIZE > large_disk_threshold * 1024)); then
|
||||
declare -g LARGE=true
|
||||
fi
|
||||
}
|
||||
|
||||
# Check boot mode is UEFI or not.
|
||||
check_efi_mode(){
|
||||
is_sw && declare -g EFI=true
|
||||
[ -d "/sys/firmware/efi" ] && declare -g EFI=true
|
||||
local force_efi=$(installer_get force_efi_mode)
|
||||
[ x"$force_efi" = "xtrue" ] && declare -g EFI=true
|
||||
}
|
||||
|
||||
# Flush kernel message.
|
||||
flush_message(){
|
||||
udevadm settle --timeout=5
|
||||
}
|
||||
|
||||
# Format partition at $1 with filesystem $2.
|
||||
format_part(){
|
||||
local part_path="$1" part_fs="$2" part_label="$3"
|
||||
local part_fs_="$part_fs"
|
||||
if [ "$part_fs_" = "recovery" ]; then
|
||||
part_fs_=ext4
|
||||
fi
|
||||
|
||||
yes |\
|
||||
case "$part_fs_" in
|
||||
vfat)
|
||||
mkfs.vfat -F32 -n "$part_label" "$part_path";;
|
||||
fat32)
|
||||
mkfs.vfat -F32 -n "$part_label" "$part_path";;
|
||||
efi)
|
||||
mkfs.vfat -F32 -n "$part_label" "$part_path";;
|
||||
fat16)
|
||||
mkfs.vfat -F16 -n "$part_label" "$part_path";;
|
||||
ntfs)
|
||||
mkfs.ntfs --fast -L "$part_label" "$part_path";;
|
||||
linux-swap)
|
||||
mkswap "$part_path";;
|
||||
swap)
|
||||
mkswap "$part_path";;
|
||||
ext4)
|
||||
if is_loongson || is_sw; then
|
||||
mkfs.ext4 -O ^64bit -F -L "$part_label" "$part_path"
|
||||
else
|
||||
mkfs.ext4 -L "$part_label" "$part_path"
|
||||
fi
|
||||
;;
|
||||
xfs)
|
||||
mkfs.xfs -f -L "$part_label" "$part_path"
|
||||
;;
|
||||
*)
|
||||
mkfs -t "$part_fs" -L "$part_label" "$part_path";;
|
||||
esac || error "Failed to create $part_fs filesystem on $part_path!"
|
||||
}
|
||||
|
||||
get_max_capacity_device(){
|
||||
local name size max_device max_size=0
|
||||
while read name size; do
|
||||
if ((size >= max_size)); then
|
||||
max_size="$size"
|
||||
max_device="/dev/$name"
|
||||
fi
|
||||
done < <(lsblk -ndb -o NAME,SIZE)
|
||||
DEVICE="$max_device"
|
||||
}
|
||||
|
||||
get_logical_sectors_per_MB(){
|
||||
local device=$1
|
||||
declare -i logical_sector_size
|
||||
logical_sector_size=$(fdisk -l ${device} | grep "^Units" | awk -F "=" '{print $2}' | awk '{print $1}')
|
||||
[ ! $logical_sector_size -gt 0 ] && error "Failed to get logical sector size on $device!"
|
||||
|
||||
LOGICAL_SECTORS_PER_MB=$((1024 * 1024 / logical_sector_size))
|
||||
[ ! $LOGICAL_SECTORS_PER_MB -gt 0 ] && error "Failed to calc logical sector counts per MB on $device!"
|
||||
}
|
||||
|
||||
align_partition_start(){
|
||||
declare -i start=$1
|
||||
|
||||
# 向上取整对齐,对齐条件优先级:不小于调整之前的值 >= 为LOGICAL_SECTORS_PER_MB整数倍
|
||||
start=$(((start + LOGICAL_SECTORS_PER_MB - 1) / LOGICAL_SECTORS_PER_MB * LOGICAL_SECTORS_PER_MB))
|
||||
|
||||
echo $start
|
||||
}
|
||||
|
||||
align_partition_end(){
|
||||
declare -i end=$1
|
||||
|
||||
# 向下取整对齐,对齐条件优先级:不大于调整之前的值 >= 不小于0 >= 比LOGICAL_SECTORS_PER_MB整数倍少一个扇区
|
||||
end=$(((end + 1) / LOGICAL_SECTORS_PER_MB * LOGICAL_SECTORS_PER_MB))
|
||||
|
||||
[ $end -gt 0 ] && end=$((end - 1))
|
||||
|
||||
echo $end
|
||||
}
|
||||
|
||||
# Create new partition table.
|
||||
new_part_table(){
|
||||
if [ "x$EFI" == "xtrue" ] || is_sw ; then
|
||||
local part_table="gpt"
|
||||
else
|
||||
local part_table="msdos"
|
||||
fi
|
||||
|
||||
echo "part_table=${part_table}"
|
||||
parted -s "$DEVICE" mktable "$part_table" ||\
|
||||
error "Failed to create $part_table partition on $DEVICE!"
|
||||
|
||||
echo "new part table: $DEVICE = $part_table"
|
||||
}
|
||||
|
||||
umount_devices(){
|
||||
# Umount all swap partitions.
|
||||
swapoff -a
|
||||
|
||||
# Umount /target
|
||||
[ -d /target ] && umount -R /target
|
||||
}
|
||||
|
||||
get_next_part_start_pos() {
|
||||
local dev_info=$1
|
||||
# 计算分区信息
|
||||
local offset=$(fdisk -l $dev_info | grep "^$dev_info" | wc -l)
|
||||
PART_NUM=$offset
|
||||
if [ $offset = '0' ]; then
|
||||
offset=$LOGICAL_SECTORS_PER_MB
|
||||
else
|
||||
local end=$(expr $(fdisk -l $dev_info -o END | sed -n '$p') + 1)
|
||||
offset=$end
|
||||
fi
|
||||
|
||||
echo $offset
|
||||
}
|
||||
|
||||
get_system_disk_extend_size() {
|
||||
local size=$(installer_get "DI_FULLDISK_MULTIDISK_EXTSIZE_0")
|
||||
echo $((size * LOGICAL_SECTORS_PER_MB))
|
||||
}
|
||||
|
||||
# Create partition.
|
||||
create_part() {
|
||||
local part="$1"
|
||||
local label="$2"
|
||||
local dev=$3
|
||||
local swap_size part_path part_mp part_fs _part_fs part_start part_end mapper_name
|
||||
|
||||
echo "label:{${label}}"
|
||||
[[ "${label}" == "null" ]] && label=""
|
||||
|
||||
let PART_NUM++
|
||||
echo "============PART_NUM: $PART_NUM============"
|
||||
|
||||
echo "PART:{${part}},label:{${label}}"
|
||||
|
||||
# Get partition info.
|
||||
[[ "$part" =~ ^(.*):(.*):(.*):(.*)$ ]] || error "Bad partition info!"
|
||||
part_mp="${BASH_REMATCH[1]}"
|
||||
part_fs="${BASH_REMATCH[2]}"
|
||||
part_size="${BASH_REMATCH[4]}"
|
||||
part_start=$(get_next_part_start_pos $dev)
|
||||
# Create extended partition.
|
||||
if ((PART_NUM == 2)) && (! ($EFI || $LVM)) && \
|
||||
[ "x$part_fs" != "xlvm_type" ] && [ "x$part_fs" != "xcrypto_luks" ]; then
|
||||
echo "Create extended partition..."
|
||||
part_end=$((part_start + $(get_system_disk_extend_size)))
|
||||
part_end=$(align_partition_end $part_end)
|
||||
|
||||
part_start=$(align_partition_start $part_start)
|
||||
|
||||
parted -s "$DEVICE" mkpart extended "${part_start}s" "${part_end}s" ||\
|
||||
error "Failed to create extended partition on $DEVICE!"
|
||||
#setup_part $dev "extended" $(get_system_disk_extend_size)
|
||||
let PART_NUM=5
|
||||
echo "============PART_NUM: $PART_NUM============"
|
||||
PART_TYPE="logical"
|
||||
fi
|
||||
if ! $LVM; then
|
||||
AVL_SIZE=$((DEVICE_SIZE - 1 - part_start / LOGICAL_SECTORS_PER_MB))
|
||||
# gpt格式磁盘需要在尾部预留33个扇区空间存储分区表
|
||||
[ "x$EFI" == "xtrue" ] && AVL_SIZE=$((AVL_SIZE - 33 - 1))
|
||||
else
|
||||
[[ "$(vgs -ovg_free --readonly --units m $VG_NAME)" =~ ([0-9]+) ]] &&\
|
||||
AVL_SIZE="${BASH_REMATCH[1]}"
|
||||
fi
|
||||
|
||||
echo "Avaiable size: $AVL_SIZE"
|
||||
|
||||
if [[ "$part_size" =~ %$ ]]; then
|
||||
part_size=$((AVL_SIZE * ${part_size%\%} / 100))
|
||||
elif [ ${part_size} -gt ${AVL_SIZE} ] && [ ${AVL_SIZE} -gt 0 ]; then
|
||||
echo "adjuest part_size:${part_size}=>${AVL_SIZE}"
|
||||
part_size=${AVL_SIZE}
|
||||
fi
|
||||
echo "Calculated partition size: $part_size"
|
||||
|
||||
# Create new partition.
|
||||
if ! $LVM; then
|
||||
case "$part_fs" in
|
||||
efi)
|
||||
_part_fs=fat32;;
|
||||
crypto_luks)
|
||||
_part_fs='';;
|
||||
lvm_type)
|
||||
_part_fs=''
|
||||
PART_TYPE="primary"
|
||||
[ "x$EFI" != "xtrue" ] && [ $PART_NUM -gt 4 ] && PART_NUM=3
|
||||
;;
|
||||
recovery)
|
||||
_part_fs=ext4;;
|
||||
*)
|
||||
printf -v _part_fs '%q' "$part_fs";;
|
||||
esac
|
||||
|
||||
# 分区最小对齐
|
||||
part_end=$((part_start + part_size * LOGICAL_SECTORS_PER_MB))
|
||||
part_end=$(align_partition_end $part_end)
|
||||
|
||||
part_start=$(align_partition_start $part_start)
|
||||
[ "x$PART_TYPE" = "xlogical" ] && part_start=$((part_start + LOGICAL_SECTORS_PER_MB))
|
||||
|
||||
echo "part: $part_mp, $part_fs, $part_start, $part_end"
|
||||
if parted -s "$DEVICE" mkpart "$PART_TYPE" $_part_fs "${part_start}s" "${part_end}s"; then
|
||||
#if setup_part $dev $PART_TYPE $part_size ; then
|
||||
if [[ "$DEVICE" =~ [0-9]$ ]]; then
|
||||
part_path="${DEVICE}p${PART_NUM}"
|
||||
else
|
||||
part_path="${DEVICE}${PART_NUM}"
|
||||
fi
|
||||
else
|
||||
error "Failed to create partition $part_mp!"
|
||||
fi
|
||||
else
|
||||
let LVM_NUM++
|
||||
part_size=$((part_size - 2)) # LVM需要额外的2Mib空间
|
||||
echo "{LVM_NUM:{${LVM_NUM},label:{${label:-LVM_NUM${LVM_NUM}}} vg_name:{${VG_NAME}}"
|
||||
lvcreate --wipesignatures y -n"${label:-LVM_NUM${LVM_NUM}}" -L"$part_size" "$VG_NAME" --yes ||\
|
||||
error "Failed to create logical volume ${label:-LVM_NUM${LVM_NUM}} on $VG_NAME!"
|
||||
|
||||
part_path="/dev/$VG_NAME/${label:-LVM_NUM${LVM_NUM}}"
|
||||
fi
|
||||
|
||||
flush_message
|
||||
|
||||
# Create filesystem.
|
||||
case "$part_fs" in
|
||||
efi)
|
||||
{
|
||||
format_part "$part_path" fat32 "$label" &&\
|
||||
# Set esp flag.
|
||||
parted -s "$DEVICE" set "$PART_NUM" esp on
|
||||
} || error "Failed to create ESP($part_path) on $DEVICE!"
|
||||
|
||||
# No need to append EFI partition to mount point list.
|
||||
# MP_LIST="${MP_LIST+$MP_LIST;}$part_path=$part_mp"
|
||||
installer_set DI_BOOTLOADER "$part_path"
|
||||
;;
|
||||
crypto_luks)
|
||||
mapper_name="$part_mp"
|
||||
part_mp="/dev/mapper/$mapper_name"
|
||||
|
||||
installer_set DI_CRYPT_ROOT "true"
|
||||
|
||||
[[ -n ${CRYPT_INFO} ]] && CRYPT_INFO+=";"
|
||||
CRYPT_INFO+="$part_path:$mapper_name"
|
||||
|
||||
local crypt_algorithm=$(installer_get disk_crypt_algorithm)
|
||||
|
||||
msg "cryptsetup ${crypt_algorithm} -v luksFormat "$part_path""
|
||||
|
||||
DI_CRYPT_PASSWD=$(installer_get DI_CRYPT_PASSWD)
|
||||
|
||||
if [ "x$(installer_get "all_password_encryption")" = "xtrue" ]; then
|
||||
{
|
||||
command-execute-agent "$DI_CRYPT_PASSWD" "echo \"%1\" | cryptsetup ${crypt_algorithm} -v luksFormat \"$part_path\"" &&\
|
||||
command-execute-agent "$DI_CRYPT_PASSWD" "echo \"%1\" | cryptsetup open \"$part_path\" \"$mapper_name\""
|
||||
} || error "Failed to create luks partition($part_path)!"
|
||||
else
|
||||
{
|
||||
echo "$DI_CRYPT_PASSWD" | cryptsetup ${crypt_algorithm} -v luksFormat "$part_path" &&\
|
||||
echo "$DI_CRYPT_PASSWD" | cryptsetup open "$part_path" "$mapper_name"
|
||||
} || error "Failed to create luks partition($part_path)!"
|
||||
fi
|
||||
|
||||
{
|
||||
pvcreate "$part_mp" -ffy &&\
|
||||
vgcreate "$VG_NAME" "$part_mp"
|
||||
} || error "Failed to create volume group: $VG_NAME!"
|
||||
declare -g LVM="true"
|
||||
;;
|
||||
lvm_type)
|
||||
{
|
||||
VG_NAME=$part_mp
|
||||
pvcreate "$part_path" -ffy &&\
|
||||
vgcreate "$VG_NAME" "$part_path"
|
||||
} || error "Failed to create volume group: $VG_NAME!"
|
||||
declare -g LVM="true"
|
||||
;;
|
||||
*)
|
||||
format_part "$part_path" "$part_fs" "$label" ||\
|
||||
error "Failed to create $part_fs filesystem on $part_path!"
|
||||
[ -n "$part_mp" ] && MP_LIST="${MP_LIST+$MP_LIST;}$part_path=$part_mp"
|
||||
;;
|
||||
esac
|
||||
|
||||
flush_message
|
||||
|
||||
# Set boot flag.
|
||||
case "$part_mp" in
|
||||
/boot)
|
||||
# Set boot flag in legacy mode.
|
||||
$EFI || parted -s "$DEVICE" set "$PART_NUM" boot on
|
||||
;;
|
||||
/)
|
||||
installer_set "DI_ROOT_PARTITION" "$part_path"
|
||||
# Set boot flag if /boot is not used in legacy mode.
|
||||
($EFI || $LVM || [[ "$PART_POLICY" =~ "/boot:" ]]) ||\
|
||||
parted -s "$DEVICE" set "$PART_NUM" boot on
|
||||
;;
|
||||
esac || error "Failed to set boot flag on $part_path!"
|
||||
|
||||
flush_message
|
||||
}
|
||||
|
||||
delete_part() {
|
||||
local DEVICE=$1
|
||||
local NUM=$2
|
||||
parted -s $DEVICE rm $NUM
|
||||
}
|
||||
|
||||
delete_lvm() {
|
||||
local DEVICE=$1
|
||||
local vg_path="/dev/$(pvdisplay -c | grep -i "$DEVICE" | awk -F ":" '{print $2}')"
|
||||
local pv_name=$(pvdisplay -c | grep -i "$DEVICE" | awk -F ":" '{print $1}')
|
||||
echo "vg_path=$vg_path; pv_name=$pv_name"
|
||||
if [ -n "$pv_name" ]; then
|
||||
if [ -f "$vg_path" ]; then
|
||||
for lv_name in $vg_path/*
|
||||
do
|
||||
lvremove -f $lv_name
|
||||
done
|
||||
fi
|
||||
vgremove -f $vg_path
|
||||
pvremove -f $pv_name
|
||||
fi
|
||||
}
|
||||
|
||||
delete_crypt_lvm() {
|
||||
local DEVICE=$1
|
||||
local luks_crypt=$(lsblk -l $DEVICE | grep luks_crypt)
|
||||
if [ -n "$luks_crypt" ]; then
|
||||
DEVICE="/dev/mapper/$luks_crypt"
|
||||
fi
|
||||
delete_lvm $DEVICE
|
||||
}
|
||||
|
||||
get_part_path() {
|
||||
local DEVICE=$1
|
||||
local LABEL=$2
|
||||
local PART_PATH=$(lsblk -lf $DEVICE | grep $LABEL | awk '{print $1}')
|
||||
if [ ! -n "$PART_PATH" ]; then
|
||||
echo ""
|
||||
else
|
||||
echo "/dev/$PART_PATH"
|
||||
fi
|
||||
}
|
||||
get_part_number() {
|
||||
local PART_PATH=$1
|
||||
echo "${PART_PATH##*[a-zA-Z]}"
|
||||
}
|
||||
|
||||
get_part_fstype() {
|
||||
local DEVICE=$1
|
||||
local LABEL=$2
|
||||
local PART_LABEL=$(lsblk -o FSTYPE,LABEL $DEVICE | grep $LABEL | awk '{print $1}')
|
||||
if [ ! -n "$PART_LABEL" ]; then
|
||||
echo ""
|
||||
else
|
||||
echo "$PART_LABEL"
|
||||
fi
|
||||
}
|
||||
|
||||
get_part_mountpoint() {
|
||||
local LABEL=$1
|
||||
if [ "x$LABEL" = "xEFI" ]; then
|
||||
echo "/boot/efi"
|
||||
elif [ "x$LABEL" = "xBoot" ]; then
|
||||
echo "/boot"
|
||||
elif [ "x$LABEL" = "xBackup" ];then
|
||||
echo "/recovery"
|
||||
elif [ "x$LABEL" = "xSWAP" ];then
|
||||
echo "swap"
|
||||
elif [ "x$LABEL" = "xRoota" ];then
|
||||
echo "/"
|
||||
elif [ "x$LABEL" = "x_dde_data" ];then
|
||||
echo "$(installer_get DI_DATA_MOUNT_POINT)"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
proc_empty_str() {
|
||||
local str="$1"
|
||||
while [[ "${str}" =~ ";;" ]]
|
||||
do
|
||||
str=$(echo "${str}" | sed 's/;;/;null;/g')
|
||||
done
|
||||
[[ "${str}" =~ \;$ ]] && str=${str}null
|
||||
[[ "${str}" =~ ^\; ]] && str=null${str}
|
||||
echo ${str}
|
||||
}
|
||||
|
||||
main(){
|
||||
# Based on the following process:
|
||||
# * Umount devices.
|
||||
# * Get boot mode.
|
||||
# * Get partitioning policy.
|
||||
# * Create new partition table.
|
||||
# * Create partitions.
|
||||
# * Notify kernel.
|
||||
|
||||
installer_set DI_UEFI "false"
|
||||
umount_devices
|
||||
|
||||
local policy_device="DI_FULLDISK_MULTIDISK_DEVICE"
|
||||
local policy_name="DI_FULLDISK_MULTIDISK_POLICY_"
|
||||
local policy_name_label="DI_FULLDISK_MULTIDISK_LABEL_"
|
||||
|
||||
local PART_DEVICE=$(installer_get $policy_device)
|
||||
local part_device_array=(${PART_DEVICE//;/ })
|
||||
declare -i index=0
|
||||
|
||||
for j in "${part_device_array[@]}"; do
|
||||
DEVICE="${j}"
|
||||
VG_NAME="vg${index}"
|
||||
echo "Target device: {$DEVICE} VG_NAME:{${VG_NAME}}"
|
||||
|
||||
DEVICE_SIZE=0
|
||||
AVL_SIZE=0
|
||||
#PART_NUM=0
|
||||
LVM_NUM=0
|
||||
LAST_END=1
|
||||
|
||||
LVM="false"
|
||||
PART_TYPE="primary"
|
||||
LARGE="false"
|
||||
EFI="false"
|
||||
LVM="false"
|
||||
partprobe "$DEVICE"
|
||||
if [ "$DEVICE" = auto_max ]; then
|
||||
get_max_capacity_device
|
||||
fi
|
||||
[ -b "$DEVICE" ] || error "Device not found!"
|
||||
|
||||
check_device_size ${index}
|
||||
get_logical_sectors_per_MB ${DEVICE}
|
||||
check_efi_mode
|
||||
echo "Device size: $DEVICE_SIZE"
|
||||
|
||||
PART_POLICY=$(installer_get ${policy_name}${index})
|
||||
PART_LABEL=$(installer_get ${policy_name_label}${index})
|
||||
echo "POLICY:{${PART_POLICY}}"
|
||||
echo "LABEL:{${PART_LABEL}}"
|
||||
|
||||
local part_policy_array=(${PART_POLICY//;/ })
|
||||
local part_label_array=$(proc_empty_str ${PART_LABEL})
|
||||
part_label_array=(${part_label_array//;/ })
|
||||
|
||||
echo "policy:{${part_policy_array[@]}}"
|
||||
echo "label:{${part_label_array[@]}}"
|
||||
echo "policy#:${#part_policy_array[@]} label:${#part_label_array[@]}"
|
||||
|
||||
if [ x$(installer_get "multi_system_eanble") = "xtrue" ]; then
|
||||
echo "multi_system is true"
|
||||
PART_NUM=$(installer_get DI_PART_NUM)
|
||||
else
|
||||
PART_NUM=0
|
||||
delete_lvm "$DEVICE"
|
||||
delete_crypt_lvm "$DEVICE"
|
||||
new_part_table "$DEVICE"
|
||||
fi
|
||||
|
||||
for i in "${!part_policy_array[@]}"; do
|
||||
create_part "${part_policy_array[$i]}" "${part_label_array[$i]}" "${DEVICE}"
|
||||
done
|
||||
index=index+1
|
||||
|
||||
done
|
||||
|
||||
echo "MOUNTPOINTS:{${MP_LIST}}"
|
||||
echo "ROOT_DISK:{${part_device_array[0]}}"
|
||||
|
||||
installer_set DI_MOUNTPOINTS "$MP_LIST"
|
||||
|
||||
# # Write boot method.
|
||||
if $EFI; then
|
||||
installer_set DI_UEFI "true"
|
||||
|
||||
is_sw && installer_set DI_BOOTLOADER "${part_device_array[0]}"
|
||||
else
|
||||
installer_set DI_BOOTLOADER "${part_device_array[0]}"
|
||||
fi
|
||||
|
||||
echo "CRYPT_INFO:{${CRYPT_INFO}}"
|
||||
installer_set DI_CRYPT_INFO "${CRYPT_INFO}"
|
||||
installer_set DI_ROOT_DISK "${part_device_array[0]}"
|
||||
installer_set DI_FULLDISK_MODE "true"
|
||||
}
|
||||
|
||||
part_to_device() {
|
||||
local part_path=$1
|
||||
echo "$part_path" | sed -r "s/[p]{0,1}[0-9]+$//g"
|
||||
}
|
||||
|
||||
sava_data() {
|
||||
|
||||
local PART_DEVICE=$(installer_get "DI_FULLDISK_MULTIDISK_DEVICE")
|
||||
local part_device_array=(${PART_DEVICE//;/ })
|
||||
local ROOT_DISK="${part_device_array[0]}"
|
||||
local LEN=${#part_device_array[@]}
|
||||
|
||||
for j in "${part_device_array[@]}"; do
|
||||
DEVICE="${j}"
|
||||
# 获取磁盘分区label
|
||||
part_labels=$(lsblk -o LABEL -lnf $DEVICE | grep [a-z/A-Z] | xargs)
|
||||
IFS=" "
|
||||
local part_labels_arr=(${part_labels})
|
||||
for j in "${part_labels_arr[@]}"; do
|
||||
local p_label=$j
|
||||
local p_path=$(get_part_path $DEVICE $p_label)
|
||||
local p_fs=$(get_part_fstype $DEVICE $p_label)
|
||||
local p_mountpoint=$(get_part_mountpoint $p_label)
|
||||
echo "part_info: $p_label;$p_path;$p_fs;$p_mountpoint"
|
||||
if [ "x$p_label" = "xEFI" ] || [ "x$p_label" = "xBoot" ] || [ "x$p_label" = "xBackup" ] \
|
||||
|| [ "x$p_label" = "xRoota" ] || [ "x$p_label" = "xRootb" ]; then
|
||||
format_part "$p_path" "$p_fs" "$p_label" ||\
|
||||
error "Failed to create $p_fs filesystem on $p_path!"
|
||||
fi
|
||||
|
||||
[ "x$p_label" = "xBoot" ] && installer_set "DI_BOOTLOADER" "$(part_to_device ${p_path})"
|
||||
[ "x$p_label" = "xRoota" ] && installer_set "DI_ROOT_PARTITION" "$p_path"
|
||||
|
||||
# 系统和数据盘里都有data分区时,只挂载数据盘里的分区,清理掉系统盘的挂载点
|
||||
[ $LEN -eq 2 ] && [ "x$ROOT_DISK" = "x$DEVICE" ] && [ "x$p_label" = "x_dde_data" ] \
|
||||
&& p_mountpoint=""
|
||||
# 系统和数据盘里都全盘安装过系统时,只挂载系统盘里除data分区以外的分区,清理掉数据盘中除data分区以外的分区的挂载点
|
||||
[ $LEN -eq 2 ] && [ "x$ROOT_DISK" != "x$DEVICE" ] && [ "x$p_label" != "x_dde_data" ] \
|
||||
&& p_mountpoint=""
|
||||
|
||||
[ -n "$p_mountpoint" ] && MP_LIST="${MP_LIST+$MP_LIST;}$p_path=$p_mountpoint"
|
||||
done
|
||||
done
|
||||
|
||||
echo "MOUNTPOINTS:{${MP_LIST}}"
|
||||
echo "ROOT_DISK:{${part_device_array[0]}}"
|
||||
|
||||
installer_set DI_MOUNTPOINTS "$MP_LIST"
|
||||
|
||||
check_efi_mode
|
||||
if $EFI; then
|
||||
installer_set DI_UEFI "true"
|
||||
fi
|
||||
|
||||
# 寻找EFI
|
||||
local part_path=$(fdisk -l -o Device,Type | grep $ROOT_DISK | grep EFI | awk '{print $1}')
|
||||
if [ -n "$part_path" ]; then
|
||||
installer_set "DI_BOOTLOADER" $part_path
|
||||
fi
|
||||
|
||||
installer_set DI_ROOT_DISK "$ROOT_DISK"
|
||||
installer_set DI_FULLDISK_MODE "true"
|
||||
}
|
||||
|
||||
. ./basic_utils.sh
|
||||
|
||||
DI_CUSTOM_PARTITION_SCRIPT=$(installer_get DI_CUSTOM_PARTITION_SCRIPT)
|
||||
SAVE_DATA=$(installer_get DI_SAVE_DATA)
|
||||
echo "SAVE_DATA=$SAVE_DATA"
|
||||
if [ -f "$DI_CUSTOM_PARTITION_SCRIPT" ]; then
|
||||
echo "Call custom partition script($DI_CUSTOM_PARTITION_SCRIPT)..."
|
||||
bash "$DI_CUSTOM_PARTITION_SCRIPT"
|
||||
elif [ "x$SAVE_DATA" = "xtrue" ]; then
|
||||
sava_data
|
||||
else
|
||||
main
|
||||
fi
|
||||
|
|
@ -0,0 +1,553 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# This module defines basic utilities used in almost all scripts.
|
||||
|
||||
# Set environment
|
||||
export LANG=C LC_ALL=C
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
export APT_OPTIONS='-y -o Dpkg::Options::="--force-confdef" \
|
||||
-o Dpkg::Options::="--force-confold" --force-yes --no-install-recommends \
|
||||
--allow-unauthenticated'
|
||||
|
||||
# Absolute path to config file.
|
||||
# Do not read from/write to this file, call installer_get/installer_set instead.
|
||||
CONF_FILE=/etc/deepin-installer.conf
|
||||
EXPERIENCE_FILE=/etc/deepin/deepin-user-experience
|
||||
|
||||
# Print error message and exit
|
||||
error() {
|
||||
local msg="$@"
|
||||
echo " "
|
||||
echo "!! Error: ${msg}" >&2
|
||||
echo " "
|
||||
exit 1
|
||||
}
|
||||
|
||||
warn() {
|
||||
local msg="$@"
|
||||
echo "Warn: ${msg}" >&2
|
||||
}
|
||||
|
||||
warn_exit() {
|
||||
local msg="$@"
|
||||
echo "Warn: ${msg}" >&2
|
||||
exit 0
|
||||
}
|
||||
|
||||
# standard message
|
||||
msg() {
|
||||
local msg="$@"
|
||||
echo "Info: ${msg}"
|
||||
}
|
||||
|
||||
debug() {
|
||||
local msg="$@"
|
||||
echo "Debug: ${msg}"
|
||||
}
|
||||
|
||||
# Get value in conf file. Section name is ignored.
|
||||
# NOTE(xushaohua): Global variant or environment $CONF_FILE must not be empty.
|
||||
installer_get() {
|
||||
local key="$1"
|
||||
[ -z "${CONF_FILE}" ] && exit "CONF_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings get "${CONF_FILE}" "${key}"
|
||||
}
|
||||
|
||||
installer_record_set(){
|
||||
#chroot /target
|
||||
local recordsession="$1"
|
||||
local recordkey="$2"
|
||||
local recordvalue="$3"
|
||||
[ -z "${EXPERIENCE_FILE}" ] && exit "EXPERIENCE_FILE is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings set "${EXPERIENCE_FILE}" "${recordsession}" "${recordkey}" "${recordvalue}"
|
||||
}
|
||||
|
||||
# Set value in conf file. Section name is ignored.
|
||||
installer_set() {
|
||||
local key="$1"
|
||||
local value="$2"
|
||||
local workspace=$3
|
||||
local CONF_F=$workspace/${CONF_FILE}
|
||||
|
||||
[ -z "${CONF_F}" ] && exit "$CONF_F is not defined"
|
||||
which deepin-installer-settings 1>/dev/null || \
|
||||
exit "deepin-installer-settings not found!"
|
||||
deepin-installer-settings set "${CONF_F}" "${key}" "${value}"
|
||||
}
|
||||
|
||||
update_local() {
|
||||
local DI_LOCALE=$(installer_get "DI_LOCALE")
|
||||
DI_LOCALE=${DI_LOCALE:-en_US}
|
||||
|
||||
export LANGUAGE=${DI_LOCALE}
|
||||
export LANG=${DI_LOCALE}.UTF-8
|
||||
export LC_ALL=
|
||||
}
|
||||
|
||||
# update grub config by locale
|
||||
update_grub_local() {
|
||||
update_local
|
||||
[ -x /usr/sbin/update-grub ] && /usr/sbin/update-grub
|
||||
}
|
||||
|
||||
# Check whether current platform is loongson or not.
|
||||
is_loongson() {
|
||||
case $(uname -m) in
|
||||
loongson | mips* | loongarch64)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
is_loongarch() {
|
||||
case $(uname -m) in
|
||||
loongarch64)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
# Check whether current platform is sw or not.
|
||||
is_sw() {
|
||||
case $(uname -m) in
|
||||
sw*)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check whether current platform is x86/x86_64 or not.
|
||||
is_x86() {
|
||||
case $(uname -m) in
|
||||
i386 | i686 | amd64 | x86 | x86_64)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check whether current platform is arm64 or not.
|
||||
is_arm64() {
|
||||
case $(uname -m) in
|
||||
arm64 | aarch64)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Check whether graphics card is integrated or not.
|
||||
is_loongson_integrated_graphics() {
|
||||
local ret=$(lshw -c video | grep "driver=loongson-drm")
|
||||
if [ ! -z "${ret}" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
install_package() {
|
||||
# DEBIAN_FRONTEND="noninteractive" apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends --allow-unauthenticated install $@
|
||||
for i in $@;
|
||||
do
|
||||
DEBIAN_FRONTEND="noninteractive" apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --no-install-recommends --allow-unauthenticated install $i
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "succeed"
|
||||
else
|
||||
echo "Install Failed : $i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
setup_lightdm_auto_login() {
|
||||
if [ x$(installer_get "lightdm_enable_auto_login") != "xtrue" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local USERNAME
|
||||
USERNAME=$(installer_get "DI_USERNAME")
|
||||
[ -f /etc/lightdm/lightdm.conf ] || warn_exit "lightdm.conf not found!"
|
||||
deepin-installer-simpleini set /etc/lightdm/lightdm.conf \
|
||||
"Seat:*" "autologin-user" "${USERNAME}"
|
||||
}
|
||||
|
||||
encryption_file() {
|
||||
local file=$1
|
||||
cat $file | base64 > $file.tmp
|
||||
mv $file.tmp $file && chmod 600 $file
|
||||
}
|
||||
|
||||
decryption_file() {
|
||||
local file=$1
|
||||
cat $file | base64 -d > $file.tmp
|
||||
mv $file.tmp $file && chmod 600 $file
|
||||
}
|
||||
|
||||
select_efi_part() {
|
||||
local root_path=`installer_get DI_ROOT_DISK`
|
||||
# 获取用户创建的efi
|
||||
local efi_dev_path=`installer_get DI_BOOTLOADER`
|
||||
# 获取系统盘下的efi
|
||||
[ -n "$efi_dev_path" ] || efi_dev_path=`fdisk -l $root_path -o Device,Type | grep -E 'EFI' | awk '{print $1}'`
|
||||
# 获取其他盘下的efi
|
||||
[ -n "$efi_dev_path" ] || efi_dev_path=`fdisk -l -o Device,Type | grep -E 'EFI' | awk '{print $1}'`
|
||||
[ -n "$efi_dev_path" ] && installer_set DI_BOOTLOADER $efi_dev_path
|
||||
}
|
||||
|
||||
add_start_option() {
|
||||
local arch_info=$@
|
||||
local bootloader_id=$(installer_get "system_startup_option")
|
||||
|
||||
## 基础启动项,默认UOS
|
||||
grub-install $arch_info --efi-directory=/boot/efi --bootloader-id="${bootloader_id}" --recheck \
|
||||
|| error "grub-install failed with $arch_info" "${bootloader_id}"
|
||||
|
||||
# Copy signed grub efi file.
|
||||
is_community || [ -d /boot/efi/EFI/ubuntu ] || mkdir -p /boot/efi/EFI/ubuntu
|
||||
is_community || cp -vf /boot/efi/EFI/${bootloader_id}/grub* /boot/efi/EFI/ubuntu/
|
||||
|
||||
[ -d /boot/efi/EFI/boot ] || mkdir -p /boot/efi/EFI/boot
|
||||
cp -vf /boot/efi/EFI/${bootloader_id}/grub* /boot/efi/EFI/boot/
|
||||
|
||||
# 32bit机型默认的efi引导文件
|
||||
fallback_efi=/boot/efi/EFI/boot/bootia32.efi
|
||||
fallback_efi_bak="${fallback_efi}-$(date +%s).bak"
|
||||
[ -f "${fallback_efi}" ] && cp "${fallback_efi}" "${fallback_efi_bak}"
|
||||
# Override fallback efi with shim.
|
||||
cp -vf /boot/efi/EFI/${bootloader_id}/shim*.efi "${fallback_efi}"
|
||||
|
||||
# x86的64bit机型默认的efi引导文件
|
||||
if is_x86; then
|
||||
fallback_efi=/boot/efi/EFI/boot/bootx64.efi
|
||||
fallback_efi_bak="${fallback_efi}-$(date +%s).bak"
|
||||
[ -f "${fallback_efi}" ] && cp "${fallback_efi}" "${fallback_efi_bak}"
|
||||
# Override fallback efi with shim.
|
||||
cp -vf /boot/efi/EFI/${bootloader_id}/shim*.efi "${fallback_efi}"
|
||||
fi
|
||||
|
||||
# arm64的64bit机型默认的efi引导文件
|
||||
if is_arm64; then
|
||||
fallback_efi=/boot/efi/EFI/boot/bootaa64.efi
|
||||
fallback_efi_bak="${fallback_efi}-$(date +%s).bak"
|
||||
[ -f "${fallback_efi}" ] && cp "${fallback_efi}" "${fallback_efi_bak}"
|
||||
# Override fallback efi with shim.
|
||||
if ls /boot/efi/EFI/${bootloader_id}/shim* 1>/dev/null 2>&1; then
|
||||
cp -vf /boot/efi/EFI/${bootloader_id}/shim*.efi "${fallback_efi}"
|
||||
else
|
||||
cp -vf /boot/efi/EFI/${bootloader_id}/grubaa64.efi "${fallback_efi}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
fix_boot_order(){
|
||||
command -v efibootmgr >/dev/null 2>&1 || \
|
||||
warn "Require efibootmgr installed but not found. Skip"
|
||||
return
|
||||
|
||||
local bootinfo=$(efibootmgr)
|
||||
echo "bootinfo: ${bootinfo}"
|
||||
IFS=$'\n'
|
||||
for line in $bootinfo;do
|
||||
case $line in
|
||||
Boot[0-9A-F][0-9A-F][0-9A-F][0-9A-F]\*\ "${BOOTLOADER_ID}")
|
||||
line="${line%%\**}"
|
||||
default_bootid="${line##Boot}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ -z ${default_bootid} ] && warn_exit "No ${BOOTLOADER_ID} found, exit..."
|
||||
|
||||
declare -a orderids
|
||||
for line in $bootinfo;do
|
||||
case $line in
|
||||
Boot[0-9A-F][0-9A-F][0-9A-F][0-9A-F]\*\ "${BOOTLOADER_ID}")
|
||||
;;
|
||||
|
||||
Boot[0-9A-F][0-9A-F][0-9A-F][0-9A-F]\*\ ?*)
|
||||
line="${line%%\**}"
|
||||
orderids[${#orderids[@]}]="${line##Boot}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
local cmdargs=${default_bootid}
|
||||
for arg in ${orderids[@]}; do
|
||||
cmdargs=${cmdargs}","${arg}
|
||||
done
|
||||
efibootmgr -o ${cmdargs}
|
||||
}
|
||||
|
||||
init_backup() {
|
||||
echo "init_backup"
|
||||
}
|
||||
|
||||
init_checkmode() {
|
||||
echo "init_checkmode"
|
||||
}
|
||||
|
||||
init_firstboot() {
|
||||
echo "init_firstboot"
|
||||
local CONF_FILE=/etc/lightdm/lightdm.conf
|
||||
local TEMP_CONF_FILE=/etc/lightdm/lightdm.conf.real
|
||||
if [ -f "${CONF_FILE}" ]; then
|
||||
install -v -m644 "${CONF_FILE}" "${TEMP_CONF_FILE}"
|
||||
fi
|
||||
|
||||
cat > "${CONF_FILE}" <<EOF
|
||||
[Seat:*]
|
||||
display-setup-script=/usr/bin/deepin-installer-bases
|
||||
greeter-session=lightdm-gtk-greeter
|
||||
greeter-setup-script=bash /usr/bin/deepin-installer-core /usr/share/deepin-installer-exec/deepin-installer-first-boot
|
||||
EOF
|
||||
}
|
||||
|
||||
is_service() {
|
||||
local type=$(cat /etc/deepin-version | grep Type=)
|
||||
type="${type##Type=}"
|
||||
if [ "x$type" = "xServer" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_community() {
|
||||
local type=$(cat /etc/deepin-version | grep Type=)
|
||||
type="${type##Type=}"
|
||||
if [ "x$type" = "xDesktop" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_device() {
|
||||
local type=$(cat /etc/deepin-version | grep Type=)
|
||||
type="${type##Type=}"
|
||||
if [ "x$type" = "xDevice" ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
system_name() {
|
||||
local name=$(cat /etc/os-version | grep SystemName=)
|
||||
name="${name##SystemName=}"
|
||||
echo "$name"
|
||||
}
|
||||
|
||||
create_primary_part() {
|
||||
local DEV=$1
|
||||
local PART_TYPE=$2
|
||||
local PART_SIZE=$3
|
||||
|
||||
fdisk $DEV << EOF
|
||||
n
|
||||
$PART_TYPE
|
||||
|
||||
|
||||
+${PART_SIZE}M
|
||||
w
|
||||
EOF
|
||||
}
|
||||
|
||||
create_logical_part() {
|
||||
local DEV=$1
|
||||
local PART_SIZE=$2
|
||||
|
||||
fdisk $DEV << EOF
|
||||
n
|
||||
l
|
||||
|
||||
+${PART_SIZE}M
|
||||
w
|
||||
EOF
|
||||
}
|
||||
|
||||
setup_part() {
|
||||
local DEV=$1
|
||||
local PART_TYPE=$2
|
||||
local PART_SIZE=$3
|
||||
if [ "x$PART_TYPE" = "xlogical" ]; then
|
||||
create_logical_part $DEV $PART_SIZE
|
||||
else
|
||||
create_primary_part $@
|
||||
fi
|
||||
}
|
||||
|
||||
chech_use_crypt(){
|
||||
local DI_CRYPT_PASSWD=$(installer_get DI_CRYPT_PASSWD)
|
||||
if [ -n "$DI_CRYPT_PASSWD" ]; then
|
||||
installer_set DI_CRYPT_PASSWD "NULL"
|
||||
fi
|
||||
|
||||
local DI_NEW_CRYPT_PASSWD=$(installer_get DI_NEW_CRYPT_PASSWD)
|
||||
if [ -n "$DI_NEW_CRYPT_PASSWD" ]; then
|
||||
installer_set DI_NEW_CRYPT_PASSWD "NULL"
|
||||
fi
|
||||
}
|
||||
|
||||
update_disk_cryption_passwd(){
|
||||
local old_passwd=$(installer_get DI_CRYPT_PASSWD)
|
||||
local new_passwd=$(installer_get DI_NEW_CRYPT_PASSWD)
|
||||
local PART_DEVICE=$(installer_get "DI_FULLDISK_MULTIDISK_DEVICE")
|
||||
local part_device_array=(${PART_DEVICE//;/ })
|
||||
|
||||
for(( i=0;i<${#part_device_array[@]};i++ )) do
|
||||
local device=${part_device_array[i]}
|
||||
local crypt_part="/dev/$(lsblk -lf $device -o NAME,FSTYPE | grep -E "crypto_LUKS" | awk '{print $1}')"
|
||||
if [ -n "$new_passwd" ] && [ -n "$old_passwd" ]; then
|
||||
cryptsetup luksAddKey $crypt_part << EOF
|
||||
$old_passwd
|
||||
$new_passwd
|
||||
$new_passwd
|
||||
EOF
|
||||
echo -n "$old_passwd" | cryptsetup luksRemoveKey $crypt_part
|
||||
fi
|
||||
done
|
||||
|
||||
chech_use_crypt # 清空配置文件中的密码
|
||||
}
|
||||
|
||||
save_old_user_data() {
|
||||
local WORK_DIR="/home"
|
||||
local USERNAME=$(installer_get DI_USERNAME)
|
||||
local DIR_LISTS=$(ls $WORK_DIR | grep -v "^${USERNAME}$" \
|
||||
| xargs -I {} echo $WORK_DIR/{} | xargs echo)
|
||||
|
||||
local DEBUG_FLAG=$(installer_get system_debug)
|
||||
local CMD_ARGS="-a --progress --remove-source-files"
|
||||
|
||||
if [ "x$DEBUG_FLAG" != "xtrue" ]; then
|
||||
CMD_ARGS="-a --remove-source-files"
|
||||
fi
|
||||
|
||||
echo "DIR_LISTS=$DIR_LISTS"
|
||||
if [ -n "$DIR_LISTS" ]; then
|
||||
rsync $CMD_ARGS $DIR_LISTS $WORK_DIR/.old_user_data
|
||||
chown root:root $WORK_DIR/.old_user_data -R
|
||||
rm -fr $DIR_LISTS
|
||||
fi
|
||||
}
|
||||
|
||||
skip_disk_crypt() {
|
||||
local workspace=$1
|
||||
local DI_CRYPT_PASSWD=$(installer_get "DI_CRYPT_PASSWD")
|
||||
local DI_ROOT_DISK=$(installer_get "DI_ROOT_DISK")
|
||||
local boot_uuid=$(lsblk -f $DI_ROOT_DISK -o UUID,MOUNTPOINT | grep -E "/target/boot$" | awk '{print $1}')
|
||||
|
||||
local cryp_conf_file=$workspace/etc/crypttab
|
||||
local PART_DEVICE=$(installer_get "DI_FULLDISK_MULTIDISK_DEVICE")
|
||||
local part_device_array=(${PART_DEVICE//;/ })
|
||||
|
||||
for(( i=0;i<${#part_device_array[@]};i++ )) do
|
||||
local device=${part_device_array[i]}
|
||||
# 获取全盘加密的分区设备文件
|
||||
local crypt_path="/dev/$(lsblk -lf $device -o NAME,FSTYPE | grep -E "crypto_LUKS" | awk '{print $1}')"
|
||||
# 获取全盘加密的分区uuid
|
||||
local crypt_uuid=$(lsblk -f $device -o UUID,FSTYPE | grep -E "crypto_LUKS" | awk '{print $1}')
|
||||
echo "disk cyrpt info: device=$device boot_uuid=$boot_uuid crypt_path=$crypt_path crypt_uuid=$crypt_uuid"
|
||||
|
||||
if [ -n "$crypt_uuid" ]; then
|
||||
local luks_name=luks_crypt${i}
|
||||
local key_file=$workspace/etc/deepin/crypt_keyfile_${i}.key
|
||||
|
||||
# 使用随机数创建的密钥文件
|
||||
dd if=/dev/urandom of=$key_file bs=1024 count=4
|
||||
chmod 0400 $key_file
|
||||
# 添加密钥文件到加密设备中
|
||||
echo -n "$DI_CRYPT_PASSWD" | cryptsetup -v luksAddKey $crypt_path $key_file
|
||||
# 备份原始的加密配置文件,方便后续清理
|
||||
[ -f ${cryp_conf_file}.real ] || mv $cryp_conf_file ${cryp_conf_file}.real
|
||||
# 生成keyfile配置
|
||||
echo "$luks_name UUID=$crypt_uuid /etc/deepin/crypt_keyfile_${i}.key luks,initramfs" >> $cryp_conf_file
|
||||
fi
|
||||
done
|
||||
cat $cryp_conf_file
|
||||
|
||||
if [ -n "$DI_CRYPT_PASSWD" ]; then
|
||||
local crypt_initramfs=$workspace/etc/cryptsetup-initramfs/conf-hook
|
||||
[ -f ${crypt_initramfs}.real ] || mv $crypt_initramfs ${crypt_initramfs}.real
|
||||
# 配置自定义keyfile的位置
|
||||
echo "KEYFILE_PATTERN=/etc/deepin/crypt_keyfile_*.key" >> $crypt_initramfs
|
||||
cat $crypt_initramfs
|
||||
chroot $workspace /usr/sbin/update-initramfs -u
|
||||
fi
|
||||
}
|
||||
|
||||
run() {
|
||||
local file=$1
|
||||
echo "run script: $file"
|
||||
bash $file
|
||||
}
|
||||
|
||||
run_job() {
|
||||
local in=$1
|
||||
if [ -d "$in" ];then
|
||||
echo "run dir: $in"
|
||||
JOBS=$(ls $in/*.job)
|
||||
for job in $JOBS; do
|
||||
local JOB_SRP=$job
|
||||
run $JOB_SRP
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f "$in" ];then
|
||||
run $in
|
||||
fi
|
||||
}
|
||||
|
||||
first_boot_oem () {
|
||||
local oem_deb_dir="/usr/share/deepin-installer/first_boot_deb"
|
||||
local oem_hooks_dir="/usr/share/deepin-installer/hooks/first_boot"
|
||||
echo "install first boot oem deb start..."
|
||||
if [[ $(ls "${oem_deb_dir}"/*.deb 2>/dev/null) ]]; then
|
||||
ls "${oem_deb_dir}"
|
||||
DEBIAN_FRONTEND="noninteractive"
|
||||
apt-get -y --allow-downgrades install -o Dpkg::Options::="--force-confnew" "${oem_deb_dir}/"*.deb || warn "Failed to install oem deb packages"
|
||||
fi
|
||||
echo "first boot oem hooks start..."
|
||||
if [[ $(ls "${oem_hooks_dir}"/*.job 2>/dev/null) ]]; then
|
||||
ls "${oem_hooks_dir}"
|
||||
run_job "$oem_hooks_dir"
|
||||
fi
|
||||
rm -vfr $oem_deb_dir $oem_hooks_dir
|
||||
echo "first boot oem end!"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Print partition list in system.
|
||||
parted -l -m -s
|
||||
|
||||
return 0
|
|
@ -0,0 +1,87 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Find windows OS agagin before chrooting, but after partitioning because
|
||||
# windows may be wiped by the user by intention.
|
||||
|
||||
PARTITION_ENABLE_OS_PROBER=$(installer_get "partition_enable_os_prober")
|
||||
TIMEZONE_USE_WINDOWS_TIME=$(installer_get "timezone_use_windows_time")
|
||||
|
||||
# the whole point is we want to scan windows OSes without considering its
|
||||
# installed in UEFI mode or not.
|
||||
try_os_prober() {
|
||||
IGNORE_UEFI=/var/lib/partman/ignore_uefi
|
||||
|
||||
local windows_exists="false"
|
||||
local file_exists="false"
|
||||
local file_contents=""
|
||||
# save context
|
||||
if [ -f $IGNORE_UEFI ]; then
|
||||
file_exists="true"
|
||||
file_contents=$(cat $IGNORE_UEFI)
|
||||
fi
|
||||
|
||||
# try
|
||||
if /usr/bin/os-prober | grep -qi windows; then
|
||||
windows_exists="true"
|
||||
fi
|
||||
|
||||
# revert context
|
||||
if [ x"${file_exists}" = "xtrue" ]; then
|
||||
rm -f $IGNORE_UEFI
|
||||
else
|
||||
mkdir -p "$(dirname $IGNORE_UEFI)"
|
||||
echo "$file_contents" > $IGNORE_UEFI
|
||||
fi
|
||||
|
||||
# and try again
|
||||
if /usr/bin/os-prober | grep -qi windows; then
|
||||
windows_exists="true"
|
||||
fi
|
||||
|
||||
# restore context
|
||||
if [ x"${file_exists}" = "xtrue" ]; then
|
||||
echo "$file_contents" > $IGNORE_UEFI
|
||||
else
|
||||
rm -f $IGNORE_UEFI
|
||||
fi
|
||||
|
||||
if [ x"${windows_exists}" = "xtrue" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
has_windows_partitions() {
|
||||
if try_os_prober; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if /bin/efibootmgr | grep -qi windows; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
if [ x"${PARTITION_ENABLE_OS_PROBER}" = "xtrue" ] && [ x"${TIMEZONE_USE_WINDOWS_TIME}" = "xtrue" ] && has_windows_partitions; then
|
||||
installer_set "DI_IS_LOCAL_TIME" "true"
|
||||
else
|
||||
installer_set "DI_IS_LOCAL_TIME" "false"
|
||||
fi
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Read kernel bootstrap options from /proc/cmdline
|
||||
if grep -q boot=casper /proc/cmdline; then
|
||||
BOOT=casper
|
||||
CDROM=/cdrom
|
||||
LUPIN_ROOT=/isodevice
|
||||
DISTRIBUTION=ubuntu
|
||||
elif grep -q boot=live /proc/cmdline; then
|
||||
BOOT=live
|
||||
|
||||
if [ -d /lib/live/mount/medium/live ]; then
|
||||
CDROM=/lib/live/mount/medium
|
||||
else
|
||||
CDROM=/run/live/medium
|
||||
fi
|
||||
|
||||
LUPIN_ROOT=/lib/live/mount/findiso
|
||||
DISTRIBUTION=debian
|
||||
else
|
||||
error "No boot value found!"
|
||||
fi
|
||||
|
||||
LIVE_FILESYSTEM="${CDROM}/${BOOT}"
|
||||
installer_set "DISTRIBUTION" "${DISTRIBUTION}"
|
||||
installer_set "LIVE" "${BOOT}"
|
||||
installer_set "LIVE_FILESYSTEM" "${LIVE_FILESYSTEM}"
|
||||
installer_set "CDROM" "${CDROM}"
|
||||
installer_set "DI_LUPIN_ROOT" "${LUPIN_ROOT}"
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Inhibit display screensaver.
|
||||
|
||||
xset s off -dpms
|
||||
|
||||
return 0
|
|
@ -0,0 +1,177 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Mount root partition to /target.
|
||||
|
||||
select_efi_part
|
||||
target="/target"
|
||||
mkdir -pv ${target}
|
||||
chown -v root:root ${target}
|
||||
chmod -v 0755 ${target}
|
||||
|
||||
DI_LUPIN=$(installer_get "DI_LUPIN")
|
||||
DI_LUPIN_ROOT=$(installer_get "DI_LUPIN_ROOT")
|
||||
DI_ROOT_PARTITION=$(installer_get "DI_ROOT_PARTITION")
|
||||
DI_LOOP_ROOT_FILE=$(installer_get "DI_LOOP_ROOT_FILE")
|
||||
DI_MOUNTPOINTS=$(installer_get "DI_MOUNTPOINTS")
|
||||
DI_UEFI=$(installer_get "DI_UEFI")
|
||||
DI_BOOTLOADER=$(installer_get "DI_BOOTLOADER")
|
||||
DATA_MOUNT_POINT=$(installer_get "DI_DATA_MOUNT_POINT")
|
||||
|
||||
|
||||
[ -n "${DI_ROOT_PARTITION}" ] || error "DI_ROOT_PARTITION is empty!"
|
||||
|
||||
# Mount for lupin
|
||||
if [ x${DI_LUPIN} = xtrue ]; then
|
||||
hostdev=`df ${DI_LUPIN_ROOT} | tail -1 | awk '{printf $1}'`
|
||||
installer_set "DI_HOST_DEV" "${hostdev}"
|
||||
mkdir -v /host
|
||||
mount --bind ${DI_LUPIN_ROOT} /host || \
|
||||
error "mount failed: ${DI_LUPIN_ROOT}"
|
||||
losetup ${DI_ROOT_PARTITION} /host/${DI_LOOP_ROOT_FILE} || \
|
||||
error "losetup failed /host/${DI_LOOP_ROOT_FILE} -> ${DI_ROOT_PARTITION}"
|
||||
mkfs.ext4 -L "Computer" -F -F ${DI_ROOT_PARTITION} || \
|
||||
error "mkfs.ext4 failed: ${DI_ROOT_PARTITION}"
|
||||
fi
|
||||
|
||||
get_fstype() {
|
||||
local PART_PATH FSTYPE RET
|
||||
PART_PATH="${1}"
|
||||
if [ -n "${PART_PATH}" ]; then
|
||||
# Make sure that ${PART_PATH} is not empty, or else `blkid` will print
|
||||
# fs names of all partitions.
|
||||
FSTYPE=$(blkid -o value -s TYPE "${PART_PATH}")
|
||||
RET=$?
|
||||
else
|
||||
FSTYPE=""
|
||||
RET=1
|
||||
fi
|
||||
echo "${FSTYPE:-unknown}"
|
||||
return ${RET}
|
||||
}
|
||||
|
||||
find_target() {
|
||||
local target="$1"
|
||||
for p in $(cat /proc/mounts | awk '{print $2}'); do
|
||||
if [ ${p} = "${target}" ]; then
|
||||
echo "${target}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# mount rootfs first
|
||||
msg "mount rootfs(${DI_ROOT_PARTITION}) to ${target}"
|
||||
n=0
|
||||
DI_ROOT_FSTYPE=$(get_fstype ${DI_ROOT_PARTITION})
|
||||
while [ "$n" -lt 10 ]; do
|
||||
if [ ${DI_ROOT_FSTYPE} != "unknown" ]; then
|
||||
mount -t ${DI_ROOT_FSTYPE} ${DI_ROOT_PARTITION} ${target}
|
||||
else
|
||||
mount ${DI_ROOT_PARTITION} ${target}
|
||||
fi
|
||||
result=$(find_target $target)
|
||||
if [ -n "${result}" ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
n="$(($n + 1))"
|
||||
done
|
||||
|
||||
if [ -z ${result} ]; then
|
||||
error "Failed to mount ${target}!"
|
||||
fi
|
||||
|
||||
[ ! -d ${target}/deepinhost ] && mkdir -p ${target}/deepinhost
|
||||
mount --bind / ${target}/deepinhost
|
||||
|
||||
# Mount other mountpoints
|
||||
# Split mount-point list.
|
||||
mount_points=$(echo ${DI_MOUNTPOINTS//;/ })
|
||||
for i in $(echo "${mount_points}"); do
|
||||
mountpoint=$(echo $i | cut -d'=' -f1)
|
||||
mountpath=$(echo $i | cut -d'=' -f2)
|
||||
if [ "$mountpath" != "/" ] && [ "$mountpath" != "swap" ] && [ "$mountpath" != "/boot/efi" ]; then
|
||||
msg "mount ${mountpoint} -> ${mountpath}"
|
||||
mkdir -pv ${target}${mountpath}
|
||||
mount $mountpoint ${target}${mountpath} || \
|
||||
error "Failed to mount ${mountpoint}"
|
||||
elif [ "$mountpath" == "swap" ]; then
|
||||
msg "Detect swap partition, try swapon it first"
|
||||
swapon $mountpoint || true
|
||||
installer_set DI_SWAP_MOUNTPOINT "$mountpoint"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ x"${DI_UEFI}" = xtrue ]; then
|
||||
if ! is_sw; then
|
||||
mkdir -p /target/boot/efi
|
||||
mount ${DI_BOOTLOADER} /target/boot/efi || \
|
||||
error "Failed to mount bootloader ${DI_BOOTLOADER}"
|
||||
fi
|
||||
else
|
||||
#解决bug50960,兆芯逻辑分区的引导无法安装到mbr,原因需要激活扩展分区
|
||||
cpuVendorId=$(lscpu | grep "Vendor ID" | awk '{print $3}')
|
||||
echo $cpuVendorId
|
||||
if [ $cpuVendorId = "CentaurHauls" ]; then
|
||||
echo $cpuVendorId
|
||||
diskInfo=$(parted ${DI_BOOTLOADER} print)
|
||||
tempDisk={1 1 1 1 1}
|
||||
extendedNumber=1
|
||||
for diskUnit in ${diskInfo[@]}
|
||||
do
|
||||
tempDisk[0]=${tempDisk[1]}
|
||||
tempDisk[1]=${tempDisk[2]}
|
||||
tempDisk[2]=${tempDisk[3]}
|
||||
tempDisk[3]=${tempDisk[4]}
|
||||
tempDisk[4]=$diskUnit
|
||||
|
||||
echo $diskUnit
|
||||
if [ $diskUnit = "extended" ]; then
|
||||
|
||||
extendedNumber=${tempDisk[0]}
|
||||
echo $extendedNumber
|
||||
fi
|
||||
done
|
||||
fdisk ${DI_BOOTLOADER} << EOF
|
||||
a
|
||||
$extendedNumber
|
||||
w
|
||||
EOF
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ -d /target/${DATA_MOUNT_POINT}/ ];then
|
||||
mkdir -p /target/${DATA_MOUNT_POINT}/home
|
||||
mkdir -p /target/home
|
||||
mount --bind /target/${DATA_MOUNT_POINT}/home /target/home || error "Faild to mount /target/home"
|
||||
|
||||
mkdir -p /target/${DATA_MOUNT_POINT}/opt
|
||||
mkdir -p /target/opt
|
||||
mount --bind /target/${DATA_MOUNT_POINT}/opt /target/opt || error "Faild to mount /target/opt"
|
||||
|
||||
mkdir -p /target/root
|
||||
mkdir -p /target/${DATA_MOUNT_POINT}/root
|
||||
mount --bind /target/${DATA_MOUNT_POINT}/root /target/root || error "Faild to mount /target/root"
|
||||
|
||||
mkdir -p /target/var
|
||||
mkdir -p /target/${DATA_MOUNT_POINT}/var
|
||||
mount --bind /target/${DATA_MOUNT_POINT}/var /target/var || error "Failed to mount /target/var"
|
||||
fi
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Create swap file if no swap partition is set.
|
||||
|
||||
SWAP_FILE_REQUIRED=$(installer_get "DI_SWAP_FILE_REQUIRED")
|
||||
SWAP_FILE_PATH=$(installer_get "partition_swap_file_path")
|
||||
SWAP_FILE_SIZE=$(installer_get "partition_swap_file_size")
|
||||
|
||||
[ -z "${SWAP_FILE_PATH}" ] && error "SWAP_FILE_PATH is empty"
|
||||
|
||||
SWAP_FILE_PATH="/target${SWAP_FILE_PATH}"
|
||||
|
||||
if [ x"${SWAP_FILE_REQUIRED}" = "xtrue" ]; then
|
||||
# A swap file is required.
|
||||
if [[ "$(df --output=fstype ${SWAP_FILE_PATH%/*})" =~ $'\n'(ext4|xfs)$ ]]
|
||||
then
|
||||
fallocate -l "${SWAP_FILE_SIZE}MiB" "${SWAP_FILE_PATH}"
|
||||
else
|
||||
dd if=/dev/zero of="${SWAP_FILE_PATH}" count="${SWAP_FILE_SIZE}" bs=1M
|
||||
fi || error "Failed to create swap file: ${SWAP_FILE_PATH}"
|
||||
|
||||
chmod 0600 "${SWAP_FILE_PATH}" || \
|
||||
warn "Failed to change permission of ${SWAP_FILE_PATH}"
|
||||
mkswap "${SWAP_FILE_PATH}" || error "mkswap ${SWAP_FILE_PATH} failed"
|
||||
fi
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# 在解压文件系统之前,先处理磁盘中保留的数据分区中的数据信息
|
||||
clean_data() {
|
||||
local in=$1
|
||||
local ignore=$2
|
||||
|
||||
ls -a $in | grep -Ev $ignore | xargs -I {} chattr -iR ${in}/{} || true
|
||||
ls -a $in | grep -Ev $ignore | xargs -I {} rm -vfr "${in}/{}" || true
|
||||
}
|
||||
|
||||
setup_data_info() {
|
||||
local DATA_MOUNT_POINT=$(installer_get "DI_DATA_MOUNT_POINT")
|
||||
if [ -d /target/${DATA_MOUNT_POINT}/ ];then
|
||||
[ -d /target/home ] && chown -hR root:root /target/home
|
||||
[ -d /target/${DATA_MOUNT_POINT} ] && clean_data /target/${DATA_MOUNT_POINT} '^\.\.$|^\.$|^var$|^home$|^root$|^opt$|^lost\+found$'
|
||||
[ -d /target/root ] && clean_data /target/root '^\.\.$|^\.$|^lost\+found$'
|
||||
[ -d /target/var ] && clean_data /target/var '^\.\.$|^\.$|^lost\+found$'
|
||||
[ -d /target/opt ] && clean_data /target/opt '^\.\.$|^\.$|^lost\+found$'
|
||||
# 删除原来用户的密钥环,防止弹出密钥环验证提示
|
||||
ls /target/home | xargs -I {} rm -vrf "/target/home/{}/.local/share/keyrings/login.keyring"
|
||||
# 创建dpkg-db的链接
|
||||
mkdir -p /target/usr/lib/dpkg-db
|
||||
mkdir -p /target/var/lib
|
||||
ln -sf ../../usr/lib/dpkg-db /target/var/lib/dpkg
|
||||
fi
|
||||
}
|
||||
|
||||
setup_data_info
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
installer_set "DI_INSTALL_STATUS" 2
|
||||
CDROM=$(installer_get "CDROM")
|
||||
DI_LOCALE=$(installer_get "DI_LOCALE")
|
||||
LIVE_FILESYSTEM=$(installer_get "LIVE_FILESYSTEM")
|
||||
LIVE=$(installer_get "LIVE")
|
||||
|
||||
L=${DI_LOCALE%.*}
|
||||
|
||||
# First, extract base filesystem
|
||||
readonly PROGRESS_FILE="/dev/shm/unsquashfs_progress"
|
||||
readonly BASE_MODULE="${LIVE_FILESYSTEM}/filesystem.squashfs"
|
||||
|
||||
CORES=${CORES:-$(cat /proc/cpuinfo |grep "processor" | wc -l)}
|
||||
unsquashfs -d /target -f -p $CORES \
|
||||
"${BASE_MODULE}" > /dev/shm/unsquashfs_progress || \
|
||||
error "unsquashfs failed, ${BASE_MODULE}"
|
||||
sync
|
||||
echo 3 > /proc/sys/vm/drop_caches
|
||||
installer_set "DI_INSTALL_STATUS" 3
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# try to get primary screen resolution, for example, extract 1440x900
|
||||
# from "LVDS1 connected primary 1440x900+0+0 (normal left inverted
|
||||
# right x axis y axis)"
|
||||
# resolution=$(xrandr | grep primary | grep -oE '[0-9]+x[0-9]+')
|
||||
|
||||
# # if failed, try to get the master screen resolution
|
||||
# if [ -z "${resolution}" ]; then
|
||||
# resolution=$(xrandr | grep Screen\ 0 | awk -F, '{print $2}' | \
|
||||
# sed -e 's/current//g' -e 's/ //g')
|
||||
# fi
|
||||
|
||||
# # if failed again, fallback to 1024x768
|
||||
# if [ -z "${resolution}" ]; then
|
||||
# resolution="1024x768"
|
||||
# fi
|
||||
|
||||
# installer_set "DI_CUR_RESOLUTION" "${resolution}"
|
||||
|
||||
# 暂时直接写入该分辨率,已适配新的grub主题
|
||||
installer_set "DI_CUR_RESOLUTION" "1024x768"
|
||||
|
||||
return 0
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Mount virtual fs and efi to /target.
|
||||
|
||||
CDROM=$(installer_get "CDROM")
|
||||
DI_BOOTLOADER=$(installer_get "DI_BOOTLOADER")
|
||||
|
||||
mkdir -p /target/dev
|
||||
mount --bind -v --bind /dev/ /target/dev || error "Failed to bind /dev"
|
||||
|
||||
mkdir -p /target/dev/pts
|
||||
mount -vt devpts devpts /target/dev/pts || error "Failed to bind devpts"
|
||||
|
||||
mkdir -p /target/proc
|
||||
mount -vt proc proc /target/proc || error "Failed to bind proc"
|
||||
|
||||
mkdir -p /target/sys
|
||||
mount -vt sysfs sysfs /target/sys || error "Failed to bind sysfs"
|
||||
|
||||
mkdir -p /target/media/cdrom
|
||||
mount --bind ${CDROM} /target/media/cdrom || error "Failed to bind ${CDROM}"
|
||||
|
||||
if [ -f /target/media/cdrom/oem.squashfs ]; then
|
||||
mount --bind ${CDROM}/oem /target/media/cdrom/oem || error "Failed to bind ${CDROM}/oem"
|
||||
fi
|
||||
|
||||
mkdir -p /target/run
|
||||
mount --bind /run /target/run || error "Failed to bind /run"
|
||||
|
||||
# Mount /var/run
|
||||
mkdir -p /target/var/run
|
||||
mount --bind /var/run /target/var/run || error "Failed to bind /var/run"
|
||||
|
||||
# Mount /tmp/.X11-unix/
|
||||
mkdir -p /target/tmp/.X11-unix
|
||||
mount --bind /tmp/.X11-unix/ /target/tmp/.X11-unix || error "Failed to bind /tmp/.X11-unix"
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Also create a policy-rc.d script if it doesn't already exist.
|
||||
# Chroot invoke some postinstall script will failed.
|
||||
|
||||
RC="/target/usr/sbin/policy-rc.d"
|
||||
|
||||
if [ -f "${RC}" ]; then
|
||||
msg "policy-rc.d already exists"
|
||||
else
|
||||
msg "installing dummy policy-rc.d"
|
||||
cat > "${RC}" << EOF
|
||||
#!/bin/sh
|
||||
while true; do
|
||||
case "\$1" in
|
||||
-*) shift ;;
|
||||
makedev) exit 0 ;;
|
||||
x11-common) exit 0 ;;
|
||||
*) exit 101 ;;
|
||||
esac
|
||||
done
|
||||
EOF
|
||||
|
||||
chmod a+x "${RC}"
|
||||
fi
|
||||
|
||||
msg "manage /etc/apt/apt.conf"
|
||||
cat > /target/etc/apt/apt.conf.d/00deepin-installer <<EOF
|
||||
APT::Install-Recommends "false";
|
||||
APT::Get::AllowUnauthenticated "true";
|
||||
Acquire::AllowInsecureRepositories "true";
|
||||
Acquire::Check-Date "false";
|
||||
EOF
|
||||
|
||||
return 0
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Copy /etc/deepin-installer.conf to /target
|
||||
|
||||
if [ -f "${CONF_FILE}" ]; then
|
||||
install -v -m644 "${CONF_FILE}" "/target/${CONF_FILE}" || \
|
||||
warn_exit "Failed to copy ${CONF_FILE}"
|
||||
fi
|
||||
if [ -f "/usr/share/deepin-installer/diy-shell" ]; then
|
||||
# 优先考虑定制文件
|
||||
cp -rv /usr/share/deepin-installer/diy-shell /target/usr/share/deepin-installer/diy-shell
|
||||
else
|
||||
# 考虑镜像内的内置脚本
|
||||
if [ -f $CDROM/DIY/shell.sh ]; then
|
||||
cp -rv $CDROM/DIY/shell.sh /target/usr/share/deepin-installer/diy-shell
|
||||
fi
|
||||
fi
|
||||
# 拷贝需要定制安装的 deb
|
||||
if [ -d /usr/share/deepin-installer/deb ]; then
|
||||
mkdir -p /target/usr/share/deepin-installer/deb
|
||||
cp -rv /usr/share/deepin-installer/deb/* /target/usr/share/deepin-installer/deb
|
||||
fi
|
||||
if [ -d $CDROM/DIY/DEB ]; then
|
||||
mkdir -p /target/usr/share/deepin-installer/deb
|
||||
cp -rv $CDROM/DIY/DEB/* /target/usr/share/deepin-installer/deb
|
||||
fi
|
||||
return 0
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Copy /tmp/oem folder to /target. This folder is used for oem settings.
|
||||
# Used in debug mode.
|
||||
if [ -d /tmp/oem ]; then
|
||||
cp -rvf /tmp/oem /target/tmp/oem || error "Failed to copy /tmp/oem to /target"
|
||||
fi
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Print sys info.
|
||||
|
||||
echo "-----------------------------Before Chroot Hooks ----------------------"
|
||||
echo "-----------------------------DEBUG INFO: df -h ----------------------"
|
||||
df -h
|
||||
ls -lh /target/deepinhost
|
||||
echo "-----------------------------DEBUG INFO: mount ----------------------"
|
||||
mount
|
||||
|
||||
return 0
|
|
@ -0,0 +1,162 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#set -x
|
||||
#exec &> /var/log/01_multi_system_set.log
|
||||
|
||||
# Check device capacity of $DEVICE.
|
||||
check_device_size() {
|
||||
local index=$1
|
||||
echo "index={${index}}"
|
||||
local minimum_disk_size=$(installer_get disk_minimum_space_required)
|
||||
local large_disk_threshold=$(installer_get partition_full_disk_large_disk_threshold)
|
||||
DEVICE_SIZE=$(($(blockdev --getsize64 "$DEVICE") / 1024**2))
|
||||
|
||||
if ((DEVICE_SIZE < minimum_disk_size * 1024 && index == 0)); then
|
||||
error "At least ${minimum_disk_size}Gib is required to install system!"
|
||||
elif ((DEVICE_SIZE > large_disk_threshold * 1024)); then
|
||||
declare -g LARGE=true
|
||||
fi
|
||||
}
|
||||
|
||||
# 返回磁盘空闲空间大小,单位G
|
||||
get_disk_freesize() {
|
||||
local devpath=$1
|
||||
# 将 /dev/sda 截取为 sda
|
||||
devpath=${devpath##*/}
|
||||
disksizes=$(cat /proc/partitions | grep $devpath | awk '{print $3}')
|
||||
# 根据换行符初始化数组disksizes
|
||||
disksizes=(${disksizes//\n/})
|
||||
# 数组第1项即为磁盘总空间大小
|
||||
disksizesfree=${disksizes[0]}
|
||||
disksizessize=${#disksizes[*]}
|
||||
if [ $disksizessize -gt 1 ]; then
|
||||
# 数组多于一项时,从数组的第2项开始遍历,数组第1项的值减去后面所有的值,便是磁盘剩余空间
|
||||
for (( disksizesindex=1;disksizesindex<$disksizessize;disksizesindex++ )); do
|
||||
let disksizesfree=disksizesfree-${disksizes[disksizesindex]}
|
||||
done
|
||||
fi
|
||||
|
||||
let disksizesfree=$(expr $disksizesfree / 1024 / 1024)
|
||||
echo $disksizesfree
|
||||
}
|
||||
|
||||
# 检测全盘安装
|
||||
check_fulldisk_install() {
|
||||
local device_todo=$1
|
||||
device_todo=${device_todo##*/}
|
||||
|
||||
local part_labels=("Boot" "SWAP" "Backup" "Roota" "Rootb" "_dde_data")
|
||||
local device_todo_labels=$(lsblk -f -o NAME,LABEL | grep $device_todo | awk '{print $2}')
|
||||
device_todo_labels=(${device_todo_labels//\n/})
|
||||
local device_todo_labelsnum=${#device_todo_labels[@]}
|
||||
let device_todo_labelsnum--
|
||||
local is_fulldiskinstall=1
|
||||
|
||||
# 从后往前遍历获取到的LABEL数组,针对device_todo_labels数组中的每一项判断是否在预定义的part_labels数组中存在
|
||||
# 最终根据is_fulldiskinstall的值判断存在连续的UOS系统分区,从而确定存在已经全盘安装的UOS
|
||||
for (( label_index=$device_todo_labelsnum;label_index>=0; )); do
|
||||
# 如果存在则is_fulldiskinstall加1,如果不存在则is_fulldiskinstall减1
|
||||
if [[ "${part_labels[@]}" =~ "${device_todo_labels[$label_index]}" ]]; then
|
||||
let is_fulldiskinstall++
|
||||
else
|
||||
let is_fulldiskinstall--
|
||||
fi
|
||||
let label_index--
|
||||
done
|
||||
|
||||
echo $is_fulldiskinstall
|
||||
}
|
||||
|
||||
# 获取新系统安装的起点,之前的分区的终点
|
||||
get_install_startpos() {
|
||||
local devpath=$1
|
||||
local part_endpos=$(fdisk -l $devpath -o Device,End | grep $devpath | awk '{print $2}' | awk 'END {print}')
|
||||
let part_endpos++
|
||||
|
||||
echo $part_endpos
|
||||
}
|
||||
|
||||
main() {
|
||||
if [ x$(installer_get "multi_system_eanble") = "xtrue" ]; then
|
||||
echo "multi_system is true"
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
||||
local part_device=$(installer_get DI_FULLDISK_MULTIDISK_DEVICE)
|
||||
local part_device_array=(${part_device//;/ })
|
||||
local dev_info=${part_device_array[0]}
|
||||
local device_todo=$dev_info
|
||||
device_todo=${device_todo##*/}
|
||||
|
||||
# 检测是否配置了全盘加密
|
||||
if [ x$(installer_get partition_do_auto_part_crypt) = "xtrue" ]; then
|
||||
error "can not t use crypto_luks with setup_multi_part"
|
||||
else
|
||||
echo "start setup_multi_part"
|
||||
fi
|
||||
|
||||
# 探测是否存在全盘安装的UOS
|
||||
local is_fulldiskinstall=$(check_fulldisk_install $dev_info)
|
||||
|
||||
# isfulldiskinstall>3 存在3个连续的分区则判定存在全盘安装的UOS,后面倒序寻找Boot分区并删除UOS分区
|
||||
if [ ${is_fulldiskinstall} -gt 3 ]; then
|
||||
# 删除全盘安装的分区
|
||||
echo "the last is fulldiskinstall"
|
||||
local device_todo_names=$(lsblk -lf -o NAME | grep $device_todo | awk '{print $1}')
|
||||
# 换行符需要 \ 转义一下
|
||||
device_todo_names=(${device_todo_names//\\n/})
|
||||
local device_todo_namesnum=${#device_todo_names[@]}
|
||||
let device_todo_namesnum--
|
||||
local index_todelete
|
||||
for (( name_index=$device_todo_namesnum;name_index>=0;name_index-- )); do
|
||||
# 数组追加的方式,将需要删除掉分区编号保存在数组中稍后一起删除
|
||||
index_todelete[${#index_todelete[@]}]=$name_index
|
||||
local name_label=$(lsblk -f -o NAME,LABEL | grep ${device_todo_names[$name_index]} | awk '{print $2}')
|
||||
if [ x$name_label = "xBoot" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
# 遍历分区编号数组删除分区
|
||||
for indextmp in ${index_todelete[@]}; do
|
||||
parted -s $dev_info rm $indextmp
|
||||
done
|
||||
else
|
||||
# 检测剩余磁盘空间是否满足多系统安装要求
|
||||
local disk_freesize=$(get_disk_freesize $device_todo)
|
||||
local fulldisk_sizerequired=$(installer_get partition_full_disk_minimum_space)
|
||||
if [ $fulldisk_sizerequired -gt $disk_freesize ]; then
|
||||
error "disk space too small required $fulldisk_sizerequired G but $disk_freesize G can get"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 寻找安装的起点,之前的分区的终点
|
||||
local install_startpos=$(get_install_startpos $dev_info)
|
||||
|
||||
local part_num=$(fdisk -l $dev_info | grep "^$dev_info" | wc -l)
|
||||
|
||||
# 寻找EFI
|
||||
part_path=$(fdisk -l -o Device,Type | grep -E 'EFI|"$dev_info"' | awk '{print $1}')
|
||||
|
||||
installer_set "DI_BOOTLOADER" $part_path
|
||||
installer_set "DI_INSTALL_STARTPOS" $install_startpos
|
||||
installer_set "DI_PART_NUM" $part_num
|
||||
}
|
||||
|
||||
main
|
|
@ -0,0 +1,84 @@
|
|||
#!/bin/bash
|
||||
|
||||
. ./basic_utils.sh
|
||||
|
||||
DI_USER_EXPERIENCE=$(installer_get "DI_USER_EXPERIENCE")
|
||||
|
||||
# if not use experience then return
|
||||
if [ x${DI_USER_EXPERIENCE} == "xtrue" ]; then
|
||||
DI_USER_USE_LICENSE=$(installer_get "DI_USER_USE_LICENSE")
|
||||
DI_FULLDISK_MODE=$(installer_get "DI_FULLDISK_MODE")
|
||||
partition_do_auto_part=$(installer_get "partition_do_auto_part")
|
||||
DI_AUTO_MOUNT=$(installer_get "DI_AUTO_MOUNT")
|
||||
DI_INSTALL_STARTTIME=$(installer_get "DI_INSTALL_STARTTIME")
|
||||
DI_INSTALL_ENDTIME=$(installer_get "DI_INSTALL_ENDTIME")
|
||||
DI_INSTALL_SUCCESSED=$(installer_get "DI_INSTALL_SUCCESSED")
|
||||
DI_CRYPT_PASSWD=$(installer_get "DI_CRYPT_PASSWD")
|
||||
DI_LOCALE=$(installer_get "DI_LOCALE")
|
||||
DI_TIMEZONE=$(installer_get "DI_TIMEZONE")
|
||||
DI_PASSWDLEVEL=$(installer_get "DI_PASSWDLEVEL")
|
||||
|
||||
#采集是否同意体验计划
|
||||
deepin-installer-settings set "/etc/deepin/deepin-user-experience" "ExperiencePlan" "ExperienceState" ${DI_USER_EXPERIENCE}
|
||||
|
||||
#采集是否同意许可协议
|
||||
deepin-installer-settings set "/etc/deepin/deepin-user-experience" "ExperiencePlan" "LicenseState" ${DI_USER_USE_LICENSE}
|
||||
|
||||
#采集安装方式
|
||||
if [ x${partition_do_auto_part} == "xtrue" ]; then
|
||||
installer_record_set "ExperiencePlan" "InstallType" "AutoInstall"
|
||||
else
|
||||
if [ x${DI_FULLDISK_MODE} == "xtrue" ]; then
|
||||
installer_record_set "ExperiencePlan" "InstallType" "FullDiskPartition"
|
||||
else
|
||||
installer_record_set "ExperiencePlan" "InstallType" "AdvancedPartition"
|
||||
fi
|
||||
fi
|
||||
|
||||
#采集是否使用自动挂载
|
||||
if [ x${DI_AUTO_MOUNT} != "x" ]; then
|
||||
installer_record_set "ExperiencePlan" "AutoMount" ${DI_AUTO_MOUNT}
|
||||
else
|
||||
installer_record_set "ExperiencePlan" "AutoMount" "false"
|
||||
fi
|
||||
|
||||
#采集安装时长
|
||||
duration=`echo $(($(date +%s -d "${DI_INSTALL_ENDTIME}") - $(date +%s -d "${DI_INSTALL_STARTTIME}"))) | awk '{t=split("60 s 60 m 24 h",a);for(n=1;n<t;n+=2){s=$1%a[n]a[n+1]s;$1=int($1/a[n])} print s}'`
|
||||
duration=`echo ${duration/h/:}`
|
||||
duration=`echo ${duration/m/:}`
|
||||
duration=`echo ${duration%s}`
|
||||
installer_record_set "ExperiencePlan" "InstallDuration" ${duration}
|
||||
|
||||
#采集是否安装成功
|
||||
installer_record_set "ExperiencePlan" "InstallSuccess" true
|
||||
|
||||
#采集是否使用全盘加密
|
||||
if [ x${DI_CRYPT_PASSWD} != "x" ]; then
|
||||
installer_record_set "ExperiencePlan" "FullDiskEncrypt" "true"
|
||||
else
|
||||
installer_record_set "ExperiencePlan" "FullDiskEncrypt" "false"
|
||||
fi
|
||||
|
||||
#采集设置的系统语言
|
||||
installer_record_set "ExperiencePlan" "LanguageSelected" ${DI_LOCALE}
|
||||
|
||||
#采集设置的系统时区
|
||||
installer_record_set "ExperiencePlan" "TimeZoneSelected" ${DI_TIMEZONE}
|
||||
|
||||
#采集是否使用recovery分区
|
||||
IS_HASRECOVERY=`lsblk | grep "/recovery" | awk '{print $7}'`
|
||||
if [ x${IS_HASRECOVERY} != "x" ];then
|
||||
installer_record_set "ExperiencePlan" "UseRecovery" "true"
|
||||
else
|
||||
installer_record_set "ExperiencePlan" "UseRecovery" "false"
|
||||
fi
|
||||
|
||||
#采集设置的密码强度信息
|
||||
installer_record_set "ExperiencePlan" "PasswordStrength" ${DI_PASSWDLEVEL}
|
||||
|
||||
sync
|
||||
else
|
||||
rm /etc/deepin/deepin-user-experience
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,224 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Setup username, password, timezone and keyboard layout.
|
||||
# This script is used to setup system info after installation.
|
||||
|
||||
# Absolute path to config file.
|
||||
# Do not read/write this file directly, call installer_get and installer_set
|
||||
# instead.
|
||||
CONF_FILE=/etc/deepin-installer.conf
|
||||
|
||||
. ./basic_utils.sh
|
||||
. ./doinstallrecord_first_boot.sh
|
||||
. ./in_chroot/34_setup_livefs.job
|
||||
. ./in_chroot/51_setup_keyboard.job
|
||||
. ./in_chroot/52_setup_locale_timezone.job
|
||||
. ./in_chroot/53_setup_user.job
|
||||
. ./in_chroot/55_customize_user.job
|
||||
. ./in_chroot/91_remove_unused_packages.job
|
||||
|
||||
add_uninstall_package() {
|
||||
local package=${1}
|
||||
local result=$(dpkg -l | grep "\\s${package}" | awk '{print $2}' | awk -F: '{print $1}' | grep "^${package}$" | wc -l)
|
||||
if [ ${result} == "1" ];then
|
||||
local list=$(installer_get "DI_UNINSTALL_PACKAGES")
|
||||
list="${list} $package"
|
||||
installer_set "DI_UNINSTALL_PACKAGES" "${list}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove component packages
|
||||
remove_component_packages() {
|
||||
local DI_COMPONENT_UNINSTALL=$(installer_get "DI_COMPONENT_UNINSTALL")
|
||||
if [ ! -z "${DI_COMPONENT_UNINSTALL}" ];then
|
||||
local list=$(installer_get "DI_UNINSTALL_PACKAGES")
|
||||
list="${list} ${DI_COMPONENT_UNINSTALL}"
|
||||
installer_set "DI_UNINSTALL_PACKAGES" "${list}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check whether btrfs filesystem is used in machine.
|
||||
detect_btrfs() {
|
||||
for i in $(lsblk -o FSTYPE | sed '/^$/d' | uniq); do
|
||||
[ "${i}" = "btrfs" ] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
exists_repair_tools() {
|
||||
dpkg -l | grep deepin-repair-tools
|
||||
return $?
|
||||
}
|
||||
|
||||
# Purge packages
|
||||
uninstall_packages() {
|
||||
if detect_btrfs; then
|
||||
add_uninstall_package "deepin-installer"
|
||||
add_uninstall_package "tshark wireshark-common"
|
||||
else
|
||||
add_uninstall_package "deepin-installer"
|
||||
add_uninstall_package "btrfs-tools"
|
||||
add_uninstall_package "tshark"
|
||||
add_uninstall_package "wireshark-common"
|
||||
fi
|
||||
|
||||
if exists_repair_tools; then
|
||||
add_uninstall_package "deepin-repair-tools"
|
||||
fi
|
||||
|
||||
add_uninstall_package "imagemagick*"
|
||||
local list=$(installer_get "DI_UNINSTALL_PACKAGES")
|
||||
# 加密卸载包的输出日志,由于安装器会将自身卸载,所以为了保证日志完整性,卸载阶段的日志需要加密后追加到后配置日志中
|
||||
apt-get -y purge ${list} | base64 >> /var/log/deepin-installer-first-boot.log
|
||||
# apt autoremove -y // 屏蔽代码解决磁盘加密时选择非图形组建安装系统成功后,系统无法重启问题。根因:由于cryptsetup被apt autoremove 卸载导致无法启动
|
||||
}
|
||||
|
||||
# Replace lightdm.conf with lightdm.conf.real.
|
||||
cleanup_lightdm_deepin_installer() {
|
||||
local CONF_FILE=/etc/lightdm/lightdm.conf
|
||||
local TEMP_CONF_FILE=/etc/lightdm/lightdm.conf.real
|
||||
if [ -f "${TEMP_CONF_FILE}" ]; then
|
||||
mv -f "${TEMP_CONF_FILE}" "${CONF_FILE}"
|
||||
fi
|
||||
}
|
||||
|
||||
# see after_chroot/88_copy_oem_license.job
|
||||
cleanup_oem_license() {
|
||||
local OEM_LICENSE=/oem_license
|
||||
if [ -d "${OEM_LICENSE}" ]; then
|
||||
rm -rf "${OEM_LICENSE}"
|
||||
fi
|
||||
}
|
||||
|
||||
cleanup_first_boot() {
|
||||
local FILE=/etc/deepin-installer-first-boot
|
||||
[ -f "${FILE}" ] && rm -f "${FILE}"
|
||||
|
||||
if [ -f /lib/systemd/system/deepin-installer.target ]; then
|
||||
# Restore default target of systemd
|
||||
systemctl set-default -f graphical.target
|
||||
fi
|
||||
|
||||
# See in_chroot/generate_reboot_setup_file.job for more info.
|
||||
cleanup_lightdm_deepin_installer
|
||||
}
|
||||
|
||||
setup_default_target() {
|
||||
msg "TARGET:before={$(systemctl get-default)}"
|
||||
local DI_COMPONENT_UNINSTALL=$(installer_get "DI_COMPONENT_UNINSTALL")
|
||||
if [[ "${DI_COMPONENT_UNINSTALL}" =~ ^(.* )?lightdm( .*)?$ ]]; then
|
||||
msg "TARGET:lightdm will be removed:{${DI_COMPONENT_UNINSTALL}}"
|
||||
systemctl set-default -f multi-user.target
|
||||
elif [ -f /usr/sbin/lightdm ]; then
|
||||
msg "TARGET:lightdm program found."
|
||||
systemctl set-default -f graphical.target
|
||||
else
|
||||
msg "TARGET:lightdm program NOT found."
|
||||
systemctl set-default -f multi-user.target
|
||||
fi
|
||||
msg "TARGET:after={$(systemctl get-default)}"
|
||||
}
|
||||
|
||||
setup_bluetooth_service() {
|
||||
if [ -f /lib/systemd/system/bluetooth.service ]; then
|
||||
systemctl restart bluetooth.service
|
||||
fi
|
||||
}
|
||||
|
||||
setup_grub_passwd(){
|
||||
# grub edit password
|
||||
GRUB_PASSWORD=$(installer_get "DI_GRUB_PASSWORD")
|
||||
USERNAME=$(installer_get "DI_USERNAME")
|
||||
if [ -n "$GRUB_PASSWORD" ];then
|
||||
cat >> /etc/grub.d/00_header <<EOF
|
||||
cat << P_EOF
|
||||
set superusers="${USERNAME}"
|
||||
password_pbkdf2 ${USERNAME} ${GRUB_PASSWORD}
|
||||
P_EOF
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
## 解决系统还原后,安装器日志没有或者不全问题
|
||||
backup_log() {
|
||||
local INSTALL_LOG="/var/log/deepin-installer.log"
|
||||
local RECOVERY_LOG="/recovery/deepin-installer.log"
|
||||
|
||||
if [ ! -f "$RECOVERY_LOG" ]; then
|
||||
encryption_file $INSTALL_LOG # 加密日志
|
||||
if [ -d /recovery ]; then
|
||||
install -v -Dm600 $INSTALL_LOG $RECOVERY_LOG
|
||||
fi
|
||||
fi
|
||||
}
|
||||
recovery_log() {
|
||||
local INSTALL_LOG="/var/log/deepin-installer.log"
|
||||
local RECOVERY_LOG="/recovery/deepin-installer.log"
|
||||
if [ -f "$RECOVERY_LOG" ]; then
|
||||
install -v -Dm600 /recovery/deepin-installer.log /var/log/deepin-installer.log
|
||||
fi
|
||||
}
|
||||
|
||||
setup_log() {
|
||||
local FIRST_BOOT_LOG="/var/log/deepin-installer-first-boot.log"
|
||||
|
||||
recovery_log # 还原安装日志
|
||||
backup_log # 备份安装日志
|
||||
encryption_file $FIRST_BOOT_LOG # 加密first boot日志
|
||||
}
|
||||
|
||||
main() {
|
||||
[ -f "${CONF_FILE}" ] || error "deepin-installer.conf not found"
|
||||
cat "${CONF_FILE}" | grep -v "PASSWORD" | grep -v "password"
|
||||
|
||||
cleanup_first_boot
|
||||
setup_lightdm_auto_login
|
||||
|
||||
recovery_log
|
||||
setup_keyboard
|
||||
setup_locale_timezone
|
||||
setup_livefs
|
||||
|
||||
# setup_username_password_hostname() will clear value of DI_PASSWORD
|
||||
customize_user
|
||||
setup_username_password_hostname
|
||||
|
||||
# 解决蓝牙主机名问题
|
||||
setup_bluetooth_service
|
||||
|
||||
#设置grub密码
|
||||
setup_grub_passwd
|
||||
|
||||
sync
|
||||
cleanup_oem_license
|
||||
update_disk_cryption_passwd
|
||||
update_grub_local && update-initramfs -u
|
||||
remove_component_packages
|
||||
setup_default_target
|
||||
first_boot_oem || true # 后配置定制脚本运行, 脚本运行错误不影响主流程
|
||||
setup_log # 加密日志中敏感字符
|
||||
uninstall_packages # 这一步必须是最后一步
|
||||
sync
|
||||
#专有设备创建初始化备份
|
||||
if is_device; then
|
||||
echo "y" | /usr/sbin/uos-backup-restore --start-lower
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
|
@ -0,0 +1,123 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Entry point for hook scripts.
|
||||
# This script setups variables and function used in hook script.
|
||||
# Also handles chroot environment.
|
||||
|
||||
get_oem_path() {
|
||||
local fileList=`find / -path "*/oem/*.job"`
|
||||
local fileName
|
||||
for name in $fileList
|
||||
do
|
||||
fileName=$name
|
||||
break
|
||||
done
|
||||
|
||||
local subString="oem"
|
||||
fileName=${fileName%${subString}*}
|
||||
fileName=$fileName$subString
|
||||
|
||||
echo $fileName
|
||||
}
|
||||
|
||||
# Check arguments
|
||||
if [ $# -lt 1 ]; then
|
||||
error "Usage: $0 hook-file"
|
||||
fi
|
||||
|
||||
HOOKS_DIR=/tmp/installer
|
||||
if [ ! -d ${HOOKS_DIR} ];then
|
||||
HOOKS_DIR=/usr/share/deepin-installer/hooks
|
||||
fi
|
||||
|
||||
# Folder path of hooks.
|
||||
## 优化before_install目录脚本执行时,/tmp/installer目录下没有basic_utils.sh文件,另外导致before_install脚本中无法使用定制的basic_utils.sh
|
||||
if [ -f "$HOOKS_DIR/basic_utils.sh" ];then
|
||||
. $HOOKS_DIR/basic_utils.sh
|
||||
else
|
||||
. /usr/share/deepin-installer/hooks/basic_utils.sh
|
||||
fi
|
||||
|
||||
# Absolute path of hook_manager.sh in chroot env.
|
||||
# This path is defined in service/backend/hooks_pack.cpp.
|
||||
if [ -f "$HOOKS_DIR/hook_manager.sh" ];then
|
||||
_SELF="$HOOKS_DIR/hook_manager.sh"
|
||||
else
|
||||
_SELF="/usr/share/deepin-installer/hooks/hook_manager.sh"
|
||||
fi
|
||||
|
||||
_HOOK_FILE=$1
|
||||
_IN_CHROOT=$2
|
||||
|
||||
# Defines absolute path to oem folder.
|
||||
# /tmp/oem is reserved for debug.
|
||||
if [ -d /tmp/oem ]; then
|
||||
# Debug mode
|
||||
OEM_DIR=/tmp/oem
|
||||
elif [ -d /media/cdrom/oem ]; then
|
||||
# chroot mode
|
||||
OEM_DIR=/media/cdrom/oem
|
||||
elif [ -d /lib/live/mount/medium/oem ]; then
|
||||
# chroot mode
|
||||
OEM_DIR=/lib/live/mount/medium/oem
|
||||
elif [ -d /media/apt/oem ]; then
|
||||
# chroot mode
|
||||
# FIXME: maybe apt will change mount point
|
||||
# /media/cdrom => /media/apt
|
||||
# hook script invalid
|
||||
OEM_DIR=/media/apt/oem
|
||||
elif [ -d /usr/lib/live/mount/medium/oem ]; then
|
||||
# chroot mode
|
||||
OEM_DIR=/usr/lib/live/mount/medium/oem
|
||||
fi
|
||||
|
||||
# Mark $OEM_DIR as readonly constant.
|
||||
readonly OEM_DIR
|
||||
|
||||
start_time=$(date +%s)
|
||||
|
||||
# Run hook file
|
||||
case ${_HOOK_FILE} in
|
||||
*/in_chroot/*)
|
||||
if [ "x${_IN_CHROOT}" = "xtrue" ]; then
|
||||
if [ ! -f "${CONF_FILE}" ]; then
|
||||
error "Config file ${CONF_FILE} does not exists."
|
||||
fi
|
||||
. "${_HOOK_FILE}"
|
||||
end_time=$(date +%s)
|
||||
cost_time=$[ $end_time-$start_time ]
|
||||
echo "run ${_HOOK_FILE} time is $(($cost_time/60))m $(($cost_time%60))s"
|
||||
exit $?
|
||||
else
|
||||
# Switch to chroot env.
|
||||
chroot /target "${_SELF}" "${_HOOK_FILE}" 'true'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Run normal hooks.
|
||||
if [ ! -f "${CONF_FILE}" ]; then
|
||||
error "Config file ${CONF_FILE} does not exists."
|
||||
fi
|
||||
. "${_HOOK_FILE}"
|
||||
end_time=$(date +%s)
|
||||
cost_time=$[ $end_time-$start_time ]
|
||||
echo "run ${_HOOK_FILE} time is $(($cost_time/60))m $(($cost_time%60))s"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Print system info
|
||||
blkid
|
||||
mount
|
||||
|
||||
return 0
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# 本地仓库的路径
|
||||
LOC_REPO_PATH="/media/cdrom/dists"
|
||||
|
||||
# add cdrom to sources.list
|
||||
[ ! -d $LOC_REPO_PATH ] && warn_exit "/media/cdrom is not a debian repository. Skipped."
|
||||
|
||||
# commented source.list to let apt-get just using cdrom repo.
|
||||
sed -i 's/^/#/g' /etc/apt/sources.list
|
||||
|
||||
dir=$(find $LOC_REPO_PATH -name "Release" | xargs awk -F '[ :]+' '/Codename/{print $2}')
|
||||
for name in $dir
|
||||
do
|
||||
# ident the cdrom first.
|
||||
echo "deb [trusted=yes] file:/media/cdrom ${name} main" >> /etc/apt/sources.list
|
||||
done
|
||||
|
||||
apt-get update
|
||||
|
||||
return 0
|
|
@ -0,0 +1,147 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install grub to disk. Only used in arm64 based platforms
|
||||
|
||||
if ! is_arm64; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
DI_BOOTLOADER=$(installer_get "DI_BOOTLOADER")
|
||||
DI_CUR_RESOLUTION=$(installer_get "DI_CUR_RESOLUTION")
|
||||
DI_HOST_DEV=$(installer_get "DI_HOST_DEV")
|
||||
DI_LUPIN=$(installer_get "DI_LUPIN")
|
||||
DI_UEFI=$(installer_get "DI_UEFI")
|
||||
BOOTLOADER_ID=$(installer_get "system_bootloader_id")
|
||||
|
||||
# if no DI_BOOTLOADER, treat as not installing bootloader
|
||||
[ -z ${DI_BOOTLOADER} ] && \
|
||||
warn_exit "DI_BOOTLOADER not set. Treat as not install bootloader. Skip."
|
||||
|
||||
if [ x${DI_UEFI} = xtrue ]; then
|
||||
BOOT="uefi"
|
||||
else
|
||||
#BOOT="legacy"
|
||||
# Legacy mode is no supported on arm64
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check SecureBoot option is enabled or not.
|
||||
if [ x${BOOT} = xuefi ]; then
|
||||
SB=/sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data
|
||||
value=$(od -An -t u1 "${SB}" 2>/dev/null | sed s/[[:space:]]//g)
|
||||
[ x${value} = x1 ] && echo "uefi-secure-boot detected"
|
||||
fi
|
||||
|
||||
case ${BOOT} in
|
||||
#"legacy")
|
||||
# echo "INFO: Detected legacy machine, installing grub to ${DI_BOOTLOADER}"
|
||||
# apt-get -y -o Dpkg::Options::="--force-confdef" \
|
||||
# -o Dpkg::Options::="--force-confold" --no-install-recommends \
|
||||
# --allow-unauthenticated install grub-pc
|
||||
#
|
||||
# if [ x${DI_LUPIN} = xtrue ]; then
|
||||
# echo "Fix grub install failed in lupin"
|
||||
# [ -d /boot/grub ] || mkdir /boot/grub
|
||||
# echo "(hd0) ${DI_BOOTLOADER}" > /boot/grub/device.map
|
||||
# mkdir /host
|
||||
# mount ${DI_HOST_DEV} /host
|
||||
# echo "Mount DI_HOST_DEV: " ${DI_HOST_DEV}
|
||||
# fi
|
||||
#
|
||||
# grub-install --no-floppy ${DI_BOOTLOADER} --target=i386-pc --force|| \
|
||||
# error "grub-install failed! ${DI_BOOTLOADER}"
|
||||
# ;;
|
||||
|
||||
"uefi")
|
||||
# try to get efi architecture
|
||||
if [ x$(cat /sys/firmware/efi/fw_platform_size 2>/dev/null) = 'x32' ]; then
|
||||
install_package grub-efi-arm
|
||||
add_start_option --target=arm-efi --recheck # 增加系统启动选项
|
||||
|
||||
else
|
||||
# Clover efi loader cannot use grub.efi correctly,
|
||||
# so we may patch grub or use grub.efi.signed.
|
||||
#install_package shim-signed grub-efi-amd64-signed efibootmgr
|
||||
install_package efibootmgr grub-efi-arm64 grub-efi-arm64-bin
|
||||
add_start_option --target=arm64-efi --uefi-secure-boot --recheck # 增加系统启动选项
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# Try to avoid kernel update error when create symbol link
|
||||
case ${BOOT} in
|
||||
"uefi")
|
||||
echo "# avoid kernel update fails with /boot on FAT32
|
||||
do_symlinks = no" | tee /etc/kernel-img.conf
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${BOOT} in
|
||||
uefi*)
|
||||
echo "Try to fix efi boot order to deepin first"
|
||||
fix_boot_order
|
||||
;;
|
||||
legacy)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Generate theme background.
|
||||
readonly GRUB_SRC_BG=/boot/grub/themes/deepin/background_source
|
||||
readonly GRUB_DST_BG=/boot/grub/themes/deepin/background.png
|
||||
if [ -f "${GRUB_SRC_BG}" ]; then
|
||||
if which image-worsener >/dev/null; then
|
||||
image-worsener -w ${DI_CUR_RESOLUTION%x*} -h ${DI_CUR_RESOLUTION##*x} \
|
||||
${GRUB_SRC_BG} ${GRUB_DST_BG}
|
||||
elif which convert >/dev/null; then
|
||||
convert "${GRUB_SRC_BG}" -scale ${DI_CUR_RESOLUTION} "${GRUB_DST_BG}"
|
||||
else
|
||||
warn "Please install imagemaic or image-worsener to blur image"
|
||||
fi
|
||||
else
|
||||
warn "${GRUB_SRC_BG} not found"
|
||||
fi
|
||||
|
||||
GRUB_TIMEOUT=$(installer_get "grub_timeout")
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT:-1}
|
||||
|
||||
cat >> /etc/default/grub << EOF
|
||||
# Generated by deepin-installer
|
||||
GRUB_BACKGROUND="/boot/grub/themes/deepin/background.png"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet console=tty plymouth.ignore-serial-consoles"
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_DISTRIBUTOR="\`/usr/bin/lsb_release -d -s 2>/dev/null || echo Deepin\`"
|
||||
GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT}
|
||||
GRUB_GFXMODE=${DI_CUR_RESOLUTION}
|
||||
DEEPIN_GFXMODE_DETECT=1
|
||||
EOF
|
||||
|
||||
# Remove partman/ignore_uefi if that file is created by installer.
|
||||
# See partman/os_prober.cpp for more info.
|
||||
#IGNORE_UEFI=/var/lib/partman/ignore_uefi
|
||||
#if [ -f $IGNORE_UEFI ] && [ x$(cat $IGNORE_UEFI) = 'xdeepin-installer' ]; then
|
||||
# rm -f $IGNORE_UEFI
|
||||
#fi
|
||||
|
||||
update_grub_local
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install grub to disk. Only used in x86 based platforms
|
||||
|
||||
if ! is_loongson; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
config_item() {
|
||||
if [ -f /etc/default/grub ]; then
|
||||
. /etc/default/grub || return
|
||||
fi
|
||||
eval echo "\$$1"
|
||||
}
|
||||
|
||||
GRUB_TIMEOUT=$(installer_get "grub_timeout")
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT:-1}
|
||||
|
||||
cat >> /etc/default/grub << EOF
|
||||
# Generated by deepin-installer
|
||||
GRUB_BACKGROUND="/boot/grub/themes/deepin/background.png"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet console=tty loglevel=0"
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_DISTRIBUTOR="\`/usr/bin/lsb_release -d -s 2>/dev/null || echo Uos\`"
|
||||
GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT}
|
||||
GRUB_GFXMODE=${DI_CUR_RESOLUTION}
|
||||
EOF
|
||||
|
||||
# update grub config
|
||||
update_grub_local
|
|
@ -0,0 +1,174 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install grub to disk. Only used in x86 based platforms
|
||||
|
||||
if ! is_x86; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
DI_BOOTLOADER=$(installer_get "DI_BOOTLOADER")
|
||||
DI_CUR_RESOLUTION=$(installer_get "DI_CUR_RESOLUTION")
|
||||
DI_HOST_DEV=$(installer_get "DI_HOST_DEV")
|
||||
DI_LUPIN=$(installer_get "DI_LUPIN")
|
||||
DI_UEFI=$(installer_get "DI_UEFI")
|
||||
|
||||
# if no DI_BOOTLOADER, treat as not installing bootloader
|
||||
[ -z ${DI_BOOTLOADER} ] && \
|
||||
warn_exit "DI_BOOTLOADER not set. Treat as not install bootloader. Skip."
|
||||
|
||||
if [ x${DI_UEFI} = xtrue ]; then
|
||||
BOOT="uefi"
|
||||
else
|
||||
BOOT="legacy"
|
||||
fi
|
||||
|
||||
# Check SecureBoot option is enabled or not.
|
||||
if [ x${BOOT} = xuefi ]; then
|
||||
SB=/sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data
|
||||
value=$(od -An -t u1 "${SB}" 2>/dev/null | sed s/[[:space:]]//g)
|
||||
[ x${value} = x1 ] && echo "uefi-secure-boot detected"
|
||||
fi
|
||||
|
||||
case ${BOOT} in
|
||||
"legacy")
|
||||
echo "INFO: Detected legacy machine, installing grub to ${DI_BOOTLOADER}"
|
||||
install_package grub-pc
|
||||
|
||||
if [ x${DI_LUPIN} = xtrue ]; then
|
||||
echo "Fix grub install failed in lupin"
|
||||
[ -d /boot/grub ] || mkdir /boot/grub
|
||||
echo "(hd0) ${DI_BOOTLOADER}" > /boot/grub/device.map
|
||||
mkdir /host
|
||||
mount ${DI_HOST_DEV} /host
|
||||
echo "Mount DI_HOST_DEV: " ${DI_HOST_DEV}
|
||||
fi
|
||||
|
||||
grub-install --no-floppy ${DI_BOOTLOADER} --target=i386-pc --force 2>/dev/null || true
|
||||
;;
|
||||
|
||||
"uefi")
|
||||
# try to get efi architecture
|
||||
if [ x$(cat /sys/firmware/efi/fw_platform_size 2>/dev/null) = 'x32' ]; then
|
||||
install_package grub-efi-ia32
|
||||
add_start_option --target=i386-efi --efi-directory=/boot/efi
|
||||
|
||||
else
|
||||
# Clover efi loader cannot use grub.efi correctly,
|
||||
# so we may patch grub or use grub.efi.signed.
|
||||
install_package shim-signed grub-efi-amd64-signed efibootmgr
|
||||
|
||||
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
|
||||
rm /sys/firmware/efi/efivars/dump-*
|
||||
|
||||
# uefi-secure-boot options is enabled by default
|
||||
add_start_option --target=x86_64-efi --uefi-secure-boot
|
||||
umount /sys/firmware/efi/efivars
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# Try to avoid kernel update error when create symbol link
|
||||
case ${BOOT} in
|
||||
"uefi")
|
||||
echo "# avoid kernel update fails with /boot on FAT32
|
||||
do_symlinks = no" | tee /etc/kernel-img.conf
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${BOOT} in
|
||||
uefi*)
|
||||
echo "Try to fix efi boot order to deepin first"
|
||||
fix_boot_order
|
||||
;;
|
||||
legacy)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $(cat /proc/cmdline) =~ \ nomodeset(\ |$) ]];
|
||||
then
|
||||
nomodeset="nomodeset"
|
||||
fi
|
||||
|
||||
GRUB_TIMEOUT=$(installer_get "grub_timeout")
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT:-1}
|
||||
|
||||
cat >> /etc/default/grub << EOF
|
||||
# Generated by deepin-installer
|
||||
GRUB_BACKGROUND="/boot/grub/themes/deepin/background.png"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet $nomodeset"
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_DISTRIBUTOR="\`/usr/bin/lsb_release -d -s 2>/dev/null || echo UOS 20\`"
|
||||
GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
|
||||
GRUB_TIMEOUT=${GRUB_TIMEOUT}
|
||||
GRUB_GFXMODE=${DI_CUR_RESOLUTION}
|
||||
DEEPIN_GFXMODE_DETECT=1
|
||||
EOF
|
||||
|
||||
# Remove partman/ignore_uefi if that file is created by installer.
|
||||
# See partman/os_prober.cpp for more info.
|
||||
#IGNORE_UEFI=/var/lib/partman/ignore_uefi
|
||||
#if [ -f $IGNORE_UEFI ] && [ x$(cat $IGNORE_UEFI) = 'xdeepin-installer' ]; then
|
||||
# rm -f $IGNORE_UEFI
|
||||
#fi
|
||||
|
||||
# grub edit password
|
||||
GRUB_PASSWORD=$(installer_get "DI_GRUB_PASSWORD")
|
||||
USERNAME=$(installer_get "DI_USERNAME")
|
||||
if [ -n "$GRUB_PASSWORD" ];then
|
||||
cat > /etc/grub.d/01_grub_password <<EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
cat << P_EOF
|
||||
set superusers="${USERNAME}"
|
||||
password_pbkdf2 ${USERNAME} ${GRUB_PASSWORD}
|
||||
P_EOF
|
||||
EOF
|
||||
|
||||
# 暂时没有其他办法,因为不加--unrestricted参数的话,引导系统将需要提供密码
|
||||
cat > /etc/grub.d/99_update_grub <<GRUB_EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
cat > /tmp/.update-grub <<EOF
|
||||
#!/bin/sh
|
||||
sleep 2
|
||||
sed -i "s/\(menuentry '.*'\) -/\1 --unrestricted -/" /boot/grub/grub.cfg
|
||||
EOF
|
||||
chmod +x /tmp/.update-grub
|
||||
/tmp/.update-grub &
|
||||
GRUB_EOF
|
||||
|
||||
chmod +x /etc/grub.d/01_grub_password
|
||||
chmod +x /etc/grub.d/99_update_grub
|
||||
fi
|
||||
|
||||
# update grub theme
|
||||
if [ x${DI_LUPIN} != xtrue ]; then
|
||||
DISPLAY_PORT=$(installer_get "DI_DISPLAY_PORT")
|
||||
export XAUTHORITY=/var/run/lightdm/root/${DISPLAY_PORT}
|
||||
export DISPLAY=${DISPLAY_PORT}
|
||||
LC_ALL="" LANGUAGE=$(installer_get "DI_LOCALE") LANG=$(installer_get "DI_LOCALE").UTF-8 /usr/lib/deepin-daemon/grub2 -prepare-gfxmode-detect
|
||||
fi
|
||||
|
||||
# update grub config
|
||||
update_grub_local
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
write_auto_mount() {
|
||||
skip_auto_mount=$(installer_get "skip_auto_mount")
|
||||
# skip_auto_mount=false
|
||||
if [ x$skip_auto_mount = "xtrue" ];then
|
||||
return 0;
|
||||
fi
|
||||
local value="$1"
|
||||
cat > /etc/deepin/deepin-auto-mount << EOF
|
||||
AutoMount=$value
|
||||
EOF
|
||||
}
|
||||
|
||||
main() {
|
||||
DI_USER_EXPERIENCE=$(installer_get "DI_USER_EXPERIENCE")
|
||||
# DI_USER_EXPERIENCE=true
|
||||
if [ "x$DI_USER_EXPERIENCE" != "xtrue" ];then
|
||||
return 0;
|
||||
fi
|
||||
|
||||
DI_AUTO_MOUNT=$(installer_get "DI_AUTO_MOUNT")
|
||||
# DI_AUTO_MOUNT=true
|
||||
if [ "x$DI_AUTO_MOUNT" = "xtrue" ];then
|
||||
write_auto_mount "1"
|
||||
else
|
||||
write_auto_mount "2"
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
|
@ -0,0 +1,46 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install deepin-license-activator in Professional version
|
||||
|
||||
install_activator() {
|
||||
msg "Install deepin-license-activator"
|
||||
apt-get install --no-install-recommends -y --force-yes \
|
||||
--allow-unauthenticated deepin-license-activator
|
||||
}
|
||||
|
||||
install_activation_key() {
|
||||
readonly SRC_KEY=${OEM_DIR}/license.key
|
||||
readonly DST_KEY=/var/deepin/license.key
|
||||
mkdir -pv /var/deepin
|
||||
if [ -f "${SRC_KEY}" ]; then
|
||||
msg "Install activation key to ${DST_KEY}"
|
||||
install -v -m644 "${SRC_KEY}" "${DST_KEY}"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
if grep -qr "Professional" /etc/deepin-version 2>/dev/null; then
|
||||
install_activator
|
||||
install_activation_key
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
||||
|
||||
return 0
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Disable 'auto dhcp' interfaces because we use Network-Manager
|
||||
|
||||
if [ -f /usr/lib/NetworkManager/ifblacklist_migrate.sh ]; then
|
||||
sh /usr/lib/NetworkManager/ifblacklist_migrate.sh
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,26 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Disable 'auto dhcp' interfaces if network-manager is in use.
|
||||
# when use PXE install system will cause this problem.
|
||||
|
||||
if [ -f /etc/NetworkManager/NetworkManager.conf ]; then
|
||||
sed -i 's/managed=false/managed=true/' /etc/NetworkManager/NetworkManager.conf
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,309 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Match model name of machine, like "UX31A".
|
||||
is_productname_exists() {
|
||||
local NAME="$1"
|
||||
grep -q "${NAME}" /sys/class/dmi/id/product_name 2>/dev/null
|
||||
}
|
||||
|
||||
# Check PCI device with id
|
||||
is_pci_exists() {
|
||||
local PCI_ID="$1"
|
||||
local PCI_INFO
|
||||
PCI_INFO=$(lspci -d "${PCI_ID}" 2>/dev/null)
|
||||
test -n "${PCI_INFO}"
|
||||
}
|
||||
|
||||
is_usb_exists() {
|
||||
local USB_ID="$1"
|
||||
local USB_INFO
|
||||
USB_INFO="$(lsusb -d "${USB_ID}" 2>/dev/null)"
|
||||
test -n "${USB_INFO}"
|
||||
}
|
||||
|
||||
# Fix X550VC wlan software control
|
||||
fix_productname_x550vc() {
|
||||
if is_productname_exists "X550VC"; then
|
||||
msg "fix X550VC wlan."
|
||||
|
||||
# Add wapf = 4 to enable software control
|
||||
echo "options asus_nb_wmi wapf=4" | tee -a /etc/modprobe.d/asus_nb_wmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# Fix N551ZU wireless driver
|
||||
fix_productname_n551zu() {
|
||||
if is_productname_exists "N551ZU"; then
|
||||
msg "fix N551ZU wireless driver"
|
||||
|
||||
# Add wapf = 1
|
||||
echo "options asus_nb_wmi wapf=1" | tee -a /etc/modprobe.d/asus_nb_wmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# Fix xiaomi notebook 13.3 wireless driver
|
||||
fix_xiaomi_notebook_133() {
|
||||
if is_productname_exists "TM1613"; then
|
||||
if is_pci_exists "8086:24f3"; then
|
||||
msg "fix Xiaomi notebook 13.3 wireless driver"
|
||||
echo "blacklist acer_wmi" | \
|
||||
tee -a /etc/modprobe.d/xiaomi_disable_acer_wmi.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Fix wireless issue of lenovo y700
|
||||
fix_lenovo_y700() {
|
||||
if is_productname_exists "80NV"; then
|
||||
if is_pci_exists "8086:3166"; then
|
||||
msg "fix lenovo y700"
|
||||
|
||||
# Add ideapad to blacklist of kernel module.
|
||||
echo "blacklist ideapad_laptop" | tee -a /etc/modprobe.d/ideapad.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
fix_lenovo_r720() {
|
||||
if is_productname_exists "80WW"; then
|
||||
if is_pci_exists "168c:0042"; then
|
||||
msg "fix lenovo r720"
|
||||
|
||||
# Add ideapad to blacklist of kernel module.
|
||||
echo "blacklist ideapad_laptop" | tee -a /etc/modprobe.d/ideapad.conf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Fix wireless of X450JB
|
||||
fix_asus_x450jb() {
|
||||
if is_productname_exists "X450JB"; then
|
||||
msg "fix asus x450jb"
|
||||
|
||||
# Add acer wmi to blacklist of kernel module.
|
||||
echo "blacklist acer_wmi" | tee -a /etc/modprobe.d/blacklist_acerwmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
fix_asus_x450jn() {
|
||||
if is_productname_exists "X450JN"; then
|
||||
msg "fix asus x450jn"
|
||||
echo "blacklist acer_wmi" | tee -a /etc/modprobe.d/blacklist_acerwmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
fix_asus_x450jf() {
|
||||
if is_productname_exists "X450JF"; then
|
||||
msg "fix asus x450jf"
|
||||
echo "blacklist acer_wmi" | tee -a /etc/modprobe.d/blacklist_acerwmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
fix_asus_u82u() {
|
||||
if is_productname_exists "U82U"; then
|
||||
msg "fix asus u82u"
|
||||
echo "blacklist asus-nb-wmi" | tee -a /etc/modprobe.d/blacklist_asus_nb_wmi.conf
|
||||
fi
|
||||
}
|
||||
|
||||
fix_lenovo_80t9() {
|
||||
if is_productname_exists "80T9"; then
|
||||
msg "fix lenovo 80t9"
|
||||
echo "blacklist ideapad_laptop" | tee -a /etc/modprobe.d/blacklist-ideapad-laptop.conf
|
||||
fi
|
||||
}
|
||||
# bcm4313 [14e4:4727] wireless driver
|
||||
fix_pci_bcm4313() {
|
||||
if is_pci_exists "14e4:4727"; then
|
||||
msg "fix bcm4313"
|
||||
|
||||
# uninstall bcmwl-kernel-source
|
||||
apt-get purge -y -f bcmwl-kernel-source
|
||||
apt-get install --allow-unauthenticated -y firmware-brcm80211
|
||||
|
||||
# blacklist b43 and wl driver
|
||||
echo "blacklist b43" | tee -a /etc/modprobe.d/bcm.conf
|
||||
echo "blacklist wl" | tee -a /etc/modprobe.d/bcm.conf
|
||||
|
||||
# enable brcmsmac
|
||||
echo "brcmsmac" | tee -a /etc/modules
|
||||
fi
|
||||
}
|
||||
|
||||
# bcm4350 [14e4:43a3] wl is not usable
|
||||
fix_pci_bcm4350() {
|
||||
if is_pci_exists "14e4:43a3"; then
|
||||
msg "fix bcm4350"
|
||||
|
||||
# uninstall bcmwl-kernel-source
|
||||
apt-get purge -y -f bcmwl-kernel-source
|
||||
apt-get install --allow-unauthenticated -y firmware-brcm80211
|
||||
|
||||
# blacklist wl driver
|
||||
echo "blacklist wl" | tee -a /etc/modprobe.d/bcm.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# bcm4356 [17aa:0777] wl is not usable
|
||||
fix_pci_bcm4356() {
|
||||
if is_pci_exists "17aa:0777"; then
|
||||
msg "fix bcm4356"
|
||||
apt-get purge -y -f bcmwl-kernel-source
|
||||
fi
|
||||
}
|
||||
|
||||
# bcm4322 [14e4:432b] wl is not usable
|
||||
fix_pci_bcm4322() {
|
||||
if is_pci_exists "14e4:432b"; then
|
||||
msg "fix bcm4322"
|
||||
apt-get purge -y -f bcmwl-kernel-source
|
||||
echo "blacklist wl" | tee -a /etc/modprobe.d/bcm.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# ar9485 [168C:0032] wireless driver
|
||||
fix_pci_ar9485_nohwcrypt() {
|
||||
# fix ar9485 issue that could not connect to wifi with password protect
|
||||
if is_pci_exists "168C:0032"; then
|
||||
msg "fix ar9485"
|
||||
echo "options ath9k nohwcrypt=1" | tee -a /etc/modprobe.d/ath9k.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# rtl8723be [10ec:b723] wireless driver
|
||||
fix_pci_rtl8723be_fwlps() {
|
||||
# fix rtl8723be issue that could not re-connect to wifi after a
|
||||
# period of time
|
||||
if is_pci_exists "10ec:b723"; then
|
||||
msg "fix rtl8723be"
|
||||
echo "options rtl8723be fwlps=0" | tee -a /etc/modprobe.d/rtl8723be.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# rtl8188ce [10ec:8176] wireless driver
|
||||
fix_pci_rtl8188ce() {
|
||||
if is_pci_exists "10ec:8176"; then
|
||||
msg "fix rtl8188ce"
|
||||
echo "options rtl8192ce fwlps=0 ips=0" | tee -a /etc/modprobe.d/rtl8192ce.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# rt3290 [1814:3290] wireless driver
|
||||
fix_pci_rt3290() {
|
||||
if is_pci_exists "1814:3290"; then
|
||||
msg "fix rt3290"
|
||||
echo "options rt2800pci nohwcrypt=1" | tee -a /etc/modprobe.d/rt2800pci.conf
|
||||
fi
|
||||
}
|
||||
|
||||
# rtl8723au [0bda:1724] wireless driver
|
||||
# TODO: no need any more after updating kernel to 3.15
|
||||
fix_usb_rtl8723au() {
|
||||
if is_usb_exists "0bda:1724"; then
|
||||
msg "fix rtl8723au"
|
||||
apt-get install --allow-unauthenticated -y rtl8723au-dkms
|
||||
fi
|
||||
}
|
||||
|
||||
# fix device driver problems
|
||||
#_kernel_version=$(uname -r)
|
||||
#case $_kernel_version in
|
||||
# 4.*)
|
||||
# echo "[INFO] Kernel version >> 4.0, skip fix network.."
|
||||
# exit 0
|
||||
# ;;
|
||||
#esac
|
||||
|
||||
fix_pci_rtl8723ae_fwlps() {
|
||||
if is_pci_exists "10ec:8723"; then
|
||||
msg "fix rtl8723ae"
|
||||
echo 'options rtl8723ae fwlps=0' | tee -a /etc/modprobe.d/rtl8723ae.conf
|
||||
fi
|
||||
}
|
||||
|
||||
install_deb() {
|
||||
install_package backport-iwlwifi-dkms # 10代U-iwlwifi解决方案
|
||||
}
|
||||
|
||||
## 处理厂商id=8086/device_id=34F0
|
||||
fix_8086_34F0() {
|
||||
local Test=$(installer_get "DI_VENDOR_8086_DEVICE_34F0_PCI")
|
||||
[ "x${Test}" == "xtrue" ] && install_deb
|
||||
}
|
||||
|
||||
## 处理厂商id=8086/device_id=A0F0
|
||||
fix_8086_A0F0() {
|
||||
local Test=$(installer_get "DI_VENDOR_8086_DEVICE_A0F0_PCI")
|
||||
[ "x${Test}" == "xtrue" ] && install_deb
|
||||
}
|
||||
|
||||
## 处理厂商id=8086/device_id=9DF0
|
||||
fix_8086_9DF0() {
|
||||
local Test=$(installer_get "DI_VENDOR_8086_DEVICE_9DF0_PCI")
|
||||
[ "x${Test}" == "xtrue" ] && install_deb
|
||||
}
|
||||
|
||||
setup_drivers() {
|
||||
# 处理网卡驱动
|
||||
fix_pci_bcm4313 || true
|
||||
fix_pci_bcm4350 || true
|
||||
fix_pci_bcm4356 || true
|
||||
#fix_pci_bcm4322 || true
|
||||
fix_pci_rtl8723be_fwlps || true
|
||||
#fix_usb_rtl8723au || true
|
||||
fix_pci_rtl8723ae_fwlps || true
|
||||
fix_pci_rtl8188ce || true
|
||||
fix_pci_rt3290 || true
|
||||
fix_productname_x550vc || true
|
||||
fix_productname_n551zu || true
|
||||
fix_xiaomi_notebook_133 || true
|
||||
fix_lenovo_y700 || true
|
||||
fix_lenovo_r720 || true
|
||||
fix_asus_x450jb || true
|
||||
fix_asus_x450jn || true
|
||||
fix_asus_x450jf || true
|
||||
fix_asus_u82u || true
|
||||
fix_lenovo_80t9 ||true
|
||||
|
||||
# 处理wifi
|
||||
## 控制平台
|
||||
local fix_wifi_device=$(installer_get "system_fix_wifi_device")
|
||||
if [ "x${fix_wifi_device}" != "xtrue" ]; then
|
||||
fix_8086_34F0
|
||||
fix_8086_A0F0
|
||||
fix_8086_9DF0
|
||||
fi
|
||||
|
||||
# 处理n卡
|
||||
if lspci -n | grep -i 10de | egrep -i '.*03(80|0[0-2])' ;then
|
||||
if [ x"$(installer_get DI_ENABLE_NVIDIA_DRIVER)" == xtrue ];then
|
||||
debconf-set-selections <<< 'nvidia-legacy-check nvidia-driver/check-for-unsupported-gpu select Yes'
|
||||
debconf-set-selections <<< 'nvidia-legacy-check nvidia-driver/install-even-if-unsupported-gpu-exists select OK'
|
||||
install_package nvidia-driver || msg "install nvidia driver failed!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
utcs_check() {
|
||||
if which /usr/sbin/utcs; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
utcs_start() {
|
||||
/usr/sbin/utcs
|
||||
}
|
||||
|
||||
main() {
|
||||
if utcs_check; then
|
||||
msg "the /usr/sbin/utcs tool module found"
|
||||
utcs_start
|
||||
else
|
||||
msg "the /usr/sbin/utcs tool module could not be found"
|
||||
setup_drivers
|
||||
fi
|
||||
}
|
||||
|
||||
main
|
|
@ -0,0 +1,26 @@
|
|||
#! /bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Fix program file capacity flags caused by squashfs filesystem.
|
||||
|
||||
for pkg in libgstreamer1.0-0 systemd iputils-ping netselect; do
|
||||
dpkg -l | grep -q -e "^ii\ \ ${pkg}\ " && \
|
||||
dpkg-reconfigure --frontend noninteractive ${pkg} || true
|
||||
done
|
||||
|
||||
return 0
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# try to fix systemd machine-id config at first boot
|
||||
# No need to save machine ID, regenerate.
|
||||
|
||||
# 解决SP1版本/etc/machine-id相同的问题
|
||||
if [ -e /var/lib/dbus/machine-id ];then
|
||||
rm -rf /var/lib/dbus/machine-id
|
||||
fi
|
||||
|
||||
if [ -e /etc/machine-id ];then
|
||||
rm -rf /etc/machine-id
|
||||
systemd-machine-id-setup
|
||||
fi
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Enable/disable services
|
||||
|
||||
ENABLED_SERVICES=$(installer_get "service_enabled_services");
|
||||
if [ -n "${ENABLED_SERVICES}" ]; then
|
||||
for service_name in "${ENABLED_SERVICES}"; do
|
||||
if [ -n "${service_name}" ]; then
|
||||
# Only print warning message instead of quiting.
|
||||
systemctl enable "${service_name}" || \
|
||||
warn "Failed to enable service ${service_name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
DISABLED_SERVICES=$(installer_get "service_disabled_services" | sed "s/;/ /g")
|
||||
if [ -n "${DISABLED_SERVICES}" ]; then
|
||||
# Disable services one by one.
|
||||
for service_name in "${DISABLED_SERVICES}"; do
|
||||
if [ -n "${service_name}" ]; then
|
||||
systemctl disable "${service_name}" || \
|
||||
warn "Failed to disable service ${service_name}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,59 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Update grub menu options on x86 based platformats like:
|
||||
# * Set grub menu timeout;
|
||||
# * Remove windows menu item;
|
||||
# * Update grub background image;
|
||||
|
||||
if ! is_x86; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
GRUB_NEED_UPDATE=false
|
||||
|
||||
GRUB_BLOCK_WINDOWS=$(installer_get "grub_block_windows")
|
||||
if [ x"${GRUB_BLOCK_WINDOWS}" = "xtrue" ]; then
|
||||
# Remove windows menu item from boot menu by disable os-prober from finding
|
||||
# Windows partitions.
|
||||
# Remove windows probes from os-prober script list.
|
||||
[ -f /usr/lib/os-probes/mounted/20microsoft ] && \
|
||||
rm /usr/lib/os-probes/mounted/20microsoft
|
||||
[ -f /usr/lib/os-probes/mounted/efi/20microsoft ] && \
|
||||
rm /usr/lib/os-probes/mounted/efi/20microsoft
|
||||
GRUB_NEED_UPDATE=true
|
||||
fi
|
||||
|
||||
# deepin-fallback need jpg file, and imagemagisk does not work for sw platform,
|
||||
# cannot conver png to jpg. So modify the requirements of oem.
|
||||
OEM_GRUB_BACKGROUND="${OEM_DIR}/grub.jpg"
|
||||
GRUB_BACKGROUND=/boot/grub/themes/deepin/background_source
|
||||
GRUB_BACKGROUND_FAILBACK=/boot/grub/themes/deepin-fallback/background.jpg
|
||||
if [ -f "${OEM_GRUB_BACKGROUND}" ]; then
|
||||
# Update background of boot menu by overwriting old background image.
|
||||
install -m644 -v "${OEM_GRUB_BACKGROUND}" "${GRUB_BACKGROUND}"
|
||||
install -m644 -v "${OEM_GRUB_BACKGROUND}" "${GRUB_BACKGROUND_FAILBACK}"
|
||||
|
||||
GRUB_NEED_UPDATE=true
|
||||
fi
|
||||
|
||||
if [ x${GRUB_NEED_UPDATE} = "xtrue" ]; then
|
||||
update_grub_local
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 需要在备份还原之前备份该包,保证系统还原之后也能执行
|
||||
installer_first_boot_deb() {
|
||||
[ -d "$OEM_DIR/first_boot_deb" ] && cp -vfr "$OEM_DIR/first_boot_deb" /usr/share/deepin-installer/
|
||||
[ -d "$OEM_DIR/hooks/first_boot" ] && cp -vfr "$OEM_DIR/hooks/first_boot" /usr/share/deepin-installer/hooks
|
||||
}
|
||||
|
||||
installer_first_boot_deb
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install packages in component.
|
||||
|
||||
DI_COMPONENT_PACKAGES=$(installer_get "DI_COMPONENT_PACKAGES")
|
||||
DI_COMPONENT_LANGUAGE=$(installer_get "DI_COMPONENT_LANGUAGE")
|
||||
|
||||
if [ ! -z "${DI_COMPONENT_PACKAGES}" ];then
|
||||
# install component
|
||||
install_package ${DI_COMPONENT_PACKAGES} || \
|
||||
warn "Failed to install packages: ${DI_COMPONENT_PACKAGES}"
|
||||
fi
|
||||
|
||||
if [ ! -z "${DI_COMPONENT_LANGUAGE}" ];then
|
||||
install_package ${DI_COMPONENT_LANGUAGE} || \
|
||||
warn "Failed to install packages: " ${DI_COMPONENT_LANGUAGE}
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Install packages in oem/deb/ folder.
|
||||
# Uninstall packages defined in settings file.
|
||||
|
||||
OEM_DEB="${OEM_DIR}/deb"
|
||||
if [[ $(ls "${OEM_DEB}"/*.deb 2>/dev/null) ]]; then
|
||||
ls "${OEM_DEB}"
|
||||
DEBIAN_FRONTEND="noninteractive"
|
||||
apt-get -y --allow-downgrades install -o Dpkg::Options::="--force-confnew" "${OEM_DEB}/"*.deb || warn "Failed to install oem deb packages"
|
||||
fi
|
||||
|
||||
UNINSTALLED_PKGS=$(installer_get "package_uninstalled_packages" | sed "s/;/ /g")
|
||||
if [ -n "${UNINSTALLED_PKGS}" ]; then
|
||||
apt-get -y purge ${UNINSTALLED_PKGS} || \
|
||||
warn_exit "Failed to install packages: ${UNINSTALLED_PKGS}"
|
||||
fi
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Update system version information.
|
||||
# Put this script before 51_install_deepin_license_activator.job
|
||||
|
||||
# Update /etc/deepin-version.
|
||||
NEW_VERSION=$(installer_get "system_info_deepin_version")
|
||||
if [ -n "${NEW_VERSION}" ]; then
|
||||
[ -f /etc/deepin-version ] && rm -vf /etc/deepin-version
|
||||
echo "${NEW_VERSION}" | base64 -d | tee /etc/deepin-version
|
||||
fi
|
||||
|
||||
# Update /etc/lsb-release
|
||||
NEW_RELEASE=$(installer_get "system_info_lsb_release")
|
||||
if [ -n "${NEW_RELEASE}" ]; then
|
||||
[ -f /etc/lsb-release ] && rm -vf /etc/lsb-release
|
||||
echo "${NEW_RELEASE}" | base64 -d | tee /etc/lsb-release
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Copy plymouth theme folder into system.
|
||||
|
||||
SRC_DIR="${OEM_DIR}/plymouth-theme/uos-ssd-logo"
|
||||
DEST_DIR=/usr/share/plymouth/themes/uos-ssd-logo
|
||||
if [ -d "${SRC_DIR}" ]; then
|
||||
rm -rf "${DEST_DIR}" || warn_exit "Failed to remove old plymouth theme"
|
||||
cp -rvf "${SRC_DIR}" "${DEST_DIR}" || \
|
||||
warn_exit "Failed to copy plymouth theme to system"
|
||||
chmod +R 644 "${DEST_DIR}"
|
||||
fi
|
||||
|
||||
return 0
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
# Update plymouth for ssd drivers.
|
||||
|
||||
DI_ROOT_PARTITION=$(installer_get "DI_ROOT_PARTITION")
|
||||
|
||||
detect_rootblk() {
|
||||
if [ ! -z ${DI_ROOT_PARTITION} ]; then
|
||||
local PDEVICE
|
||||
PDEVICE=$(stat -c "%02t" ${DI_ROOT_PARTITION})
|
||||
for file in $(find /dev -type b 2>/dev/null); do
|
||||
local CURRENT_DEVICE
|
||||
CURRENT_DEVICE=$(stat -c "%02t%02T" $file)
|
||||
if [ x"$CURRENT_DEVICE" = x"${PDEVICE}00" ]; then
|
||||
ROOTBLK=${file##*/}
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
detect_solid() {
|
||||
FILEPATH=/sys/block/${ROOTBLK}/queue/rotational
|
||||
[ -e ${FILEPATH} ] && read CHECK < ${FILEPATH}
|
||||
[ -n $CHECK ] && [ x$CHECK = "x0" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
update_plymouth() {
|
||||
if [ -e /usr/share/plymouth/themes/uos-ssd-logo ] && detect_solid; then
|
||||
plymouth-set-default-theme uos-ssd-logo
|
||||
fi
|
||||
}
|
||||
|
||||
detect_rootblk
|
||||
[ -n $ROOTBLK ] && update_plymouth
|
||||
|
||||
return 0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue