ianclever
(usa Arch Linux)
Enviado em 26/03/2013 - 15:04h
bom aqui via "olhômetro" nenhuma saída de erro, via compilador também não, segue o código:
#include <stdio.h>
#include <strings.h>
#include <string.h>
main()
{
int opc;
char op1[2];
printf("\n>>Você está mo modo gráfico ou modo texto? \n>>[1] - Gráfico\n>>[2] - Texto\n");
scanf("%d",&opc);
if(opc==1)
{
system("xset b 0");
system("xset b off");
system("modprobe -r snd-pcsp");
system("cp /etc/modules.d/blacklist.conf /etc/modules.d/blacklist.conf.old");
system("echo blacklist snd-pcsp >> /etc/modules.d/blacklist.conf");
system("mv /lib/modules/3.8.0-sabayon/kernel/sound/drivers/pcsp/snd-pcsp.ko /lib/modules/3.8.0-sabayon/kernel/sound/drivers/pcsp/.tchau");
system("mv /lib/modules/3.7.0-sabayon/kernel/sound/drivers/pcsp/snd-pcsp.ko /lib/modules/3.7.0-sabayon/kernel/sound/drivers/pcsp/.tchau");
printf("\nDeseja reiniciar o computador? [s/n]\n");
gets(op1);
if((op1[0] == 's') || (op1[0] == 'S'))
{
printf("\nTchau beep!\n");
system("reboot");
}
}
else
{
system("setterm -blength 0");
system("setterm -blength off");
system("modprobe -r pcspkr");
system("cp /etc/modules.d/blacklist.conf /etc/modules/blacklist1.conf.old");
system("echo blacklist pcspkr >> /etc/modules.d/blacklist.conf");
system("mv /lib/modules/3.8.0-sabayon/kernel/drivers/input/misc/pcspkr.ko /lib/modules/3.8.0-sabayon/kernel/drivers/input/misc/.tchau");
system("mv /lib/modules/3.7.0-sabayon/kernel/drivers/input/misc/pcspkr.ko /lib/modules/3.7.0-sabayon/kernel/drivers/input/misc/.tchau");
printf("\nDeseja reiniciar o computador? \n");
gets(op1);
if((op1[0] == 's') || (op1[0] == 'S'))
{
printf("\nTchau beep! \n");
system("reboot");
}
}
}