Kaydet (Commit) 816cb916 authored tarafından Your Name's avatar Your Name

minor fixes

üst 504523fa
...@@ -9,6 +9,10 @@ build: ...@@ -9,6 +9,10 @@ build:
cp -prfv live-installer build/usr/lib/ cp -prfv live-installer build/usr/lib/
install data/live-installer.sh build/usr/bin/live-installer install data/live-installer.sh build/usr/bin/live-installer
install data/live-installer.desktop build/usr/share/applications/live-installer.desktop install data/live-installer.desktop build/usr/share/applications/live-installer.desktop
mkdir -p build/usr/lib/live-installer/scripts
install data/preinstall.sh build/usr/lib/live-installer/scripts/preinstall.sh
install data/postinstall.sh build/usr/lib/live-installer/scripts/postinstall.sh
#set parmissions #set parmissions
chmod 755 -R build chmod 755 -R build
chown root -R build chown root -R build
......
xhost +
pkexec sh -c "DISPLAY=$DISPLAY GTK_THEME=Adwaita python3 /usr/lib/live-installer/main.py" pkexec sh -c "DISPLAY=$DISPLAY GTK_THEME=Adwaita python3 /usr/lib/live-installer/main.py"
#!/bin/bash
#Post install script run in chroot
#Archlinux::
#cp /lib/modules/$(uname -r)/vmlinuz /boot/(uname -r)
#mkinitcpio -g /boot/initrd.img-(uname -r)
#!/bin/bash
#Preinstall script run in live root
...@@ -59,6 +59,7 @@ class InstallerEngine: ...@@ -59,6 +59,7 @@ class InstallerEngine:
os.system("umount --force /target/run/") os.system("umount --force /target/run/")
self.mount_source() self.mount_source()
if (not self.setup.skip_mount): if (not self.setup.skip_mount):
if self.setup.automated: if self.setup.automated:
...@@ -67,6 +68,8 @@ class InstallerEngine: ...@@ -67,6 +68,8 @@ class InstallerEngine:
self.format_partitions() self.format_partitions()
self.mount_partitions() self.mount_partitions()
self.run_preinstall()
# Transfer the files # Transfer the files
SOURCE = "/source/" SOURCE = "/source/"
DEST = "/target/" DEST = "/target/"
...@@ -112,6 +115,8 @@ class InstallerEngine: ...@@ -112,6 +115,8 @@ class InstallerEngine:
os.system("mv /target/etc/resolv.conf /target/etc/resolv.conf.bk") os.system("mv /target/etc/resolv.conf /target/etc/resolv.conf.bk")
os.system("cp -f /etc/resolv.conf /target/etc/resolv.conf") os.system("cp -f /etc/resolv.conf /target/etc/resolv.conf")
self.run_postinstall()
# add new user # add new user
print(" --> Adding new user") print(" --> Adding new user")
our_current += 1 our_current += 1
...@@ -474,7 +479,9 @@ class InstallerEngine: ...@@ -474,7 +479,9 @@ class InstallerEngine:
newconsolefh.write('#Option "XkbOptions" "grp:alt_shift_toggle"\n') newconsolefh.write('#Option "XkbOptions" "grp:alt_shift_toggle"\n')
newconsolefh.write('EndSection\n') newconsolefh.write('EndSection\n')
newconsolefh.close() newconsolefh.close()
# write MBR (grub) # write MBR (grub)
print(" --> Configuring Grub") print(" --> Configuring Grub")
our_current += 1 our_current += 1
...@@ -574,6 +581,16 @@ class InstallerEngine: ...@@ -574,6 +581,16 @@ class InstallerEngine:
def exec_cmd(self, cmd): def exec_cmd(self, cmd):
return os.system(cmd) return os.system(cmd)
def run_preinstall(self):
os.system("bash /usr/lib/live-installer/scripts/preinstall.sh")
def run_postinstall(self):
os.system("cp /usr/lib/live-installer/scripts/postinstall.sh /target/tmp/script.sh")
os.system("chroot /target /tmp/script.sh")
os.system(" rm -f /target/tmp/script")
# Represents the choices made by the user # Represents the choices made by the user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment