Browse code

Fix su commands

Daniel Bolton authored on 06/08/2011 at 19:41:52
Showing 1 changed files
... ...
@@ -15,9 +15,9 @@ alias apsrc='apt-get source'
15 15
 alias apv='apt-cache policy'
16 16
 
17 17
 # aliases that use su -c ##############
18
-alias apdg='su -c "aptitude update && aptitude safe-upgrade"'
19
-alias apud='su -c "aptitude update"'
20
-alias apug='su -c "aptitude safe-upgrade"'
18
+alias apdg='su -lc "aptitude update && aptitude safe-upgrade" root'
19
+alias apud='su -lc "aptitude update" root'
20
+alias apug='su -lc "aptitude safe-upgrade" root'
21 21
 # end aliases that use su -c ##########
22 22
 
23 23
 # aliases that use sudo ###############
... ...
@@ -36,13 +36,13 @@ alias allpkgs='aptitude search -F "%p" --disable-columns ~i'
36 36
 # Install all .deb files in the current directory.
37 37
 # Warning: you will need to put the glob in single quotes if you use:
38 38
 # glob_subst
39
-alias di='su -c "dpkg -i ./*.deb"'
39
+alias di='su -lc "dpkg -i ./*.deb" root'
40 40
 
41 41
 # Create a basic .deb package
42 42
 alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc'
43 43
 
44 44
 # Remove ALL kernel images and headers EXCEPT the one in use
45
-alias kclean='su -c '\''aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))'\'' root'
45
+alias kclean='su -lc '\''aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))'\'' root'
46 46
 
47 47
 
48 48
 
... ...
@@ -81,4 +81,3 @@ kerndeb () {
81 81
         "$revision" kernel_image kernel_headers
82 82
 }
83 83
 
84
-