uosdesktop.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package fsdriver
  15. import (
  16. deployapi "yunion.io/x/onecloud/pkg/hostman/hostdeployer/apis"
  17. )
  18. type SUOSDesktopRootFs struct {
  19. *SUbuntuRootFs
  20. }
  21. func NewUOSDesktopRootfs(part IDiskPartition) IRootFsDriver {
  22. return &SUOSDesktopRootFs{SUbuntuRootFs: NewUbuntuRootFs(part).(*SUbuntuRootFs)}
  23. }
  24. func (d *SUOSDesktopRootFs) GetName() string {
  25. return "UOSDesktop"
  26. }
  27. func (d *SUOSDesktopRootFs) String() string {
  28. return "UOSDesktopRootFs"
  29. }
  30. func (d *SUOSDesktopRootFs) RootSignatures() []string {
  31. sig := d.sDebianLikeRootFs.RootSignatures()
  32. return append([]string{"/etc/lsb-release", "/etc/deepin-version"}, sig...)
  33. }
  34. func (d *SUOSDesktopRootFs) GetReleaseInfo(rootFs IDiskPartition) *deployapi.ReleaseInfo {
  35. info := d.SUbuntuRootFs.GetReleaseInfo(rootFs)
  36. info.Distro = d.GetName()
  37. return info
  38. }
  39. func (d *SUOSDesktopRootFs) AllowAdminLogin() bool {
  40. return false
  41. }