mirror of
https://git.launchpad.net/~ubuntu-qt-code/+git/calamares-settings-ubuntu
synced 2025-08-02 19:24:03 +00:00
Update module
This commit is contained in:
parent
5778c7754b
commit
9dbdf28577
14
debian/extra_modules/krfbcfg/main.py
vendored
14
debian/extra_modules/krfbcfg/main.py
vendored
@ -19,19 +19,25 @@
|
|||||||
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
# along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import libcalamares
|
import libcalamares
|
||||||
|
import os
|
||||||
|
from pwd import getpwnam
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
""" Setup network configuration """
|
""" Setup network configuration """
|
||||||
|
|
||||||
obfuscatedPassword = libcalamares.globalstorage.value("password")
|
obfuscatedPassword = libcalamares.globalstorage.value("password")
|
||||||
cfgPath = libcalamares.target_env_output("kde4-config --path").split(":")[0]
|
user = libcalamares.globalstorage.value("autologinUser")
|
||||||
|
cfgPath = libcalamares.utils.check_target_env_output(["sudo", "-u", user, "kde4-config", "--path", "config"]).split(":")[0]
|
||||||
|
os.makedirs(cfgPath, exist_ok=True)
|
||||||
|
|
||||||
with open(cfgPath + "krfbrc", 'w') as krfbrc:
|
with open(cfgPath + "krfbrc", 'w') as krfbrc:
|
||||||
krfbrc.write("[Security]\n" +
|
krfbrc.write("[Security]\n" +
|
||||||
"allowUnattendedAccess=true\n" +
|
"allowUnattendedAccess=true\n" +
|
||||||
"desktopPassword=ᄈᄊᄅᄎ" + obfuscatedPassword + "\n" +
|
"desktopPassword=" + obfuscatedPassword + "\n" +
|
||||||
"noWallet=true" +
|
"noWallet=true" +
|
||||||
"unattendedPassword=ᄈᄊᄅᄎ" + obfuscatedPassword + "\n")
|
"unattendedPassword=" + obfuscatedPassword + "\n")
|
||||||
|
|
||||||
|
userEntry = getpwnam(user)
|
||||||
|
libcalamares.utils.check_target_env_output(["chown", "-R", "{0}:{1}".format(userEntry.pw_uid, userEntry.pw_gid), userEntry.pw_dir])
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user