mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 16:32:59 +02:00
Fix unattended installation.
This commit is contained in:
@@ -557,10 +557,11 @@ EXIT:
|
||||
fclose(flog);
|
||||
newtFinished();
|
||||
|
||||
// if (!unattended) {
|
||||
// if (system("/usr/sbin/chroot /harddisk /usr/local/sbin/setup /dev/tty2 INSTALL"))
|
||||
// printf("Unable to run setup.\n");
|
||||
// }
|
||||
if (unattended) {
|
||||
// Remove Setup autorun after boot
|
||||
if (system("rm -f /harddisk/etc/rc.d/rcsysinit.d/S75firstsetup"))
|
||||
printf("Unable to disable setup autorun.\n");
|
||||
}
|
||||
|
||||
if (system("/bin/umount /harddisk/proc"))
|
||||
printf("Unable to umount /harddisk/proc.\n");
|
||||
|
||||
@@ -131,7 +131,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
|
||||
/* set root password */
|
||||
fprintf(flog, "unattended: setting root password\n");
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/sbin/chroot /harddisk /bin/sh -c \"echo 'root:%s' | /usr/sbin/chpasswd\"", root_password);
|
||||
"/usr/sbin/chroot /harddisk /bin/sh -c \"echo 'root:%s' | /usr/sbin/chpasswd\"", root_password);
|
||||
if (mysystem(commandstring)) {
|
||||
errorbox("unattended: ERROR setting root password");
|
||||
return 0;
|
||||
@@ -140,7 +140,7 @@ int unattended_setup(struct keyvalue *unattendedkv) {
|
||||
/* set admin password */
|
||||
fprintf(flog, "unattended: setting admin password\n");
|
||||
snprintf(commandstring, STRING_SIZE,
|
||||
"/sbin/chroot /harddisk /usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", admin_password);
|
||||
"/usr/sbin/chroot /harddisk /usr/sbin/htpasswd -c -m -b " CONFIG_ROOT "/auth/users admin '%s'", admin_password);
|
||||
if (mysystem(commandstring)) {
|
||||
errorbox("unattended: ERROR setting admin password");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user